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

Stops not working as expected

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

    Stops not working as expected

    i have a system that has 2 buy Sets. Buy Long for Entry L and Entry L2 and one Exit Set. Sell order for Entry L and L2.

    i have stop condition for Entry L and L2
    Even a stop condition for the entire position.
    The stops use the Currency setting.

    Please advise





    Attached Files

    #2
    Hello hdge4u,

    Thanks for your post and screenshots.

    The XL exits would be controlled by your strategy logic, can you confirm that these exits are working as expected?

    What is the strategy's "calculate" setting (Calculate.OnBarClose, Calculate.OnPriceChange, Calculate.OnEachTick)?

    When you run your strategy, do you see any errors listed in the NinjaTrader control center's "Log" tab?

    I would suggest removing the "named" stoploss exits and just use the single stoploss with no signal name and retest.

    Paul H.NinjaTrader Customer Service

    Comment


      #3

      The XL exits would be controlled by your strategy logic, can you confirm that these exits are working as expected? Exits work as expected. Screen Shots show this.

      What is the strategy's "calculate" setting (Calculate.OnBarClose, Calculate.OnPriceChange, Calculate.OnEachTick)? on each tick

      When you run your strategy, do you see any errors listed in the NinjaTrader control center's "Log" tab? no errors found. Trace Log Needed?

      I would suggest removing the "named" stoploss exits and just use the single stoploss with no signal name and retest. ? do you mean to hard code the number instead of using the Input named "Stop"

      Comment


        #4
        Hello hdge4u,

        Thanks for your reply.

        You have created 3 SetStopLoss() , remove the two that are tied to signals L and L2, and test again with just the one SetStopLoss().
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          I set the stop loss for the entire position, ran the playback, and there were no losses in excess of the $500 parameter.
          Trade blotter attached.
          Attached Files

          Comment


            #6
            Entry L is not adhering to the stop parameter when both the input "stop" and $500 hard code is used.
            Attached Files

            Comment


              #7
              Hello hdge4u,

              Thanks for your reply.

              Please attach the strategy builder strategy file for review. The file can be found in Documents>NinjaTrader8>bin>Custom>Strategies> and will be the .cs file type.

              If you would prefer not to post your strategy, you are welcome to write into ScriptingSupport[at]NinjaTrader[dot]com, mark the e-mail subject atten: Paul and Ticket#3028211. In the body of the e-mail include a link to this thread and attach your file there.

              Paul H.NinjaTrader Customer Service

              Comment


                #8
                let's troubleshoot this a bit more.

                For what it's worth, i loaded up the L2 conditions from another strategy and pasted it into the builder, could that be an issue?

                Should i just rewrite the strategy, it's not that complicated?

                Comment


                  #9
                  Hello hdge4u,

                  Thanks for your reply.

                  I would not be able to answer without seeing the data.

                  If it does not take that much time go ahead and create new.
                  Paul H.NinjaTrader Customer Service

                  Comment


                    #10
                    would entries per direction have anything to do with this? Currently have 1 entry per direction and all entries handling.

                    Comment


                      #11
                      Hello hdge4u,

                      Thanks for your reply.

                      The entries per direction and entry handling relate to the Entries. With entries per direction set to 1 and entry handling set to all entries, the strategy could only allow a single entry per direction and all other entries would be ignored (meaning the order is not placed). This would mean you could have an "L" or "L2" entry but not both while one or the other is active.
                      References:



                      These would not relate to a stop not working as expected.
                      Paul H.NinjaTrader Customer Service

                      Comment


                        #12
                        see attached strategy that is not adering to the stops
                        Attached Files

                        Comment


                          #13
                          Hello hdge4u,

                          Thanks for your reply.

                          Your strategy has the "exit on session close" turned off and you are using a TimeInForce setting of Day.

                          What is happening is that when you have a position that is not closed by the end of the day has its stop canceled by the time in force setting of Day.

                          Please change the setting to GTC.

                          Paul H.NinjaTrader Customer Service

                          Comment


                            #14
                            thanks. that fixed it.

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by lorem, Yesterday, 09:18 AM
                            4 responses
                            14 views
                            0 likes
                            Last Post lorem
                            by lorem
                             
                            Started by Spiderbird, Today, 12:15 PM
                            0 responses
                            5 views
                            0 likes
                            Last Post Spiderbird  
                            Started by cmtjoancolmenero, Yesterday, 03:58 PM
                            12 responses
                            42 views
                            0 likes
                            Last Post NinjaTrader_ChelseaB  
                            Started by FrazMann, Today, 11:21 AM
                            0 responses
                            6 views
                            0 likes
                            Last Post FrazMann  
                            Started by geddyisodin, Yesterday, 05:20 AM
                            8 responses
                            52 views
                            0 likes
                            Last Post NinjaTrader_Gaby  
                            Working...
                            X