Signal / Indicator for same thing create different trading history

Please see the attached two files. It's the same algo, but one is using SQ signals and the other is using SQ indicators + operators (is falling/rising).



They return different trade results, but the same number of trades. I suspect the shift is working differently between the two. I further suspect the shift is incorrect with the Indicator + Operator combo (adding an additional index to the shift). I actually confirmed this to be true with my own custom programming.


Thanks!

Attachments
MACDMainLineFallingIndicator.sqx
(44.42 KiB)
MACDMainLineFallingSignal.sqx
(44.10 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

RH
#1

rhartstein

26.01.2021 00:21

Task created

h
#2

hankeys

26.01.2021 07:09
IS RISING is the same as IS RISING for 2 bars?


i think that IS RISING only means, that its rasing only on 1 candle


what is the logic behind the "IS RISING" condition?

RH
#3

rhartstein

26.01.2021 10:47
I believe it's for 2 bars. The issue isn't that the signal fires; the issue is the candle on which the trade is beginning. I have two identical scenarios (one created with a signal, one with an indicator + operator) that do the same thing; but the trade is beginning on different candles.
TB
#4

Tomas Brynda

02.03.2021 18:35

Status changed from New to Fixed

Hi Rhartstein,

each of the two conditions have a slightly different meaning. Let's take a look:


MACD(12,26,9).Main[1] is rising -> Is rising block has shift = 1, This way this condition is true if MACD(12,26,9).Main[3] < MACD(12,26,9).Main[2]


MACD(12,26,9).Main is rising -> This whole block has also a shift = 1, but there is no additional shift in the internal MACD indicator, so the condition is true if MACD(12,26,9).Main[2] < MACD(12,26,9).Main[1]


You will get the exact same results if you set the shift in the first example to zero -> MACD(12,26,9).Main[0] is rising


Best regards,

Tomas


Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please