503oregonsv
New member
Hi All,
I found this in the forum, but is not working when I save it as strategy, I already tested it as regular hours and extended hours and is not working.
It looks so simple but still not working.
Can you please help me.
I'm running it in a 1 min frame as strategy in real money mode.
# Get the current position size.
def positionSize = GetQuantity();
# --- Final close condition ---
# A simple example of a final close order.
AddOrder(OrderType.SELL_TO_CLOSE, positionSize > 0, tickcolor = Color.RED, arrowcolor = Color.RED, name = "Sell Remaining");
I found this in the forum, but is not working when I save it as strategy, I already tested it as regular hours and extended hours and is not working.
It looks so simple but still not working.
Can you please help me.
I'm running it in a 1 min frame as strategy in real money mode.
# Get the current position size.
def positionSize = GetQuantity();
# --- Final close condition ---
# A simple example of a final close order.
AddOrder(OrderType.SELL_TO_CLOSE, positionSize > 0, tickcolor = Color.RED, arrowcolor = Color.RED, name = "Sell Remaining");