Page 2 of 2

Re: EMA went crazy

Posted: Mon Dec 11, 2023 3:45 pm
by Khan
Don't worry about it; this looks like an edge case and like I said I'm not in a hurry. I did not start a new backtest because I want to keep going, so that's kinda on me and it is going okay even with the bug.

My GMT offset surely has an effect because I noticed that EMA becoming zero bug now mostly happens at 22:00 and 23:00, which are the last two candles of a day and the next day starts at 03:00. You might want to look at whether there is really a 3 hours gap in the data. It might be that the code is skipping 3 hours due to the GMT offset.

Edit:
chart.png
chart.png (38.07 KiB) Viewed 18826 times
I marked the bugged candles - they are all 22:00 candles. You can see the bugged EMA below them.

Backtest attached. This time I missed the bugged candle but you can rewind and see for yourself.

Re: EMA went crazy

Posted: Thu Dec 14, 2023 11:23 am
by Khan
Here's another backtest file with the same bug.

Same pair and same settings, except I dropped down to M5 for my trading. Step size is still M1.
chart.png
chart.png (37.83 KiB) Viewed 18621 times
Backtest file is at this point, where everything is normal.
chart_bug.png
chart_bug.png (23.95 KiB) Viewed 18621 times
Step forward 5 times to close the candle and you'll see this.

Re: EMA went crazy

Posted: Thu Dec 14, 2023 3:06 pm
by NakedMarkets
Hi Khan,

Thanks for your backtest file and your post,
This bug has been identified and has been (hopefully) patched definitively.
The update including the fix should be release this week-end,
We will give more details on this bug when released,

Again, thanks a lot for your help and sorry for the inconvenience !

Re: EMA went crazy

Posted: Mon Dec 18, 2023 5:38 pm
by Admin
Thanks for your report, this bug has been fixed in the last update.
For information, the bug was triggered by some specific conditions in the data gap, when displaying the candle in progress with GMT shifting.
Indeed, when a data gap occured, with a hole in the M30 data but not in the H1 data (due to the GMT shift as an example), the value of the last candle in progress (with the step lower than the chart timeframe) was wrong.
It was displayed only during this short period of time.
For information, if you refreshed your chart (by selecting the same timeframe), the next minute was fixing the issue.

Again, we are very sorry for missing the complete fix the first time, the issue was a bit more complex and unusual than expected.
Now, your backtest file is used in our unit tests to ensure that this bug will never come back.

Thanks !

Re: EMA went crazy

Posted: Tue Dec 19, 2023 8:55 am
by Khan
Understood, thanks. No need to be sorry; it was an edge case.

Just a note: time remaining on the candle bug is still there - yesterday I saw 4 hours remaining on a M5 candle. I'll hopefully catch it and create a new bug report.

Thanks for the effort and the numerous bug fixes with the latests release!