Download MetaTrader 5
To add comments, please log in or register
Interessiert am Partnerprogramm MQL5.community? Veröffentliche Links und verdiene Geld damit!
Ingvar Engelbrecht
4412
Ingvar Engelbrecht 2014.09.27 18:02 

Works fine getting the 4 values.

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

Carl Schreiber
5966
Carl Schreiber 2014.09.27 19:20  

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)

Ingvar Engelbrecht
4412
Ingvar Engelbrecht 2014.09.27 20:44  
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.

?

Carl Schreiber
5966
Carl Schreiber 2014.09.27 21:04  
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...!

Ingvar Engelbrecht
4412
Ingvar Engelbrecht 2014.09.28 15:09  
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

/
To add comments, please log in or register