angevoyageur:
CopyHigh and CopyLow can return less than N value. You have to check the returned value of both functions.
What's the limitation ? Since I'm trying to optimize ...
CopyHigh and CopyLow can return less than N value. You have to check the returned value of both functions.
blouf:
What's the limitation ? Since I'm trying to optimize ...
What's the limitation ? Since I'm trying to optimize ...
Try to use something like this:
(if you need at least "N" bars then you should skip these results)
int limit=MathMin(N,ArraySize(ArrayHigh)); for(int i=0; i<limit; i++)
lost89:
Try to use something like this:
(if you need at least "N" bars then you should skip these results)
Great ! thanks Lost ! I don't need to do it also with arraylow, supposing it should be the same thing ... right ?
blouf:
Great ! thanks Lost ! I don't need to do it also with arraylow, supposing it should be the same thing ... right ?
Yes, it should be the same but you can do the this:
int limit=MathMin(N,MathMin(ArraySize(ArrayHigh),ArraySize(ArrayLow)));
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, here's a code :
With the error I running a test :
Any help would be very appreciate !