Colored candlesticks with EMA

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #10608 quote
    Henry
    Participant
    Average

    A request that was addressed to ProRealTime:

    On my chart set up I have created a wave consisting of: 34 ema on High of day coloured green , and 34 ema on close of day coloured red and bottom of wave is 34 ema on low of day coloured red
    What I would like to add is a colour coded candle structure of the following:
    if the close is above the 34 ema green line candle to be coloured Green
    If the close is between the green top or wave and above the red bottom of wave candles to be coloured Blue
    if the close is below the red line low the candle is to be coloured red
    Can anybody please help me with how I can program this if it is possible on this platform

    hope you can help regards

    Suggestion for an anwser:

    REM This code is compatible with ProRealTime v10.3 and above
    
    Period=34
    
    EMAHigh=ExponentialAverage[Period](High)
    //EMAClose=ExponentialAverage[Period](close)
    EMALow=ExponentialAverage[Period](Low)
    
    if close > EMAHigh then
    DRAWCANDLE(open, high, low, close) coloured(0,255,0)
    elsif close <= EMAHigh and close >= EMALow then
    DRAWCANDLE(open, high, low, close) coloured(0,0,255)
    elsif close < EMALow then
    DRAWCANDLE(open, high, low, close) coloured(255,0,0)
    endif
    return
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Colored candlesticks with EMA


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Henry @henry Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/19/2016
Status: Active
Attachments: No files
Logo Logo
Loading...