Login Page - Create Account

Support Board


Date/Time: Sun, 28 Apr 2024 17:18:35 +0000



Differences while calculating moving averages (backtest, historical, replay)

View Count: 457

[2020-06-24 18:17:37]
DonMattez - Posts: 8
Hello all,

I noticed a difference in the calculation of the moving averages when the custom study is used during system backtests, recalculation and replays.

The following code is beeing used:

int MAlen;
//MAlen used with 400, 100, 50
sc.SimpleMovAvg(sc.Close, sc.Subgraph[1], MAlen());
float MAVal = sc.Subgraph[1][sc.Index];

These are the results:

Backtest: 2876,18188  Difference to Backtest: 0
Recalc: 2876,17627  Difference to Backtest: -0,00561
Replay:   2876,17627  Difference to Backtest: -0,00561

Sometimes the value during replay is the same as during the backtest, sometimes the same as during recalculation and sometimes its completely different.
I tried it with various sizes of MALen, the smaller the numbers the higher the difference.

Du you know why this is happening and how to prevent this?

Thank you in advance.
[2020-06-24 19:15:33]
Sierra Chart Engineering - Posts: 104368
This might be the result of a recent optimization done. it is hard to say because there is so much analysis and testing that has to be done. You are only providing an extremely limited amount of information. We will look into this. We want you to test this in the next release to see if it resolves the problem.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2020-06-24 19:26:31

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account