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

Profit Target / Trail Stop Executed

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

    Profit Target / Trail Stop Executed

    Hi:

    If I enter a long position, I can send a message via the following:

    If condition met,
    Enter Long()
    SendMail()

    How do I do the same if the Profit Target or Trail Stop is executed ?
    i.e.
    If Profit Target Reached,
    SendMail()

    I am struggling to understand how I can ascertain how Profit Target is Reached via the strategy.

    thx
    David

    #2
    You would have to get creative and check several things such as position size and realized PnL, maybe the trades collection.

    There is no simple approach to this at this time. NT 6.5 will make this easier.
    RayNinjaTrader Customer Service

    Comment


      #3
      Your right - thx. I can use the Expected PnL to ascertain whether the Profit Target is hit.....trailing stop requires a little more creativity though.

      thx
      David

      Comment


        #4
        by the way when is NT 6.5 being released ? thx

        Comment


          #5
          Fall time frame.

          Comment


            #6
            Hello.
            How is it possible (by whatever means) to track when a dynamic Trailing Stop exit has been executed (using SetTrailStop in OnBarUpdate). One can track the 'Value' of the TrailStop ...... I believe it reaches a minimum value of 1 and if the price moves down by one tick (long trade) then the trail stop will be executed.

            If the value went to zero it would be easy, i.e

            if (Value=0)
            do the following.........

            any ideas or pointers would be greatly appreciated.
            thx
            DAvid

            Comment


              #7
              You can do this with NT6.5 and track order status changes. Just be patient for a few more weeks.

              Comment


                #8
                The only thing you can do right now is monitor the strategy's position.
                RayNinjaTrader Customer Service

                Comment


                  #9
                  thx guys --- thought so.
                  any concrete dates for the NT6.5 release ?

                  thx DG

                  Comment


                    #10
                    A few weeks from now until first beta. No ETA on release.

                    Comment


                      #11
                      Hi

                      A couple of weeks I submitted the following as part of this thread:

                      ******************************************

                      Hello.
                      How is it possible (by whatever means) to track when a dynamic Trailing Stop exit has been executed (using SetTrailStop in OnBarUpdate). One can track the 'Value' of the TrailStop ...... I believe it reaches a minimum value of 1 and if the price moves down by one tick (long trade) then the trail stop will be executed.

                      If the value went to zero it would be easy, i.e

                      if (Value=0)
                      do the following.........

                      any ideas or pointers would be greatly appreciated.
                      thx
                      DAvid

                      ***********************************

                      Can I assume that this is now possible with the new Beta version of NT.
                      If so, & CalculateOnBarClose=True, would the execution happen in real time still (like it tyipcally does for SetTrailStop) or would the execution happen OnBarClose?

                      many thx in advance
                      David

                      Comment


                        #12
                        Yes, see the NT 6.5 Beta Help Guide, OnOrderUpdate() method. This stuff is for experienced programmers and we will roll out reference samples in time. One already exists here -

                        RayNinjaTrader Customer Service

                        Comment


                          #13
                          thx Ray - regarding the second question..... if CalculateOnBarClose=True, does the OnOrderUpdate() method update in real time? i.e. not only update On Bar Close.

                          thx
                          DAvid

                          Comment


                            #14
                            Here is detailed answer to your question:

                            RayNinjaTrader Customer Service

                            Comment


                              #15
                              Ray
                              Now i am confused.....

                              this is some of the text in the reference sample:

                              The OnOrderUpdate() method is updated whenever the state of an order changes which allows you to submit and control your stop-loss and profit target orders the instant your entry order is filled.

                              Now a TrailStop updates on every tick (i.e. new order for every up tick on a trailing stop) even if CalculateOnBarClose = True.

                              This appears to conflict with your last statement......

                              pls advise. thx

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by funk10101, Yesterday, 09:43 PM
                              1 response
                              13 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by TheWhiteDragon, 01-21-2019, 12:44 PM
                              5 responses
                              551 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by rtwave, 04-12-2024, 09:30 AM
                              5 responses
                              37 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by funk10101, Today, 12:02 AM
                              1 response
                              11 views
                              0 likes
                              Last Post NinjaTrader_LuisH  
                              Started by GLFX005, Today, 03:23 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_Erick  
                              Working...
                              X