anyone that can help with that?
anyone that can help with that?
After the first tick when you have process all the bars you are then just processing one bar max, at this time and onwards what are the first 14 elements in array Buffer[] ? you are only updating the first element.
Try this . . .
Edit: file updated
After the first tick when you have process all the bars you are then just processing one bar max, at this time and onwards what are the first 14 elements in array Buffer[] ? you are only updating the first element.
Try this . . .
Edit: file updated
thanks so much for your reply. i totally missed that out!!!
although now it looks it is working, meaning it is drawing something and not a straight line, i dont think it draws what it should. Why?
Cause when i m eg in M1 TF and i go to M5 and then back to M1 TF the indicator totally changes. In order to double check that i saved the indicator under another name and i replaced the two while loops with the following:
while (i<=history)
and
while (vi<=history)
this way it keeps repainting all the bars again and again so i can check if the index .
Anyway i ll try to find out whats wrong... if you ve got any idea let me know
thanks once again
thanks so much for your reply. i totally missed that out!!!
although now it looks it is working, meaning it is drawing something and not a straight line, i dont think it draws what it should. Why?
Cause when i m eg in M1 TF and i go to M5 and then back to M1 TF the indicator totally changes. In order to double check that i saved the indicator under another name and i replaced the two while loops with the following:

- 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 ve got the following code that is trying to make an MA out of the C-L calculation. My main problem is tha:
When i first place the indicator it is drawn fine. But after it it starts drawing a straight line... cant really figure out why.
Here is some snapshots.

Pic A when i first place the indicator:
after a few minutes on the M1 timeframe... you can clearly see the straight line i m talking about .. that keeps like that forever
here is the code.. if anyone could have a look... thanks