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

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.
    Paul H.NinjaTrader Customer Service

    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.
        Paul H.NinjaTrader Customer Service

        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:	88
Size:	9.3 KB
ID:	1275897
          xcoder
          NinjaTrader Ecosystem Vendor - EMS

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Haiasi, 04-25-2024, 06:53 PM
          2 responses
          17 views
          0 likes
          Last Post Massinisa  
          Started by Creamers, Today, 05:32 AM
          0 responses
          5 views
          0 likes
          Last Post Creamers  
          Started by Segwin, 05-07-2018, 02:15 PM
          12 responses
          1,786 views
          0 likes
          Last Post Leafcutter  
          Started by poplagelu, Today, 05:00 AM
          0 responses
          3 views
          0 likes
          Last Post poplagelu  
          Started by fx.practic, 10-15-2013, 12:53 AM
          5 responses
          5,407 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Working...
          X