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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      29 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      46 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X