Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop DrawTextFixed from overlapping

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

    Stop DrawTextFixed from overlapping

    Hi,
    I'm using DrawTextFixed but am having trouble stopping it from overlapping previously added text. The code below draws GBP over the USD text...I'd like to set an x offset to draw the GBP text to the left of the USD text.
    How do I do this?

    Code:
    DrawTextFixed("USD", "USD", TextPosition.BottomRight,Color.Red, new Font("Arial", 10),Color.Aquamarine, Color.LightGray, 5);
    DrawTextFixed("GBP", "GBP", TextPosition.BottomRight,Color.Blue, new Font("Arial", 10),Color.Aquamarine, Color.LightGray, 5);

    #2
    Hello,
    Thank you for your post.
    Aside from changing the message to "GBPUSD" I am unaware of any supported method to accomplish this. I am currently looking into other ways to achieve this. I will keep this thread open so that other members of the forum can suggest alternatives as well.
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Hmm DrawText() might be able to do it, but the method description really doesn't help me in deciphering the various parameters...

      Comment


        #4
        Originally posted by itsnotme View Post
        Hmm DrawText() might be able to do it, but the method description really doesn't help me in deciphering the various parameters...

        https://ninjatrader.com/support/help.../?drawtext.htm
        I think you will need to use DrawString(string StringToShow, Font myFont,Brush myBrush,int x,int y);
        and put it in public override void Plot(Graphics graphics, Rectangle bounds, double min, double max).
        Like that you can control the exact position of the text. Hope this help.

        Comment


          #5
          Originally posted by itsnotme View Post
          Hmm DrawText() might be able to do it, but the method description really doesn't help me in deciphering the various parameters...

          https://ninjatrader.com/support/help.../?drawtext.htm
          For what you are describing, you will need to use a custom Plot().

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          559 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          546 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X