-2

I would like to find out the lowest traded price in the past 50 candles. I've used the following code.

double Lowest_Low = iLowest(_Symbol,PERIOD_CURRENT,MODE_LOW,50,0);

I've tried using -50, but it does not give me the lowest price on the chart.

PaulB
  • 1,262
  • 1
  • 6
  • 17

1 Answers1

0

You're using the iLowest function incorrectly. This function returns the shift of the lowest value over a specific number of bars. You need to combine it with iLow to get the value, as follows:

double Lowest_Low = iLow(NULL, 0, iLowest(NULL, 0, MODE_LOW, 50, 0));
PaulB
  • 1,262
  • 1
  • 6
  • 17