this is my logic. can you point out if this is right or suggest a alternative?
my logic is to loop the Performance.RealtimeTrades and filter out the trades done today for the current instrument and sum the profitpoints.
if(pointstoday==Double.MinValue) { pointstoday=0; foreach (Trade myTrade in Performance.RealtimeTrades) { if (myTrade.Entry.Instrument.FullName==Instrument.FullName && myTrade.Exit.Time.Date==DateTime.Now.Date) { pointstoday+=myTrade.ProfitPoints; } } Print("starting profits " + Instrument.FullName +Instrument.MasterInstrument.Round2TickSize( pointstoday)); }
Comment