Accessing Heiken Ashi with iCustom

 

Works fine getting the 4 values.

I would also like to know when the bar switches color, How do I determine that?

 

Look at the code:

      if(haOpen<haClose)
        {
         ExtLowHighBuffer[i]=haLow;
         ExtHighLowBuffer[i]=haHigh;
        }
      else
        {
         ExtLowHighBuffer[i]=haHigh;
         ExtHighLowBuffer[i]=haLow;

either "Low/High-Buffer" [0] > "High/Low" [1] (red)  or "Low/High-Buffer" [0] < "High/Low"[1] (white)

 
gooly:

Look at the code:

either "Low/High-Buffer" [0] > "High/Low" [1] (red)  or "Low/High-Buffer" [0] < "High/Low"[1] (white)


  Thanks gooly.

 Could you possibly formulate it using a less confusing denomination. Like:

 high wick, low wick, high body, low body since those are the values I get from iCustom.

?

 
ingvar_e:

  Thanks gooly.

 Could you possibly formulate it using a less confusing denomination. Like:

 high wick, low wick, high body, low body since those are the values I get from iCustom.

?

No!

Look at the MarketWatch "Low/High" and "High/Low" are the labels of the first two values of this indicator and to access them you you have to use 0 and 1.

Then just: if ( iCustom(.. 0,i) > iCustom(.. 1,i) ) { // red

What else can I say?

There are only 4 values...!

 
gooly:

No!

Look at the MarketWatch "Low/High" and "High/Low" are the labels of the first two values of this indicator and to access them you you have to use 0 and 1.

Then just: if ( iCustom(.. 0,i) > iCustom(.. 1,i) ) { // red

What else can I say?

There are only 4 values...!



 Looking deeper I see what got me confused.  The returned values  refer to different parts of the candle depending on if it is an up candle or a down candle.

 p1 > p0   up  candle     p0  =  p2   shaved bottom

 p1 < p0   down candle  p0  =  p2   shaved top 


Thanks goly

Reason: