Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawTextFixed

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

    #16
    Hello Matheusfx,

    Thanks for your post.

    In NinjaTrader7 it would be possible through the Plot Override method to draw text on the chart. Regrettably in NinjaTrader7, this method override is not documented so I cannot provide examples. You could look at the example indicator "CustomPlotSample" in your NinjaTrader which provide code examples and comments on what the sections do.

    Comment


      #17
      Originally posted by NinjaTrader_PaulH View Post
      Hello Matheusfx,

      Thanks for your post.

      In NinjaTrader7 it would be possible through the Plot Override method to draw text on the chart. Regrettably in NinjaTrader7, this method override is not documented so I cannot provide examples. You could look at the example indicator "CustomPlotSample" in your NinjaTrader which provide code examples and comments on what the sections do.
      What about NT8?

      Comment


        #18
        Hello Matheusfx,

        Thanks for your reply.

        In NinjaTrader8 you could use the OnRender() method which is well documented in the help guide.

        If you have further NinjaTrader8 questions, please create a new forum topic under NinjaTrader8 as this thread is a NinjaTrader7 forum.

        Comment


          #19
          I needed this for my system today, so just sharing a code snipper if someone is looking for a simple "one liner". It only has one flaw - wide bottom margin just to offset it from the other text. But I found it convenient just to use a single Draw.TextFixed() statement and organize everything in it.

          Code:
                      Draw.TextFixed(this, "Labels",
                      "EMA1 = " + (EMA1[0]) +
                      "\nEMA2 = " + (EMA2[0]) +
                      "\nEMA3 = " + (EMA3[0]) +
                      "\n",
                      TextPosition.BottomLeft,
                      ChartControl.Properties.ChartText,
                      ChartControl.Properties.LabelFont, Brushes.Black, Brushes.Black, 50);​
          this is what it looks like on the chart:
          Click image for larger version

Name:	Screenshot 2023-11-01 125542.png
Views:	264
Size:	9.3 KB
ID:	1275897
          xcoder
          NinjaTrader Ecosystem Vendor - EMS

          Comment


            #20
            @Xcoder

            I can't thank you enough for this tip you freely gave, this is what helped me break through that iron wall lol. Here's my pic what I accomplished.

            Click image for larger version  Name:	2024-12-13 11_46_26-NinjaScript Editor - Indicator - DrawTextfixedexample.png Views:	0 Size:	57.2 KB ID:	1327708
            PS. I was that someone
            "if someone is looking for a simple "one liner"
            Last edited by trdninstyle; 12-13-2024, 10:54 AM.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            152 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            305 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            244 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            345 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            176 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X