Purpose of this is to visualize the strategy's PnL in panel 1 of the chart.
code in initialize section of indicator:
Add(new Plot(new Pen(Color.White, 2), "PnL"));
myIndicator().Panel = 1; // indicator on panel 1 Add(myIndicator());
myIndicator().PnL.Set(Performance.RealtimeTrades.TradesPerformance.Currency.CumProfit);
In the current setup, if I print the PnL value in the indicator, I get the current Price instead of the correct PnL value.
I understand that a plot doesn't contain any actual values like a dataseries does, but is it possible to read these plotted values in the indicator ?
What would be the correct procedure to do this ?
Marco
Comment