If i play in the playback connection the strategy, the stop loss moves perfectly, but when i use it in real time it doesn't move. What could be the reason of that?
the code is like this :
i added a dataseries of 1 second and this is in the Barupdate=1, so for each seconds:
if(Position.MarketPosition != MarketPosition.Flat)
{
if (Positions[0].GetUnrealizedProfitLoss(PerformanceUnit.Ticks) > 2)
{
SetStopLoss(CalculationMode.Ticks, 0);
}
}
Comment