Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I get the current Stop Loss price?

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

    How do I get the current Stop Loss price?

    I adjust the Stop in OnBarUpdate() via SetStopLoss(). Is there any way to find out where it is at? OnOrderUpdate() triggers only when the stop moves...

    Thanks
    J
    Last edited by Jaba1n; 06-01-2012, 08:18 PM.

    #2
    Jaba1n,

    You would need to keep track of order objects here.



    To clarify however, the OnBarUpdate() will update each closing of the bar or each tick depending on your CalculateOnBarClose setting.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      AdamP thank you for your help.

      Let's say that my strategy submits an OCO, then the computer crashes. How will I be able to retrieve the information on open orders from the live account? I'm sure I'm missing something obvious here.

      Thanks again
      J

      Comment


        #4
        OK, never mind, Found it. It took some digging though.

        Regards
        J

        Comment


          #5
          I have the same question, I looked around but could not find

          I have SetStopLoss() calls in OnBarUpdate(). How do I know in run time where the stop is at ? It does not return an IOrder object (why not ? What am I missing here ?)

          Thanks

          Comment


            #6
            tickling,

            SetStopLoss() is used to set the value of the stop loss order that will be submitted when your entrance order is submitted. It doesn't return an iOrder object because one may not yet exist, since you may not have entered any position yet.

            You can use "OnOrderUpdate()" to snag the stop loss order that is submitted.

            Adam P.NinjaTrader Customer Service

            Comment


              #7
              Thanks Adam. Got it.

              Comment


                #8
                Sample

                That is a terrible sample...nothing to do at all with what he is trying to do.

                You guys can surely do better than that for stop order "catching".


                Leroy

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                80 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                46 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                29 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                32 views
                0 likes
                Last Post TheRealMorford  
                Started by Mindset, 02-28-2026, 06:16 AM
                0 responses
                66 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Working...
                X