- Previous buffer element is i+1 not i-1. There is no [-1].
- Unfilled elements are set to EMPTY_VALUE (2147483647) unless you specify one.
- Don't double post
WHRoeder:
Thanks!
- Previous buffer element is i+1 not i-1. There is no [-1].
- Unfilled elements are set to EMPTY_VALUE (2147483647) unless you specify one.
- Don't double post

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,
I am building an indicator with discrete values (so that Buffer[i] could be defined and Buffer2[i] could not, but not in every iteration). To let them assume continue values I tell compiler to fill Buffer[i], when not defined, with Buffer[i-1]. My problem is that sometimes Buffer[i-1] is also undefined and then MetaEditor fills it with random value (e.g. 2848596949.293438). My question is, how tell the compiler "if Buffer[i-1] is a random filled number put 0 (or another value)"?
I hope to have been clear!
Thanks