• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by mestril, Today, 06:00 AM
    0 responses
    3 views
    0 likes
    Last Post mestril
    by mestril
     
    Started by Goolden, Today, 05:47 AM
    0 responses
    4 views
    0 likes
    Last Post Goolden
    by Goolden
     
    Started by kujista, Today, 12:59 AM
    0 responses
    6 views
    0 likes
    Last Post kujista
    by kujista
     
    Started by Gerik, Today, 12:14 AM
    0 responses
    5 views
    0 likes
    Last Post Gerik
    by Gerik
     
    Started by Bionian, Yesterday, 11:47 PM
    0 responses
    6 views
    0 likes
    Last Post Bionian
    by Bionian
     
    Working...
    X