How can i define profit target orders in that case?
// variables......
private IOrder myLongStopOrder = null;
private IOrder myLongProfitTargetOrder = null;
private IOrder myShortStopOrder = null;
private IOrder myShortProfitTargetOrder = null;
protected override void OnExecution(IExecution execution)
{
if (execution.Order != null && (execution.Name == "InRangeSYV"))
{
priceShort = execution.Price;
myShortStopOrder = ExitShortStopLimit(0,true,positionTaken,((priceSho rt*(1+StopLevelMovel))+(1 * TickSize)),(priceShort*(1+StopLevelMovel)), "Stop loss short","InRangeSYV");
myShortProfitTargetOrder = EnterLongLimit(positionTaken,(priceShort/(1+stopGainNumber)), "Profit target short");
}
Comment