SQ_IsRisingD not working in Multicharts, causing massive backtest deviations

Hello!

The function "SQ_IsRisingD" in Multicharts is not working as intended, see attached example strategy. The backtest results in Multicharts are showing strong deviations from the backtest results in SQX. I also found the reason for this. As far as I undertand, "SQ_IsRisingD("LowD", 2, 13, true, 1)" should shift the whole indicator by shift = 1 day. However, it seems it only shifts by 1 bar (= 1 hour) instead. I found that replacing "SQ_IsRisingD("LowD", 2, 13, true, 1)" by "SQ_IsRising(LowD(2), 20, true)" fixes the problem (13 bars indicator value + 7 bars per day for shift of one day) and backtests are aligned afterwards.



Could you please review and fix the issue with this function?

Attachments
V_1H_0120157.sqx
(49.48 KiB)
  • Votes +3
  • Project StrategyQuant X
  • Type Bug
  • Status New
  • Priority Normal

History

TK
#1

t.kissels@outlook.de

14.02.2022 16:06

Task created

TK
#2

t.kissels@outlook.de

14.02.2022 23:18
Voted for this task.
E
#3

Emmanuel

21.02.2022 09:20
Voted for this task.
NF
#4

giantj

25.03.2022 22:33
Voted for this task.
TB
#5

Tomas Brynda

31.03.2022 16:00
Hi,

we already know about this problem. It is also stated in our Best practices doc -> https://strategyquant.com/doc/strategyquant/best-practices-for-multi-tf-strategies-backtesting-and-trading/

We will try to get this issue fixed in build 136.


Best regards,

Tomas



Votes: +3

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please