Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

drawtext

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

    drawtext

    Hello,

    sorry this question maybe but I can´t plot a text like a dot or rectangle above/below a bar (eg like "My dot" + CurrentBar, true, 0, Low[0] - 6 * TickSize, Color.Red), I only can draw it bottom right or center.... as position in the window.

    How can I plot a text like a dot right above a bar where a condition is true?

    Thanks
    Tony

    #2
    Hi Tony,

    What is the complete code snippet you are using to try to achieve this?
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thanks for your reply. I found your answer in a thread and now I can plot it at the bar. But I tried to find how to change font and size and in your help guide for NT6.5 and NT7 there is always only DrawText("tag1", "Text to draw", 10, 1000, Color.Black);

      and there´s no example how to use drawtext when one needs all parameters.

      Thanks
      Tony

      Comment


        #4
        You can see here for all the method signatures for DrawText.


        Here is an example with the advanced one:
        Code:
        DrawText("my tag", true, "my text", 0, High[0], 0, Color.Blue, new Font ("Arial", 12), StringAlignment.Center, Color.Black, Color.White, 0);
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thank you for your reply and the example (but in your link to the help guide there is only DrawText("tag1", "Text to draw", 10, 1000, Color.Black); as I copied from there in my thread)

          When I do backtesting now to find out which entry refers to which variables and conditions I see that the drawtext is only in my backtesting chart plotted at the last entry where the condition was true but not the entries before. Why?

          Thanks
          Tony

          Originally posted by NinjaTrader_RyanM View Post
          You can see here for all the method signatures for DrawText.


          Here is an example with the advanced one:
          Code:
          DrawText("my tag", true, "my text", 0, High[0], 0, Color.Blue, new Font ("Arial", 12), StringAlignment.Center, Color.Black, Color.White, 0);

          Comment


            #6
            (but in your link to the help guide there is only DrawText("tag1", "Text to draw", 10, 1000, Color.Black)
            The help guide has all available method signatures and 1 example so I included an example of the advanced one for you. You can also use intellisense to show every method signature, and the parameter type expected with each field.

            Your draw statements tag is not unique so it will be replaced every time. To allow for unique per bar drawings, add + CurrentBar to the tag.
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Thank you for the information with intellisense - after months with NT I didn´t know this.



              Originally posted by NinjaTrader_RyanM View Post
              The help guide has all available method signatures and 1 example so I included an example of the advanced one for you. You can also use intellisense to show every method signature, and the parameter type expected with each field.

              Your draw statements tag is not unique so it will be replaced every time. To allow for unique per bar drawings, add + CurrentBar to the tag.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by GussJ, 03-04-2020, 03:11 PM
              16 responses
              3,281 views
              0 likes
              Last Post Leafcutter  
              Started by WHICKED, Today, 12:45 PM
              2 responses
              19 views
              0 likes
              Last Post WHICKED
              by WHICKED
               
              Started by Tim-c, Today, 02:10 PM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by Taddypole, Today, 02:47 PM
              0 responses
              5 views
              0 likes
              Last Post Taddypole  
              Started by chbruno, 04-24-2024, 04:10 PM
              4 responses
              53 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Working...
              X