Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 LawrenHom, Today, 10:45 PM
          0 responses
          3 views
          0 likes
          Last Post LawrenHom  
          Started by love2code2trade, Yesterday, 01:45 PM
          4 responses
          28 views
          0 likes
          Last Post love2code2trade  
          Started by funk10101, Today, 09:43 PM
          0 responses
          7 views
          0 likes
          Last Post funk10101  
          Started by pkefal, 04-11-2024, 07:39 AM
          11 responses
          37 views
          0 likes
          Last Post jeronymite  
          Started by bill2023, Yesterday, 08:51 AM
          8 responses
          44 views
          0 likes
          Last Post bill2023  
          Working...
          X