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 Hwop38, 05-04-2026, 07:02 PM
          0 responses
          169 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          327 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          252 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          353 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          181 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X