Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

draw dot draw ellipse issue

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

    draw dot draw ellipse issue

    I am trying to draw a dot or an ellipse but it wont show on the screen

    this is all i have on onbarupdate

    DrawEllipse("tag1", true, 5, Close[5], 0, Close[0], Color.Blue, Color.Blue, 5);
    DrawDot("tag2", true, 0, Low[0] - TickSize, Color.Red);


    nothing shows up on the chart.

    no live connection just the chart being loaded

    #2
    Hello,
    Thank you for your post.

    This is happening because there are not enough bars contained in the data series you are accessing. The correct way to structure your OnBarUpdate() would be like this:

    if (CurrentBar<5)
    return;
    DrawEllipse("tag1", true, 5, Close[5], 0, Close[0], Color.Blue, Color.Blue, 5);
    DrawDot("tag2", true, 0, Low[0] - TickSize, Color.Red);

    This will check how many bars we have seen (CurrentBar) and to exit the OnBarUpdate() method if an insufficient number of bars has been seen.

    You may reference the following forum tips page for more information on how to ensure that enough bars have been seen.


    If you have any further questions please let me know.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      thank you I it was like you said an index issue

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by sjsj2732, 03-23-2026, 04:31 AM
      0 responses
      76 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      313 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      312 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      149 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      113 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X