Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Text object dissappears

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Draw.Text object dissappears

    I'm noticing that sometimes my Draw.Text object just disappears from the chart.
    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?

    Code:
    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);
    }
    ​
    Attached Files

    #2
    Hello reynoldsn,

    Do you see this happen if you type in the values for the drawing object and try to draw it?

    Comment


      #3
      I see what you mean - thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      163 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      82 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      125 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      206 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      185 views
      0 likes
      Last Post CarlTrading  
      Working...
      X