Here is a portion of the code.
protected override void Initialize()
{
Add(PeriodType.Minute,1);
Add(StrategyPlot(0));
StrategyPlot(0).PanelUI = 2;
StrategyPlot(0).Name ="PNL Today Plot ";
}
protected override void OnBarUpdate()
{
if (BarsInProgress == 0)
return;
Print (ToTime(Time[0])+ " PNL "+Position.GetProfitLoss(Close[0], PerformanceUnit.Currency)); // prints to output window
StrategyPlot(0).Value.Set( Position.GetProfitLoss(Close[0], PerformanceUnit.Currency));
}
Comment