Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

dash line on chart for open orders

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

    dash line on chart for open orders

    Is there a way to have a moving dashline on the chart window(if your orders are pegged to some indicator) according to where cover and stoploss orders are? Is there an example of this for a code? I am familar with the AddLine method in indicators, would I just use that in onbarupdate method?

    #2
    Hello Boonfly8,

    Thanks for your post.

    We do not have a documented property to check if an Order is attached to an indicator, but with some use of Intellisense/Intelliprompt, we can see an Order.IsTrackingEnabled property that could potentially be used to identify if the order is attached to an indicator. (This property is undocumented and its use may change as it is not locked into documentation. Please keep this in mind if functionality changes.)

    I may suggest to monitor the strategy's orders in Order objects like seen in the SampleOnOrderUpdate strategy and then to check if the order is attached to an indicator. You will want to use Draw.Line() with your desired DashStyle in OnBarUpdate to draw the line.

    Draw.Line() - https://ninjatrader.com/support/help.../draw_line.htm

    SampleOnOrderUpdate - https://ninjatrader.com/support/help...and_onexec.htm

    Please let me know if I can be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    49 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    126 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    67 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    42 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X