It looks ok so far - I hope i don't eat my hat for posting this...
It should be possible to use the same technique for week,month,year and any other collection.
All we are doing is accessing a trade collection by a key - a date conveniently.
The TradesCount property allows us to access the lenght of the collection.
Thank you NinjaTrader...!
Pattern for day losses
Performance.AllTrades.LosingTrades.ByDay[dayKey]!=null && ((TradeCollection)Performance.AllTrades.LosingTrad es.ByDay[dayKey]).TradesCount>lossesByDayLimit)
Pattern for day wins
Performance.AllTrades.WinningTrades.ByDay[dayKey]!=null && ((TradeCollection)Performance.AllTrades.WinningTra des.ByDay[dayKey]).TradesCount>winsByDayLimit)
onBarUpdate.....{
//day keys syncd to bar time
DateTime dayKey =newDateTime(Time[0].Year,Time[0].Month,Time[0].Day);
//if less than 3 losses then trade allowed
if (Performance.AllTrades.LosingTrades.ByDay[dayKey]!=null && ((TradeCollection)Performance.AllTrades.LosingTrad es.ByDay[dayKey]).TradesCount<3)
{
//signal condition
}
}

Comment