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

Implement Draw.Rectangle condition on the entire graph

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

    Implement Draw.Rectangle condition on the entire graph

    Hi everyone!

    I have implemented a condition using a instruction in a OnBarUpdate, I want each time a specific condition is repeated, draw a rectangle.

    The problem is only draws it, on the last candle, I can´t get it to repeat the instruction on the entire graph backwards.

    Any ideas to help me.?

    Thanks in advance.

    #2
    Hello BIOK.NT,

    Thanks for your post.

    To accomplish this you would need to provide a unique name for the Tag parameter when calling Draw.Rectangle(). CurrentBar could be used to make a Tag name unique.

    For example: the Tag name could be something like "rectangle" + CurrentBar.

    Draw.Rectangle(this, "rectangle" + CurrentBar, 10, Low[10] - TickSize, 5, High[5] + TickSize, Brushes.Blue);

    From the Draw.Rectangle() help guide page:

    Tag: A user defined unique id used to reference the draw object.

    For example, if you pass in a value of "myTag", each time this tag is used, the same draw object is modified. If unique tags are used each time, a new draw object will be created each time.


    See this help guide page for more information about Draw.Rectangle(): https://ninjatrader.com/support/help..._rectangle.htm
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Haiasi, 04-25-2024, 06:53 PM
    2 responses
    16 views
    0 likes
    Last Post Massinisa  
    Started by Creamers, Today, 05:32 AM
    0 responses
    4 views
    0 likes
    Last Post Creamers  
    Started by Segwin, 05-07-2018, 02:15 PM
    12 responses
    1,785 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