Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawText etc

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

    DrawText etc

    I am trying to use DrawText() in an indicator on Volume (so it is in the Volume Pane 2 and not the Price Panel). No output appears.

    Do these Draw routines work in other panes??

    If not, how can I add a mark to Volume bars? e.g., a single text character just over the volume bar?

    #2
    Please set DrawOnPricePanel = false.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Oddly enough, Josh, I already did that in the Initialize() method.
      DrawOnPricePanel = false;
      It did not help... :-)

      Any other suggestions? What I started with is VERY simple:

      if (Volume[0] > Volume[1]) // increasing bar-to-bar
      DrawText("V"+CurrentBar, riseMarker, 0, Volume[0], tColor);

      even tried the looong version:
      DrawText("V"+CurrentBar, true, riseMarker, 0, Volume[0], yPixels, tColor, fp, StringAlignment.Center, Color.Empty, Color.Empty, 10) ;

      BTW, the varibles yPixelOffset in the doc says double but generates an error if not int.

      Comment


        #4
        yPixelOffset is suppose to be an integer. You cannot offset a decimal pixel value.

        Check your Control Center logs for errors. Have you run into this? http://www.ninjatrader-support2.com/...ead.php?t=3170
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Ah! I do not know why I forget to check the log when changing an indicator. I had removed the check for CurrentBar < 1 because I added BarsRequired = 2 -- silly me thinking that covered it. Thank you.

          BTW, you should update your online help text for DrawText() which says that yPixelOffset is a double. :-)

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          596 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          554 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X