Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get existing stoploss and limit orders to update labels

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

    Get existing stoploss and limit orders to update labels

    I am creating an indicator for the chart that shows the current stoploss and limit orders. For example, the strategy creates a long L1 L2 and L3 and it creates a stoploss and 3 separate profit targets for L1 L2 and L3. The chart gets vey busy and I cannot see what the targets are. So my label box will show each target. I need help once the order is filled getting the existing target prices of the limit orders. If I could get some direction as to how to code that. I would appreciate the help.

    #2
    Hi set2win, thanks for your post.

    An indicator will need to implement an Addon style Account object like in the example here. From there you would subscribe to the OrderUpdate event method and get the order price data from this event.

    Best regards,
    -ChrisL

    Comment


      #3
      so i would request each oco then using e.Order.Instrument.MasterInstrument.TickSize, 0, oco, "Profit Target", Core.Globals.MaxDate, null I could get the price. I just can not figure how I would note which one was which as I will have multiple results. Since there will be 3 different targets I guess I could use math comparison to figure the higher price targets.

      Comment


        #4
        Hi, thanks for your reply.

        You would use the signal name given to the order to tell them apart. If you are submitting the stop and target through one of the Set methods, we have an example here that puts them into a list to keep track of each one:
        https://ninjatrader.com/support/help..._and_profi.htm

        Best regards,
        -ChrisL

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        67 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        42 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        202 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        366 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        284 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X