MACD histogram candle colours for high and low

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #14018 quote
    NickleB
    Participant
    New

    Hi all,

    I have created a MACD Histogram and i’m trying to get the bars change colour to show a change from one bar to the other, example –

    if historgam bar is coloured RED, this indicates a decrease value when compared to the previous bar and if histogram bar is greater than the previous bar this is coloured Green. this works up to the zero line and on both uptrend and downtrend.

    I’ve supplied an attachment showing what i would like to programme

    #14045 quote
    NickleB
    Participant
    New

    I’ve been looking at the manual provided by Pro RealTime but the “COLOURED” syntax only works if the variable has not been allocated, what if the variable has already been declared?

    when i set up the indicator i can change the colour to either one or the other and when they cross the zero line it is either GREEN (0,255,0) or RED (255,0,0) what if i want to get bars next to each other to have different colours?

    I can’t see how to program this in and don’t see any indicators showing this either on this forum?

    any help would be gratefully received.

     

     

    NickleB

    #14083 quote
    NickleB
    Participant
    New

    The indicator is available in MT4 and called aodivergence. i don’t know if this can be changed to Pro Realtime, anyway i ouldn’t knw how any way. I can share this if you need to look at the coding.

    #14602 quote
    NickleB
    Participant
    New

    hi all,

    I’ve still not had any joy with this, has anyone had a chance to look at this and giveme some pointers, please remember i’m not a coder and have limited knowledge.

     

    thanks in advance

    #14609 quote
    supertiti
    Participant
    Master
    // MACD DID V2 06.07.2014
    
    MMR = exponentialaverage [p](close)
    MML = exponentialaverage [p1](close)
    monMACD = MMR - MML
    
    C1 = monMACD > monMACD [ 1 ] AND monMACD < 0
    If C1 then
    aa = monMACD
    bb = 0
    cc = 0
    dd = 0
    endif
    C2 = monMACD > monMACD [ 1 ] AND monMACD > 0
    If C2 then
    aa = 0
    bb = monMACD
    cc = 0
    dd = 0
    endif
    C3 = monMACD < monMACD [ 1 ] AND monMACD < 0
    If C3 then
    aa = 0
    bb = 0
    cc = monMACD
    dd = 0
    endif
    C4 = monMACD < monMACD [ 1 ] AND monMACD > 0
    If C4 then
    aa = 0
    bb = 0
    cc = 0
    dd = monMACD
    endif
    
    Return  0 as " zero ",monMACD as "monMACD" ,  aa as " aa " , bb as " bb " , cc as " cc " , dd as " dd "
    
    // Variables:
    // p   =   8 = periode MMR
    // p1  =  17 = periode MML
    // aa = vert
    // bb = vert
    // cc = rouge
    // dd = rouge
    
    #14873 quote
    NickleB
    Participant
    New

    Hi Supertiti,

    thank you for the super indicator!!

    I’ll try and figure out what you did, the atttachment shows exactly what i wanted!!

    yours humblely

    NickleB

     

    humble

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

MACD histogram candle colours for high and low


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
NickleB @nickleb Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by NickleB
9 years, 3 months ago.

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