Bracketed Orders
Author: ss161
Creation Date: 12/22/2009 10:28 AM
profile picture

ss161

#1
The user guide suggests these are now possible.

I'm wondering if the following combination of a bracketed order would work for live trading -- ideally, AutoTrade would be checked and the order would flow right to the floor, but I'm not averse to hitting the Place button if needed:

CODE:
Please log in to see this code.


Alternately, I'm pretty sure i can use RiskStopLevel instead of the SellAtStop command, but I don't know how to handle the SellAtClose?

In words, I have a daily strategy that generates alerts at the end of the day. Based on the alerts, i want to buy on the open a list of stocks and then immediately have a stop loss triggered at n% below the entry price and have the position exited at the close of day. To be clear, both the Stop and the Sell occur on the same bar that the position is entered.

Since it's really a daily strategy, if i could avoid having to use intraday streaming bars all day long i think the system would be much more robust ( no need to worry about the streaming data failing, strategy monitor not working, etc ).

Thanks
profile picture

Cone

#2
For sure it won't work with the code alone.

1. SellAt returns a boolean, not a Position.

2. You cannot automate AtClose orders with Wealth-Lab, they must be entered AtMarket prior to the close. Clearly, you won't be able to do that using Daily bars. See the WealthScript Guide: Programming Trading Strategies > Alerts > How to: Alert for AtClose Signals


3. Disregarding the AtClose order, for same-bar exits you need to dig into the Trading Prefs (F12) and enable the same-bar exit option and following the User Guide instructions for RiskStopLevel and AutoProfitLevel.

Finally, same-bar stops worked in Version 4 too for Daily bars provided you ran the script from a Strategy Window. Frankly, I don't have any experience with it in V5 yet. Where does the User Guide suggest it's possible?
profile picture

ss161

#3
thanks for the quick response.

1. thanks. i was just writing code into the code tags.

2.
QUOTE:
You cannot automate AtClose orders with Wealth-Lab, they must be entered AtMarket prior to the close. Clearly, you won't be able to do that using Daily bars.

Is it because SellAtClose is usually done using Bar (instead of Bar +1) that makes it not able to be automated? Or is there no live trading support for MOC orders?
profile picture

Cone

#4
I don't know if Fidelity supports MOC another way, but there is definitely no support for it for orders transmitted from Wealth-Lab.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).