Built-in trailing stop is frequently ignored.

(please note the upload order of the images does not represent the image #)
As the title says: Built-in trailing stop is frequently ignored.
It doesnt matter if you use the built-in ATR trailing stop, or a price level like "Lowest[X]", there will be trades in the backtest that arent executed as they should. 
Here as some screenshot examples-
We'll start with 3* ATR[14] as our test. 
(see image-0)



Typical set of losses produced by this. Normal behavior:
(see image-1)
Normal behavior win:
(see image-2)


Now here are some bug examples:
This should have probably have been a loss taken as the price greatly exceeded our ATR trail stop, but the backtest keeps the trade open for many days without taking a loss.
(see image-3)

Using the bottom trade navigation, I can visually see trades that remained open too long. So the bug has a high frequency of occurrence. It makes backtesting using stops/trailing stops unreliable.
(see image-4)


Other details: 
I'm backtesting in Algowizard (SQx)
1 minute tick simulation
This bug is repeatable using a variety of trailing stop methods on any data. 
I regard this bug as urgent.


Thank you SQ team for looking into this. I appreciate you.
Any additional information required, just ask me. I'll monitor this topic.

Attachments
image-0.png
(32.29 KiB)
image-1.png
(127.51 KiB)
image-4.png
(138.21 KiB)
image-2.png
(97.10 KiB)
image-3.png
(139.48 KiB)
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

t
#1

Threshold

07.09.2022 09:55
I think this is may be caused when there trail stop is not set because price did not move beneficially to trigger it. So it might be more of me not understanding the trail stop mechanics, than a bug. I fixed this by making a stop loss that uses the same settings as the trail stop as an extra safety.
Dw
#2

Diwi

07.09.2022 09:55
Voted for this task.
g
#3

Lee Guan Chuan

07.09.2022 11:09
Hi Threshold,


Yes. The trailing stop will only be triggered when the price moves beneficially. 


For example, if you entered a BUY trade with a price 1.00321, the trailing stop will be started when the price is above 1.00321.


If you set a stop loss, the stop loss will remain the same until the price goes above 1.00321, and the trailing stop will move the stop loss higher.


Thank you.

g
#4

Lee Guan Chuan

07.09.2022 11:10

Status changed from New to Fixed


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