done, sry.
no one can help me?
double iHigh[i] = iHigh("",0,i); double iLow[i] = iLow("",0,i); return(Print(findMaximum));
- Start with code that compiles.
- Use a real symbol name or NULL, "" isn't either.
- How can you use ArrayMaximum when you are still filling an array?
- Don't bump your posts.
double range(int bars) { double highest = High[iHighest(_Symbol,_Period,MODE_HIGH,bars)]; double lowest = Low[iLowest(_Symbol,_Period,MODE_LOW,bars)]; return highest-lowest; }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi all,
I try write function in my EA which find maximum range (in points) for last (for example) 5 bars. But my code always return NULL.
What I can:
Get High and Low values for current bar (and bar[1],bar[2],bar[3],...), calculate range and convert to points.
Create array of (last 5) ranges and find maximum value (probably ArrayMaximum).
My code:
Where I have error?