I have a doubt. I want to limit the strategy to one lossing trade per session. I have some examples os how to limit the strategy to daily loss limit.
I have this code:
if (Bars.IsFirstBarOfSession&&IsFirstTickOfBar)
{
MaxLossingTrades = 0;
}
if(SystemPerformance.AllTrades.LosingTrades.Count > 0)
{
MaxLossingTrades++;
Print(MaxLossingTrades);
}
But it's not working fine...
Thanks a lot...
Comment