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() question

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

    drawtext() question

    When using DrawText() to print on the price channel, the y position of the text is in price units but the yPixelOffset is in pixels. How do I convert from pixels to price units so that I may instruct DrawText() to always print near the lower edge of the price panel? I onlky want the x position of the text to change from bar to bar.
    Thank you,

    #2
    The pixel offset is meant for fine tuning the position of your text. If you wanted a dash to line up with the current price you would have to offset it a couple of pixels, depending on your font size.
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    Comment


      #3
      eDanny,
      Thanks but I want to print near the bottom of the price panel, not at a bar-dependent height. Hence, I must find the proper y and yPixelOffset to print near the bottom.

      Comment


        #4
        You should be using DrawTextFixed() in that case. If you printed text with a large pixel offset to place near the bottom of the chart, as price moves down your text would move below the chart and disappear? If you set it's autoScale to true then your price could be scrunched up sometimes during the bigger moves.
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #5
          The problem is DrawTextFixed can only print in five different fixed locations. I onlyt want my y coordinate to be fixed. But the x coordinate must be below the current bar.

          Comment


            #6
            clksoft, I suggest you check into the CustomPlotSample then we provide per default - it shows an example how to override the default plot method.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Opacity Zero for DrawTextFixed()

              Another question regarding DrawTextFixed: I am using this for error messages. Sometimes several indicators plot the same error message. Opacities add up.

              Solution: Set the opacity of the fill colour to 0. This is not a valid value according to your Help Guide, but it does the trick.

              Can you confirm?

              Comment


                #8
                Hello,

                I will have someone reply to you on Monday. Thank you for your patience.
                DenNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by mmenigma, Today, 02:22 PM
                0 responses
                2 views
                0 likes
                Last Post mmenigma  
                Started by frankthearm, Today, 09:08 AM
                9 responses
                35 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by NRITV, Today, 01:15 PM
                2 responses
                9 views
                0 likes
                Last Post NRITV
                by NRITV
                 
                Started by maybeimnotrader, Yesterday, 05:46 PM
                5 responses
                26 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by quantismo, Yesterday, 05:13 PM
                2 responses
                21 views
                0 likes
                Last Post quantismo  
                Working...
                X