Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawText being placed behind Bars

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

    DrawText being placed behind Bars

    Using DrawText at shown below

    DrawText("MP" + CurrentBar, false,"-", 1, ((High[1] + Low[1]) /2),0, Color.Blue, new Font("Verdana", 20.0f), StringAlignment.Center,Color.Transparent,Color.Tra nsparent, 0);

    To draw a "-" at the midpoint of a bar. But the +-+ is being placed behind the bars so you can barely see it, as shown below

    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    How do you get it to be drawn in front of the bars

    #2
    Hello,

    Thank you for the question.

    This is known as the ZOrder.

    Essentially the chart bars are actually drawing on top of the indicators drawing object, to resolve this there is actually no supported way of setting the ZOrder from script but there is a quick fix in the chart.

    Simply select either the chart bars or the indicators plot so it is selected. Next using the Shift key and scroll wheel, hold shift and scroll with your mouse. You should see a small text box appear next to the cursor listing the z level. You can scroll until you see the bars go behind the other objects.

    Please let me know if I may be of additional assistance.

    Comment


      #3
      Originally posted by rwbil View Post
      Using DrawText at shown below

      DrawText("MP" + CurrentBar, false,"-", 1, ((High[1] + Low[1]) /2),0, Color.Blue, new Font("Verdana", 20.0f), StringAlignment.Center,Color.Transparent,Color.Tra nsparent, 0);

      To draw a "-" at the midpoint of a bar. But the +-+ is being placed behind the bars so you can barely see it, as shown below

      World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.

      How do you get it to be drawn in front of the bars
      Perhaps I remember this correctly. Please try making ZOrder a very big number. For example, in Initialize():
      ZOrder = 40000;
      Try changing the number until you have topmost texts.

      Cheers,
      Pi
      ninZa
      NinjaTrader Ecosystem Vendor - ninZa.co

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      574 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      332 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X