I'm setting my stop loss as follows:
else if (State == State.Configure)
{
SetStopLoss(CalculationMode.Currency, stopLossCurrency * orderQuantity);
}
I'm trying to place a limit order to close as follows:
protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity,
MarketPosition marketPosition, string orderId, DateTime time)
{
if (execution.Order.Name == longSignalName) // If long position has just opened
{
ExitLongLimit(predHigh, longSignalName); // Place a limit sell order. (Method is ignored if no long position exists.)
}
else if (execution.Order.Name == shortSignalName)
{
ExitShortLimit(predLow, shortSignalName); // Place a limit buy-to-close order. (Method is ignored if no short position exists.)
}
}
- Is it actually possible to place an OTA order? If so, how?
- What is the most appropriate way to place a close limit order while keeping my stop loss order in place?

Comment