Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawTextFixed offset

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

    DrawTextFixed offset

    Is there a way to express an offset value with DrawTextFixed?

    I've got an indicator outputting to the TopRight, but it is being overlapped with the indicator texts.


    Click image for larger version

Name:	image_2022-11-08_131956177.png
Views:	183
Size:	8.8 KB
ID:	1222735

    #2
    Yes, you can add a C# escape character that does one or more line returns.

    Here is an example of drawing 4 lines:

    Draw.TextFixed (this, "testa", "Line1", TextPosition.TopRight);
    Draw.TextFixed (this, "testb", "\nLine2", TextPosition.TopRight);
    Draw.TextFixed (this, "testc", "\n\nLine3", TextPosition.TopRight);
    Draw.TextFixed (this, "testd", "\n\n\nLine4", TextPosition.TopRight);

    Note the use of \n for the 2nd, 3rd and 4th line.

    To "offset" a single line, using the above example: Draw.TextFixed (this, "testa", "\nLine1", TextPosition.TopRight);

    Comment


      #3
      Hello kevinenergy,

      To further clarify, there is not an offset property that can be changed in the UI for indicators to use, the indicator would need to have its code edited. If you have the code you can edit the TextFixed statements to use \n for newlines as Tasker-182 has shown.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      40 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      27 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      45 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      37 views
      0 likes
      Last Post CarlTrading  
      Working...
      X