Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing stop order? #23

Open
mw66 opened this issue May 9, 2024 · 1 comment
Open

Trailing stop order? #23

mw66 opened this issue May 9, 2024 · 1 comment

Comments

@mw66
Copy link

mw66 commented May 9, 2024

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

Just wondering can this be added?

Thanks.

@fbertram
Copy link
Owner

fbertram commented May 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants