♥ 0 |
Hi –
Is it possible to code up a conditional order to sell 1/2 the position (1/2 of the Buy_To_Open tradeSize) when price crosses above an EMA then then sell the rest of the position when another condition is true (MACD Cross)? I’ve watched your helpful videos and have tried to use the tradeSize property but cant get it to work – it currently sells the whole position at the EMA Code snippet below – whole script attached. Thanks AddOrder(OrderType.SELL_TO_CLOSE, condition = exit1, price = open[-1], tradeSize = tradeSize2, tickcolor = GetColor(3), arrowcolor = GetColor(3), name = “EMA Sell”); AddOrder(OrderType.SELL_TO_CLOSE, condition = exit2, price = open[-1], tradeSize = tradeSize2, tickcolor = GetColor(2), arrowcolor = GetColor(2), name = “MACD Sell”); AddOrder(OrderType.SELL_TO_CLOSE, low <= stopPrice, tickcolor = GetColor(5), arrowcolor = GetColor(5), name = “S/L”);
RESOLVED
Marked as spam
|