SQX137 Final, Stockpicker, If using SL, SQX is skipping a lot of trades

Hi,

 I found a serious bug in SQX Stockpicker in the strategy is using SL.


 I noticed the problem during my comparison of live trading vs. SQX Backtest.

 

PROBLEM:

SQX is skipping a lot of trades (about 50%)  informing (not correctly) in the log, by such signals that SL/TP was hit during the day.

 

Please follow these steps to find this case:

  

  1. My strategy is using 1 ATR for SL and 3 ATR for PT (scr of strategy rules).

  2.  In the SQX log (attached) I see a clear message "Order with symbol ZS.D was closed on SL/PT during the day, cannot open a new position on Open."
    SQX has not registered any trade for this ticker this day.

  3. In reality, the trade existed, SL was placed OK (1 ATR), and SL hit was OK two days after. I visualized this trade on the Trading View Screen.

  4. In my Alpaca paper trading account, I have ~2x more trades in this strategy than in the backtest in the same period (74 AC vs 41 SQX) which confirms that SQX is skipping large part of trades. 

  5. In the SQX Log, I see a lot of situations "Order with symbol ZS.D was closed on SL/PT during the day, cannot open a new position on Open.", and trades are not registered - see the log file.

  6. I have many other cases from my comparison to test from 01.07 till 16.08 ("Comparision of trades" screen").

 This may be a continuation of this topic:

https://roadmap.strategyquant.com/tasks/sq4_010183


Best regards,

Michal


Attachments
Trading View.png
(124.90 KiB)
Comparision of trades.png
(295.88 KiB)
SQX Log scr.png
(262.80 KiB)
Strategy rules.png
(79.47 KiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

m
#1

Michal

24.08.2023 13:28

Task created

m
#2

Michal

24.08.2023 13:29

Attachment image-2.png deleted

m
#3

Michal

24.08.2023 13:40

Description changed:

Hi,

 I found a serious bug in SQX Stockpicker in the strategy is using SL.


 I noticed the problem during my comparison of live trading vs. SQX Backtest.

 

PROBLEM:

SQX is skipping a lot of trades (about 50%)  informing (not correctly) in the log, by such signals that SL/TP was hit during the day.

 

Please follow these steps to find this case:

  

  1. My strategy is using 1 ATR for SL and 3 ATR for PT (scr of strategy rules).

  2.  In the SQX log (attached) I see a clear message "Order with symbol ZS.D was closed on SL/PT during the day, cannot open a new position on Open."
    SQX has not registered any trade for this ticker this day.

  3. In reality, the trade existed, SL was placed OK (1 ATR), and SL hit was OK two days after. I visualized this trade on the Trading View Screen.

  4. In my Alpaca paper trading account, I have ~2x more trades in this strategy than in the backtest in the same period (74 AC vs 41 SQX) which confirms that SQX is skipping large part of trades. 

  5. In the SQX Log, I see a lot of situations "Order with symbol ZS.D was closed on SL/PT during the day, cannot open a new position on Open.", and trades are not registered - see the log file.

  6. I have many other cases from my comparison to test from 01.07 till 16.08 ("Comparision of trades" screen").

 This may be a continuation of this topic:

https://roadmap.strategyquant.com/tasks/sq4_010183


Best regards,

Michal


Attachment SQX Log.txt added

SQX Log.txt
(84.70 KiB)
E
#4

Emmanuel

25.08.2023 01:23
Voted for this task.
TT
#5

Tamas

31.08.2023 10:51
Hello, thanks for reporting the bug. I was able to reproduce it. It is fixed.


I will send you a new SQX build next week.


Sincerely,

Tamas


UPDATE: Is there any other important task related to Stockpicker which needs to be fixed ?

m
#6

Michal

31.08.2023 11:19
Hi Tamas,


Thanks for a fast fix :)

I see now two tasks:


1. https://roadmap.strategyquant.com/tasks/sq4_010384
2. https://roadmap.strategyquant.com/tasks/sq4_010379


Best regards,

Michal

m
#7

Michal

12.09.2023 17:16
Hi Tamas,


How about a new Dev build?
>I will send you a new SQX build next week.


Best regards,

Michal

TT
#8

Tamas

18.09.2023 09:20
Hello, sorry for the delay. Here is the link with all the fixes related to Stockpicker engine 

https://cdn.strategyquant.com/install/sq/137/SQX_137_final_win_20230912.zip


Sincerely,

Tamas


Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please