Download MetaTrader 5

How to get the lowest price?

To add comments, please log in or register
Baptiste George
528
Baptiste George  

Hi,


I don't understand the example given by documentation.


How to get the lowest price from the last 100 bars? The Lowest price will be updated while chart progresses.


Please help.

regards

Baptiste George
528
Baptiste George  

is it?

double val=Low[iLowest("My_Pair","my_timeframe",MODE_LOW,100,0)];
 

Keith Watford
Moderator
10615
Keith Watford  
FrenchyTrader:

is it?

double val=Low[iLowest("My_Pair","my_timeframe",MODE_LOW,100,0)];


Yes, but what are My_Pair and my_timeframe?

Low[shift] will only return the value for the chart symbol and the shift on the current timeframe. If My_Pair and my_timeframe are not the current chart and/or timeframe, you will need to use iLow()

double val=Low[iLowest(Symbol(),0,MODE_LOW,100,0)];

//or

double val=iLow(My_Pair,my_timeframe,iLowest(My_Pair,my_timeframe,MODE_LOW,100,0));
Baptiste George
528
Baptiste George  
GumRai:

Yes, but what are My_Pair and my_timeframe?

Low[shift] will only return the value for the chart symbol and the shift on the current timeframe. If My_Pair and my_timeframe are not the current chart and/or timeframe, you will need to use iLow()


THANK YOU : )
To add comments, please log in or register