Parameters:
Sample:
// calculating the lowest value on the 10 consequtive bars in the range |
Where you see Price_Low or Price_High ?
thank you very much for your quick reply. I see what is wrong :D that's stupid. . .well...only the fact that is sometimes worked and sometimes not made me think it might be a bug. Well...great, now I know why it doesn't work :)
Take care.
EDIT: Yeah...now it works, thanks a lot.
RTFM
Parameters:
Sample: // calculating the lowest value on the 10 consequtive bars in the range |
Where you see Price_Low or Price_High ?
I would like to get the Lowest value of the bars between bar 7500 and bar 8000 of the EA. My current bar is Bar 8000, therefore I need to get the Lowest value of the PREVIOUS 500 bars. I tried double val=Low[iLowest(NULL,0,MODE_LOW,500,500)]; double val=Low[iLowest(NULL,0,MODE_LOW,500,0)];double val=Low[iLowest(NULL,0,MODE_LOW,500,8000)];double val=Low[iLowest(NULL,0,MODE_LOW,8000,500)];
Please help, I can't get this to work!!!
RTFM
Parameters:
Sample: // calculating the lowest value on the 10 consequtive bars in the range |
Where you see Price_Low or Price_High ?
If you want to get the Lowest value of the bars between bar 7500 and bar 8000 of
the EA and current bar is Bar 8000,use
double val=Low[iLowest(NULL,0,MODE_LOW,500,7500)];It search from bar with index 7500 towards to bar with index 8000 (7500+500).
See documentation and 'please help with finding candle body high and lows in a range.'
Hi Roch,
Still not working. Please look at the attached document.
int start()
{
static int shift;
double val;
if((Bars>=7250)&&(shift == 0))
{
shift = Bars;
val = High[iHighest(NULL,0,MODE_HIGH,46,7204)];
Print("val ",val);
}
}
// the end.
The value returned is 0.9581 instead of 1.2337
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
recently I experienced sth really strange while programming an EA. The thing is that I set the stop like this
OK...well that searches for the lowest LOW in the last 3 bars (for a BUY)
Attached a screenshot what it looks like. The only problem is that I think the iLowest function is buggy: See, in the first case it sets the stop correctly (the lowest point in the last three bars), in the second case, however, it doesn't set it correctly, it claims the that the lowest point is the LOW of the one bar with the arrow but it should be the bar directly before (one after the one with the arrow).
MT4Developers, Could you please have a look and tell me if I am right and iLowest doesn't work as it should or if I am just doing sth. wrong?