Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Controlling placement of text

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

    Controlling placement of text

    I want to add and occasionally change some text along the top and bottom of the chart as part of my experimental strategy. It should stay at the top or bottom even if I re-scale the data. I found some sample code ("CustomPlotSample") that seems to do just what I want.

    But when I copy the function (named "Plot") from that example to my code, I get the compiler error "no suitable method found". And error code (CS0115) is referenced and linked, but the link contains no help (and says so when you follow it).

    The letter "P" in the name of the copied function is flagged by the compiler.

    I have looked for a declartion or other reference to this function in the sample code, but if there is one I can't see it. What am I missing?

    #2
    "Plot" is a reserved word. You should not use it unless using the already existing contexts for it.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hello Gamemaster,

      Thank you for your post.

      Have you looked at DrawTextFixed() to accomplish what you want.

      Ryan M.NinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_Josh View Post
        "Plot" is a reserved word. You should not use it unless using the already existing contexts for it.
        I presume you mean the list of "using" statements at the top of the source code?

        My code contains all of them that exist in the CustomPlotSample.

        Or did you mean something else?

        Comment


          #5
          Originally posted by NinjaTrader_RyanM View Post
          Hello Gamemaster,

          Thank you for your post.

          Have you looked at DrawTextFixed() to accomplish what you want.
          Thanks, yes. This does work for some of my text issues. But there are some others places where I want to tie the text to a specific bar, while keeping it at the top or bottom of the chart.

          (give me an inch, and I'll take a parsec ;-)
          Last edited by gamemaster; 02-27-2010, 07:42 AM.

          Comment


            #6
            Are you trying to put some constant text at the top of the chart, and they stay there even when the charts moves?

            Im looking for something similar.

            If you know such small script, let me know.

            thanks.

            Comment


              #7
              gamemaster, have you seen the DrawText() method yet? It seems more fitting for what you're trying to do than DrawTextFixed().

              If you want the text to "move" and stay with the bar it was placed with, just use the same tag for the draw object.
              AustinNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              656 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              371 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              109 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              574 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              579 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X