int found; int i; double zz; int ExtDepth =12 int ExtDeviation = 5; int ExtBackstep =5; double ZZ[10]; while(found<10) { if(i > Bars - 1) break; zz = iCustom(Symbol(),Period(),"ZigZag",ExtDepth,ExtDeviation,ExtBackstep,0,i); if( zz != 0) { ZZ[found] = zz; found++; } i++; }
Put last 10 zz into array. Maybe that helps.
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
Hello,
I want to get calculated values from the Zigzag indicator.
My code looks like this:
Now my problem is that the copy operation causes bad performance, because the method will be called in the OnTick() method.
Furthermore, I am dependent on the size variable, because I might not get X zig zag values from Y bars, which will cause an ArrayOutOfBound exception.
Any ideas how I can make this more dynamic (without the size variable) and faster?
Thanks in advance.