In your previous thread, I gave you a solution to correctly calculate the LSMA (using moving averages), and to properly use the Moving Average calculation functions, and to use the proper OnCalculate form for the applied price.
I dedicate my own time, to write that indicator, specifically for you, so that you could learn from it. However, it seems you have totally ignored my advice and my code, and as a result you continue to have difficulties.
What is the use of us offering help, or showing you proper code, if you are are just going to ignore it all?
In your previous thread, I gave you a solution to correctly calculate the LSMA (using moving averages), and to properly use the Moving Average calculation functions, and to use the proper OnCalculate form for the applied price.
I dedicate my own time, to write that indicator, specifically for you, so that you could learn from it. However, it seems you have totally ignored my advice and my code, and as a result you continue to have difficulties.
What is the use of us offering help, or showing you proper code, if you are are just going to ignore it all?
Let me explain to you, the previous thread you help me and show me your code, but i dont know how to develop my ideal with it because it fundamental. My ideal is build an MA line and LSMA line base on the previous indicator's data. I tried to combine them with your way but it doesn't work and i dont know how to do that. Remember, I always appriciate your kindness, i dont ignore your code but also base on it. I hope you understand me.
In your previous thread, I gave you a solution to correctly calculate the LSMA (using moving averages), and to properly use the Moving Average calculation functions, and to use the proper OnCalculate form for the applied price.
I dedicate my own time, to write that indicator, specifically for you, so that you could learn from it. However, it seems you have totally ignored my advice and my code, and as a result you continue to have difficulties.
What is the use of us offering help, or showing you proper code, if you are are just going to ignore it all?
i sympathize with you, in that case i would be unsatisfied with it
I found the way to solve this problem for anyone else later has a similar issue
Just add this line into OnCalculate() function...
ChartSetSymbolPeriod(0, _Symbol, _Period);

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, i am trying to learn to program indicator and EA. My indicator doesnt work well, it doesn't auto update the new price except i refresh chart or recompile.
I dont know why. When the new candle generated, LSMA indicator (the red one) is falling down at 0 value. Can anyone point me in the right direction or how to fix it? I dont really want to make these noob mistakes again and I would highly appreciate it!
I have attached images below.
My code here: