Some indicators show different results when loading and viewing a chart later
Some indicators show different results when loading and viewing a chart later
10 Dec 2019, 12:16
HI everyone:
I've noticed that some indicators show different results when viewing a chart, then closing down cTrader, coming back later, restarting cTrader, and viewing the exact same chart.
I've seen it before with the PSARs; and just today, saw it again with a SuperTrend line. So i've taken a screen capture of this to show. Scroll to the right and you'll see the difference in the lines. The one on the left was a chart in demo that I traded with. I took a capture of the losing trade to look at later.
So I closed down cTrader, came back about an hour later, reloaded the same chart to have a look, and you can see the difference in the lines.
I've seen this happen with PSARs too, but know SpotWare is currently trying to fix a bug with those.
Anyway, why does this happen?
Replies
firemyst
10 Dec 2019, 14:38
RE:
PanagiotisCharalampous said:
Hi firemyst,
Supertrend is a custom indicator and if you are using the one available in the forum, it has a lot of defects. This is one of them.
Best Regards,
Panagiotis
If I post the code would you be able to have a quick look and see what the problem is? I'd like to know how I can alter the code to overcome this defect. Or at least what's causing it and why it happens.
@firemyst
PanagiotisCharalampous
10 Dec 2019, 14:47
Hi firemyst,
I have checked this is the past and it seems to be an issue with the way the values are calculated for each bar in the real time and what happens when some ticks are missed. I haven't tried to solve it but I would try to recalculate the value of each closed bar when the bar changes and the OHLC data for the previous bar is finalized.
Best Regards,
Panagiotis
@PanagiotisCharalampous
firemyst
10 Dec 2019, 14:54
RE:
PanagiotisCharalampous said:
Hi firemyst,
I have checked this is the past and it seems to be an issue with the way the values are calculated for each bar in the real time and what happens when some ticks are missed. I haven't tried to solve it but I would try to recalculate the value of each closed bar when the bar changes and the OHLC data for the previous bar is finalized.
Best Regards,
Panagiotis
Thanks @Panagiotis.
That gives me a good starting point.
@firemyst
PanagiotisCharalampous
10 Dec 2019, 12:19
Hi firemyst,
Supertrend is a custom indicator and if you are using the one available in the forum, it has a lot of defects. This is one of them.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous