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

Draw objects

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

    Draw objects

    Hi guys,

    Could you offer me a method which can draw an object (text, rectangle) to a given x axis coordinate? I need different distance between drawn objects, so the fix bars for x axis coordinate are not good for me.

    Many thanks!

    #2
    CuriProgrammer, what you can look into is drawing via custom C# techniques in the overridden Plot method - we would not have much documentation on this flexible yet unsupported technique, however NT comes shipped with an example for advanced coders - it's called the CustomPlotSample is installed per default.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Many thanks for your reply and I want to apologise for my late response..

      I can not do my first theory about drawing so I thought over what i want to see.
      I want to draw rectangle to the chart. The rectangle's start point could be a bar (like DrawRectangle's startBarsAgo param) but it's end point should be a ratio or a not integer number which represent the width of rectangle.

      Thanks for your help!

      Comment


        #4
        Hy folks,

        I am dealing with the same issue - putting optional lenght rectangles each bars.
        I saw an indicator that did the same thing just cant remember wich one was that.

        any help would be appreciated

        Comment


          #5
          For manually drawn rectangles that would not be possible, but for script drawn ones you can certainly update their end points either via supplying the index or DateTime. I have seen users working successfully with negative bar indices to signify a future bar, althought this technique would not be documented / supported by us. You will need to round / truncate the calcs so it falls on a bar / timestamp value though, to draw finer down to a pixel the plot override C# custom techniques would need to be employed.
          BertrandNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by frslvr, 04-11-2024, 07:26 AM
          9 responses
          123 views
          1 like
          Last Post caryc123  
          Started by rocketman7, Today, 09:41 AM
          4 responses
          15 views
          0 likes
          Last Post rocketman7  
          Started by selu72, Today, 02:01 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Started by WHICKED, Today, 02:02 PM
          2 responses
          16 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Started by f.saeidi, Today, 12:14 PM
          8 responses
          21 views
          0 likes
          Last Post f.saeidi  
          Working...
          X