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 NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      54 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      72 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X