Download MetaTrader 5

Heiken Ashi.mq4 Histogram

To add comments, please log in or register
paul williams
35
paul williams  

trying to figure out how the Heiken Ashi histogram actually works?

any help appreciated.

Carl Schreiber
7087
Carl Schreiber  
Have a little look into the source code?
paul williams
35
paul williams  
ok thanks. yes had a look but just can't figure out what's happening. any clues appreciated.
whroeder1
15556
whroeder1  

Histograms work in pairs

#property indicator_color1 LIGHT1
#property indicator_color2 DARK1
#property indicator_color3 LIGHT2
#property indicator_color4 DARK2

double RangeWickUp[],    RangeCandleUp[],
       RangeWickDown[],  RangeCandleDown[];

SetIndexBuffer(0,RangeWickUp);      SetIndexStyle(0,DRAW_HISTOGRAM,0,1);
SetIndexBuffer(1,RangeWickDown);    SetIndexStyle(1,DRAW_HISTOGRAM,0,1);
SetIndexBuffer(2,RangeCandleUp);    SetIndexStyle(2,DRAW_HISTOGRAM,0,3);
SetIndexBuffer(3,RangeCandleDown);  SetIndexStyle(3,DRAW_HISTOGRAM,0,3);

O < C
RangeWickUp[shift2] = high;                  L1    H        L1
RangeWickDown[shift2] = low;                 L1             L1
                                                   Body  L2 L2 L2
                                                   Body  L2 L2 L2
RangeCandleUp[shift2] = bodyHigh;            L2             L1
RangeCandleDown[shift2] = bodyLow;           L2    L        L1

O > C
RangeWickDown[shift2] = high;                D1    H        D1
RangeWickUp[shift2] = low;                   D1             D1
                                                   Body  D2 D2 D2
                                                   Body  D2 D2 D2
RangeCandleDown[shift2] = bodyHigh;          D2             D1
RangeCandleUp[shift2] = bodyLow;             D2    L        D1
To add comments, please log in or register