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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X