DownloadStrangely repainting indicator

1
Hello dear friends,
with my limited coding knowledge i created an indicator based on the simple and standard MACD.
Now the problem is that, as far as I know, the macd does not repaint ( it changes its main and signal values only on the current candle ).
But for some reason, my indicator does repaint.
And the strange thing is that if i use any of its buffers with icustom on another indicator and with the original one also loaded on the chart, they behave differently.
May the reason be that i am using iMAOnArray?
Try to load the indicator on a chart, let it run for a few bars and then load it again and you will see the difference.

I attach the source code, the indicator is free to use to anyone, but if you find the reason why it repaints i would be really grateful.

Happy weekend to you all :)


Re: Strangely repainting indicator

3
wojtek wrote: Sat Aug 13, 2022 5:53 am One of the reasons for repainting could be that the 'uptrend' and 'downtrend'
variables should be buffers (double) taking two values, e.g. +/- 1.
Thanks for the tip, but what i noticed is that the buffer1 ( the ma of the histogram ) does not refresh during the current candle. I believe this might be the reason, i just can't figure out a way to make it refresh during the current candle


Who is online

Users browsing this forum: ASki and 10 guests