//----
lastShortLost=false;
lastLongLost=false;
if(Performance.ShortTrades.Count>0)
{
sltc=Performance.ShortTrades.LosingTrades.Count;
if(sltc > 0)
lastShortLost=Performance.ShortTrades.LosingTrades[0].Exit.Time.Date == Time[0].Date;
}
if(Performance.LongTrades.Count>0)
{
sltc=Performance.LongTrades.LosingTrades.Count;
if(sltc > 0)
lastLongLost=Performance.LongTrades.LosingTrades[0].Exit.Time.Date == Time[0].Date;
}
//--------
Is there a better way to get this info?
I just need to know the date of the last losing trade for short & long.
Thanks!

Comment