
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
Write an example how you can use SimpleMA function to smooth an array of 100 elements... Please...
To do this you need count+period number of input elements, where count-number of output elements, period-period of averaging.
You need 100+100=200 input elements.
Thank you! I'll write now...
Don't be, it was a joke because of the absurdity of your queries.
there was no banter.
the situation is correct - there are 100 elements. and you need to calculate their arithmetic mean.
That function doesn't allow you to do that.
You need to correct period (highlighted in the code) to (period-1)... That's all... Look at LinearWeightedMA() in the same file, it's correct. Obfuscation :)
Do I correctly understand that when working with an indicator handle, its data is pre-calculated for the entire timeframe history, even if I will then copy only a part of it for myself?
If my guess is correct, then how can I avoid wasting resources? Using iCustom() to connect a modified standard indicator, in which the essence of modification reduces to the initial restriction of buffer data processed? Or apply even more brute force - to set the limit of the number of bars in the terminal settings? Or some other way?