fbertram/TuringTrader

Trailing stop order?

Opened this issue · 1 comments

mw66 commented

Did a quick grep, but didn't find Trailing stop orders.

Just wondering can this be added?

Thanks.

Hello @mw66 ,

The way things stand, TuringTrader does not have trailing stop orders. TuringTrader's orders are only valid for a single bar, so you could mimic the behavior by issuing a new and adjusted stop order on each bar.

This is not exactly the same as a trailing stop that adjusts intra bar. Because TuringTrader mainly operates on daily OHLCV bars, one would need to make a lot of assumptions regarding the path the stock price took over the course of the day. It is unclear to me which assumptions we could make that would satisfy the majority of users.

You can find the relevant code for order execution here:

Thank you,
Best regards

Felix