Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    Chris L.NinjaTrader Customer Service

    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
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by hazylizard, Today, 08:38 AM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by geddyisodin, Today, 05:20 AM
        2 responses
        18 views
        0 likes
        Last Post geddyisodin  
        Started by Max238, Today, 01:28 AM
        5 responses
        47 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by giulyko00, Yesterday, 12:03 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by habeebft, Today, 07:27 AM
        1 response
        16 views
        0 likes
        Last Post NinjaTrader_ChristopherS  
        Working...
        X