In this case, I draw stats at the end of play back and I can see the text but if I simply move the chart or even scroll, the text disappears.
Please see in the attachment you can see the Draw object, although it is too far down on the chart.
But like I said, if i just move the chart or scroll, that text disappears.
How do I prevent that?
private void PrintSummary(DateTime time) {
string summary = String.Format("{0}\n{1} {2}\nTrading days: {3}\nDays traded: {4}\n1 contract winners: {5}\n2 contract winners: {6}\n3 contract winners: {7}\n4 contract winners: {8}\n5 contract winners: {9}\nEnd of session trades: {10}", Instrument.FullName, time, time.DayOfWeek, _stats_daysOnChart, _stats_daysTraded, _stats_oneContractWinners, _stats_twoContractWinners, _stats_threeContractWinners, _stats_fourContractWinners, _stats_fiveContractWinners, _stats_endOfSessionTrades);
NinjaTrader.Gui.Tools.SimpleFont font = new NinjaTrader.Gui.Tools.SimpleFont("Arial", 16) { Size = 16, Bold = false };
Draw.Text(this,
"tradeSummary" + _stats_daysOnChart,
false,
summary,
70, // bars ago
Low[0] - 10 * TickSize,
5,
ChartControl.Properties.ChartText,
font,
TextAlignment.Left,
Brushes.Black,
null,
1);
}

Comment