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 NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        62 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        134 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X