
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 guys,
I'm learning about indicators and wanna do a simple one, but i'm having problems in the loop logic. I know it is wrong but can't fix it.
Here is the indicator's ideia: He calculates a simple moving average of close price then returns the value of SMA[6]-SMA[1]. The plot will be the result of SMA[6]-SMA[1] only.
I've already tried to do 2 diferent plots with a shift of 6 and 1, but the shift is only visual the return value is the same for both, resulting in SMA[6]-SMA[1] = 0
Any ideias how to do the correct loop?
Sorry for the bad english :)