I'm trying to design a strategy that allows me to open a short position at the same time that I close a long one by stop loss
if (Position.Quantity == 1
&& Position.MarketPosition == MarketPosition.Long
&& ...
)
{
ExitLongStopMarket(tocParabolicStop, "Tancament per Parabolic Stop", @"combinada");
EnterShortStopMarket(tocParabolicStop, "@parabolicCurta");
}
The first one is OK but the second instruction EnterShortStopMarket doesn't run after the first is completed. I need to run both of them.
Regards,
Comment