How to always close position at the close?
Author: karasaj
Creation Date: 7/19/2009 11:06 PM
profile picture

karasaj

#1
I'm trying to program a strategy in which I always close out my position "at the close" if there is a position open at the end of the standard trading session. For instance, every time I long a stock, I then tried putting an "OR" between "sell trailing stop loss at 3%" and "at the close" so that it executes whichever comes first & cancels the other, but it won't work. Does anyone know how I can fix this? Thank you!
profile picture

Cone

#2
Are you manually programming or using the Strategy Builder?

If manually, by design the first signal in the code flow executes [first]. Even if not realist, programmers can order the signal however they want.

The Strategy Builder, however, orders multiple exit signals correctly - Close (at bar), then Market, Stop, and Limit (at bar + 1) in that order.
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).