QuoteDislikedHigh price above haClose. The haHigh is the maximum.
Meaning: Maximum(haClose, Minimum(High, haHigh)) ?
For a blue candle this would mean the Low or haLow below the haOpen?
What I still don't understand is how a red wick would be determined on a blue candle.
I believe the red hi wick on a blue candle would indicate that the highest low exceeded the haClose. In otherwords the haClose went down but did not go lower than the haOpen (blue candle, red hi wick).
What do you mean here by the highest low?
Follow up above.
Thanks for your replies!
The reason I am getting specific is because I am comparing to the actual code that generated this indicator (posted above in this thread) and I don't see any calculations that match this. [Again, I am coding this in TS so it is the specific calculations and logic for the way the bar is painted that matter to me].
If someone could look at the code below, and can explain to me how the painting logic works, I think that is the missing key for me.
Specifically looking at just the points being painted:
NOTE: I only included the painting logic - not the HA calculations - just trying to keep it simplified.
Inserted Code
//---- indicators IndicatorBuffers(8); SetIndexStyle(0,DRAW_HISTOGRAM, 0, 1, Red); SetIndexBuffer(0, ExtMapBuffer1); SetIndexStyle(1,DRAW_HISTOGRAM, 0, 1, RoyalBlue); SetIndexBuffer(1, ExtMapBuffer2); SetIndexStyle(2,DRAW_HISTOGRAM, 0, 3, Red); SetIndexBuffer(2, ExtMapBuffer3); SetIndexStyle(3,DRAW_HISTOGRAM, 0, 3, RoyalBlue); SetIndexBuffer(3, ExtMapBuffer4); //---- SetIndexDrawBegin(0,5); //---- indicator buffers mapping SetIndexBuffer(0,ExtMapBuffer1); SetIndexBuffer(1,ExtMapBuffer2); SetIndexBuffer(2,ExtMapBuffer3); SetIndexBuffer(3,ExtMapBuffer4); SetIndexBuffer(4,ExtMapBuffer5); SetIndexBuffer(5,ExtMapBuffer6); SetIndexBuffer(6,ExtMapBuffer7); SetIndexBuffer(7,ExtMapBuffer8); if (haOpen<haClose) { ExtMapBuffer7[pos]=haLow; ExtMapBuffer8[pos]=haHigh; } else { ExtMapBuffer7[pos]=haHigh; ExtMapBuffer8[pos]=haLow; } ExtMapBuffer5[pos]=haOpen; ExtMapBuffer6[pos]=haClose; pos--; } int i; for(i=0; i<Bars; i++) ExtMapBuffer1[i]=iMAOnArray(ExtMapBuffer7,Bars,MaPeriod2,0,MaMetod 2,i); for(i=0; i<Bars; i++) ExtMapBuffer2[i]=iMAOnArray(ExtMapBuffer8,Bars,MaPeriod2,0,MaMetod 2,i); for(i=0; i<Bars; i++) ExtMapBuffer3[i]=iMAOnArray(ExtMapBuffer5,Bars,MaPeriod2,0,MaMetod 2,i); for(i=0; i<Bars; i++) ExtMapBuffer4[i]=iMAOnArray(ExtMapBuffer6,Bars,MaPeriod2,0,MaMetod 2,i);
I have come close in TS but it is not quite right - and I know my logic is flawed in drawing the bar.
Any insight (or even pointing to documentation) would be much appreciated (but I don't have Metatrader - using TS).
Thanks again!