Stockpicker SL, Two problems

Hi,

I noticed 2 problems by testing strategies with SL.
You can notice it in any stockpicker and single assets strategy if you use tight SL.

Problem 1:
If Open [0] is below SL which was set before, the loss in results is counted to the SL level instead to the Open [0] level.

Few examples on the screens (Problem 1 A, B, C)

Problem 2:
If SL was riched in the Entry candle, SQX is not showing it. 

Example on the screen (Problem 2, A). 

Possible solution:
In stockpicker, we always set the Entry orders on Open or on Close.
In my opinion, all Limit or Market orders can be easily fixed, because we always know, that if the price will hit our limit/market order in the same candle the SL Order then it is in this exact sequence.

The only problem can occur with Stop Orders because we don't know what was the first hit Stop Order or SL in one candle.
We can not know it without looking inside the Daily candles then maybe better to assume a negative scenario (SL was hit) instead of a positive one like today?

"Wonderfull" strategy is attached ;) It is simply to notice problems on the chart choosing one stock to test.

Best regards,
Michal


Attachments
SQX Settings.png
(188.07 KiB)
Sample_Limit_SL.sqx
(105.05 KiB)
Problem 2 A.png
(129.17 KiB)
Problem1 A.png
(167.07 KiB)
Problem 1 C.png
(153.87 KiB)
Problem1 B.png
(125.91 KiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

m
#1

Michal

29.05.2023 13:42

Task created

E
#2

Emmanuel

29.05.2023 16:52
Voted for this task.
TT
#3

Tamas

02.06.2023 12:39

Status changed from New to In progress

TM
#4

tmatejka.

02.06.2023 15:17

Hello,


we have addressed both situations

1) if the market opens below sell stop or above buy stop price the order will be filled at Open[0] price

2) if a trade is entered using a market / limit order while also using a stop-loss order only, the SL order will be filled on the same day if the day range hits stop-loss price level. As you mentioned this situation is easily evaluated


These changes will be incorporated into the next SQ137 RC4 public update we plan to release next week likely

Thank you for your contribution!

TT
#5

Tamas

05.06.2023 08:39

Status changed from In progress to Fixed

m
#6

Michal

22.06.2023 19:05

Attachment case1.png added

Attachment case2.png added

Attachment case3.png added

case1.png
(112.57 KiB)
case2.png
(173.50 KiB)
case3.png
(212.45 KiB)
Hi Tamas, I see your changes. It helped a lot to reproduce SL reality. Thanks for that :)

My only concern is the scenario on the screens.  I see that if the SL is reached in the Entry candle it is shown on the next one.
Is it ok? 

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