I am using daily strategy using trailing stop loss. I wonder if there is a way to set trailing stop loss on GTC (good till cancelled). Because if the trailing stop loss expire in one day, it is not useful for daily/weekly strategy
Rename
I am using broker tradier and alpaca
Preferences > Trading > Special Order Types > Use GTC for all Strategy Orders
I found this option : user market on close when possible? what does it mean, when to use this?
Please open the Preference page and hit F1. If the explanation there isn't clear, let me know.
You can also ask the AI that's built into the help...
QUOTE:
... open the Preference page and hit F1. If the explanation there isn't clear, let me know.
The Help docs don't mention anything about trailing stops in the quote below. If they are included, then the Help docs need to be updated.
QUOTE:
Special order types
WealthLab supports special order types such as Market On Open (MOO), Market Close (MOC), Limit Close (LOC), and One Cancels Other (OCO) orders. These order types provide flexibility and automation in executing trades based on specific conditions.
So if "Use GTC for all strategy orders" is checked, does that mean a trailing stop Sell order is signaled only once for a position? And this won't happen for simple Limit or Stop sell orders because they aren't a Special Order Type?
All strategy orders.
All, every one.
All, every one.
Thanks. I'm not so sure I like that behavior being applied for Limit and Stop orders.
And what about this other question?
And what about this other question?
QUOTE:
So if "Use GTC for all strategy orders" is checked, does that mean a trailing stop Sell order is signaled only once for a position?
By default, order TIFs (time-in-force) are "DAY" - they expire at the end of the day.
GTC is just another TIF - they're "good" until you cancel.
If a Trailing Stop is updated, it's canceled and replaced.
GTC is just another TIF - they're "good" until you cancel.
If a Trailing Stop is updated, it's canceled and replaced.
QUOTE:
If a Trailing Stop is updated, it's canceled and replaced.
Is that a good thing or a bad thing?
The point of the GTC trailing stop (on the exchange side) is not to reset the highest point. If you cancel the trailing stop (on the exchange side), then the stock can systematically fall stepwise with each trading day and never sell. That's what we do not want to happen. I think your algorithm needs a little work.
... or maybe I'm missing something.
Let's clarify things here before they get more confusing. WL8 does not support placing broker side trailing stops. In WL8, a trailing stop is implemented as a stop order that is canceled and replaced whenever the trailing stop price changes bar by bar.
QUOTE:
In WL8, a trailing stop is implemented as a stop order that is canceled and replaced whenever the trailing stop price changes bar by bar.
Well, that's the way I understood it from WL6. So whether the GTC checkbox is checked or not, it's not going to change trailing stop signals.
I mistakenly got the impression from this discussion that the GTC checkbox did something for trailing stop behavior, but now I'm thinking it really doesn't. This GTC business with trailing stops is confusing.
The TIF only changes when the broker cancels an order, i.e., when it expires automatically. What's confusing about that?
QUOTE:
The TIF only changes when ... it expires automatically [at the broker].
So without the GTC checked, TIF goes until market closed. New signals for the next bar are maintained.
With GTC checked, TIF continues if the order was placed as GTC on the broker's side (without any further WL signals), and remains at Daily (with new Daily WL signals) if the order was placed as Daily on the broker's side.
Thanks for clarify it better. I think I understand the process now. Checking the GTC box puts the broker's actions in the loop so what really happens with TIF is controlled by the Order Manager (broker) when one places the order.
I don't see trailing stop loss set in alpaca, it seems to be converted a regular stop loss somehow.
here is my strategy
here is orders:
here is my strategy
here is orders:
that's right, WL8 does not support broker side trailing stop orders.
I wonder if you will add this functionality in the future
I wonder if alpaca/tradier api support trail stop loss
QUOTE:
I wonder if you will add this functionality in the future.
And exactly how is that suppose to work? Just because a position reaches its trailing stop price doesn't necessarily mean the position sold on the exchange side.
If you actually owned the position, WL could check the exchange to see if it sold or not. But what do you do with the backtest positions with trailing stops where you never owned the position in the first place? What assumptions are you going to make for those cases?
---
The "real problem" is how do you set the trailing stop price? Yes, the Turtle Traders used an ATR multiple, but honestly, ATR has nothing "directly" or "statistically" to do with trailing stop prices. At best, the ideal trailing stop price is a "statistical" function of the MFE (Maximum Favorable Excursion), but I don't know of anyone that has published a paper on this price-setting approach ... as yet.
The bad news is that MFE is a function of past and future trades, so you can't simply employ a formula to calculate it like you can with ATR. And the random error distribution for MFE is likely skewed (not normal), so classical, moment-based statistics won't work either. One has to resort to robust statistics, but then you need an N>15 or so; things get complicated.
Placing some kind of trailing stop is still a good idea though; I'm not knocking that.
Your Response
Post
Edit Post
Login is required