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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        90 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        137 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        120 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        71 views
        0 likes
        Last Post PaulMohn  
        Working...
        X