Support Board
Date/Time: Thu, 06 Feb 2025 23:50:15 +0000
[Programming Help] - Auto trading with a trailing stop
View Count: 746
[2020-05-14 18:01:02] |
Matt NL - Posts: 91 |
Hi guys I'm struggling to find a way to do this. How can I place an order on alert condition and also include an automatic stop-loss and profit-taking bracket order? I can only find the study which places an order without an attached bracket order. My goal is to automate it completely so I can backtest and get performance results Thanks Matt |
[2020-05-14 21:53:53] |
Matt NL - Posts: 91 |
So I've figured out how to add targets/stops using sc.UseGUIAttachedOrderSetting = true; However, when I'm backtesting all my target limit orders are immediately filled at the current (live time) price, not the price at the time of backtesting. How can we prevent the current (real-time/live) price being used for market orders or target limit orders when backtesting? Thanks Matt |
[2020-05-14 22:20:42] |
Matt NL - Posts: 91 |
Screenshot attached
|
![]() Attachment Deleted. |
[2020-05-14 23:17:28] |
Matt NL - Posts: 91 |
Fixed! Reply limit (profit) orders and market orders do not work when you use a different symbol for trades (like MES instead of ES). Removed and it's fine now. Thanks Matt |
To post a message in this thread, you need to log in with your Sierra Chart account: