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

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

    DrawText

    Hi,
    please help.
    I need to fix some text in the possition CenterRight of a chart, as you can see on attached image - possition is marked by red arrow. It must be at right possition of the last bar. Possitions TopRight and BottomRight (TextDrawFixed) are already in use.
    How to fix the text if I cannot know, what price will be in the middle of chart?
    Thank you
    Jaroslav
    Attached Files

    #2
    Jaroslav, perhaps it would be better then to work with the DrawText method, as you have then the needed control where the text should be placed exactly - http://www.ninjatrader-support.com/H.../DrawText.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Betrand,
      yes, I know this help site and I know I must use DrawText method (see name of topic)
      But:

      DrawText(string tag, bool autoScale, string text, int barsAgo, double y, double yPixelOffset, Color textColor, Font font, StringAlignment alignment, Color outlineColor, Color backColor, int opacity)

      double y - I tried it. It is price on the chart. Ok, if in the middle of my displayed chart is e.g. 1500 today, I can write there 1500. But this price can be 1600 tomorow. How can I recognize, what price is in the middle of displayed chart to change it in indicator?

      Comment


        #4
        This text must be fixed in the middle of displayied chart not depending on actual price. Fixed like in the method DrawTextFixed

        Comment


          #5
          Then I would suggest working with DrawTextFixed and using trial and error with those custom string formatting options - http://www.ninjatrader-support2.com/...ead.php?t=4749
          BertrandNinjaTrader Customer Service

          Comment


            #6
            I am afraid it cannot help. DrawTextFixed positions on the right side are in use by another indicator and I cannot join two indicators together to use "\n" operator.
            Jaroslav
            Last edited by maitreja; 08-19-2009, 03:12 AM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Lumbeezl, 01-11-2022, 06:50 PM
            31 responses
            816 views
            1 like
            Last Post NinjaTrader_Adrian  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            5 responses
            13 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by swestendorf, Today, 11:14 AM
            2 responses
            6 views
            0 likes
            Last Post NinjaTrader_Kimberly  
            Started by Mupulen, Today, 11:26 AM
            0 responses
            6 views
            0 likes
            Last Post Mupulen
            by Mupulen
             
            Started by Sparkyboy, Today, 10:57 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Working...
            X