How do i have stop and reverse logic? I want to get in short on a cross over and if there is long cross over i want to exit my short and enter long..... And reverse for Shorts. I am a bit confused how to deal with ExitLong stop markets and limits.... With logic below when in long, on crossShort it doesnt reverses position
EnterLong(PositionSize, "Cross Long");
if ((Position.MarketPosition == MarketPosition.Long && EMACrossShort == true) )
{
ExitLong();
EnterShort(PositionSize, "Cross Short");
}
if(Position.MarketPosition == MarketPosition.Long)
ExitLongStopMarket(0, true, Position.Quantity, Position.AveragePrice - (TickSize * StopLossTicks), "SLL", "Cross Long");
ExitLongLimit(0, true, Position.Quantity, Position.AveragePrice + (TickSize * ProfitTargetTicks), "PTL", "Cross Long");
Comment