Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

please create a breakeven for Strategy builder

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

    please create a breakeven for Strategy builder

    please create a breakeven for Strategy builder

    #2
    Hello DTSSTS,

    Thanks for your post.

    The Strategy Builder can create Breakeven functionality by logically controlling your exit in Conditions and Actions. I have attached a demonstration that can explain the basics behind creating such a strategy. Keep in mind, logic will have to be added to reset your bool that controls the Move To Breakeven so the strategy's next entry will submit the exit to the initial level.

    Demo - https://www.screencast.com/t/DsJf82f464f

    We have previously tracked your interest to have Breakevens offered out of box in the Strategy Builder in the thread here. The feature request ticket ID is SFT-2212.

    We collect interest in feature requests before determining if the feature should be implemented. For that reason we cannot offer an ETA or promise of fulfillment. Upon implementation, the number for the ticket ID can be publicly found in the Release Notes page of the help guide. I will provide a link below.

    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

    Please let us know if you have any questions.
    JimNinjaTrader Customer Service

    Comment


      #3
      spent 10 days trying to get one to work

      https://ninjatrader.com/support/foru...-average-price

      Comment


        #4
        i watched your video and will try that approach tonight thanks, where have you been for the last 10 days

        Comment


          #5
          Hello DTSSTS,

          We should be clear that in the Support Department, it is not our role design logic, but to show you how to use the tools we have available like the Strategy Builder and documented NinjaScript code. My video in post #2 is to convey an idea, and should not be taken as an example that should be used as-is.

          When creating logic, it will be necessary to take debugging steps to understand exactly what the logic you have written is doing so it can be corrected. It looks like you and NinjaTrader_Chelsea were discussing how to debug the logic. I have a video that describes how debugging prints can be added in the Strategy Builder which may help you to check and verify the logic you have created in the Builder.

          Debugging in the Strategy Builder - https://www.screencast.com/t/8uvjfM8h

          Please let me know if I can be of further assistance.
          JimNinjaTrader Customer Service

          Comment


            #6

            https://gyazo.com/4b0b8e49db07e17432feb9fffd1b4d5b

            as far as i can tell this is what i have been working on for 9 days. the issue is by the time you get back to the point For your breakeven order to be submitted your condition will no longer be True

            Default input[0] > Position.AveragePrice + (5 * TickSize))

            will not be True when the price reaches the BreakEven point

            Comment


              #7
              Hello DTSSTS,

              The idea is to set a bool when your Breakeven condition is true.

              When the bool is false and you are in position, your initial stop should be submitting.

              When the bool is true and you are in position, your an exit order should be submitting to the average entry price.

              Please let me know if you have any additional questions.
              JimNinjaTrader Customer Service

              Comment


                #8
                i am telling you it does not submit. I agree that it should. I actually sent another support topic. I have not been able to get ANY stopmarket orders to work on renko bars. ANY so i think there is issue there. Thanks

                Comment


                  #9
                  Hello DTSSTS,

                  Do you see any errors in the log tab of the Control Center?

                  Is the strategy in a virtual position calculated from historical data after you enable the strategy? Please see the bottom of this post for more details.

                  When you enable TraceOrders (set in Default Properties page of the Strategy Builder) do you see any feedback that tells you what is happening?

                  When you add debugging prints, can you verify that your conditions are becoming true, and your order submission methods are in fact getting reached?

                  When a strategy is enabled, it processes historical data to determine trades that the strategy would have made on the data that is already on the PC/chart and to determine what position the strategy is in. (Strategy positions are separate from actual Account positions.) If the strategy calculates that is in a virtual position when it transitions to processing realtime data, the strategy's Start Behavior may waiting until this position becomes flat before orders are allowed to submit with realtime data. (Wait Until Flat.) You can observe the Strategies tab of the Control Center if the strategy is in a virtual position waiting to become flat. The strategy will be orange/yellow when waiting to for the historical position to be closed, and will be green when allowed to trade live.

                  Strategy Position vs. Account Position - https://ninjatrader.com/support/help..._account_p.htm

                  Start Behaviors - https://ninjatrader.com/support/help..._positions.htm

                  Trace Orders - https://ninjatrader.com/support/help...aceorders2.htm

                  I look forward to being of further assistance.
                  JimNinjaTrader Customer Service

                  Comment


                    #10
                    Great Video to set Break Even or Other advancing stops

                    Comment


                      #11
                      My only post on this forum, and I just wanted to say thank you for making the video but for some reason I just cannot get the stop orders to get placed. I followed your directions exactly. I understand the logic behind it, but my neither of stop orders get placed after my entry gets filled. I am going on 12 hours (3 night) now, I have the rest of my strategy done but I cant let this strategy run wild with a moving trailing stop IT NEEDS TO BE A STOP BACK TO BREAK EVEN.

                      Comment


                        #12
                        Welcome to the forums noshowstock!

                        I have attached some examples that can demonstrate breakeven behaviors in the Strategy Builder using Exit methods in the Conditions and Actions field. I still recommend the instruction included here as it explains the logic involved and how you can take debugging steps to check how your logic is processed. Our goal is to provide resources and instruction to accomplish your goals as we cannot design logic for all client inquires.

                        We look forward to assisting.
                        Attached Files
                        Last edited by NinjaTrader_Jim; 06-05-2020, 01:40 PM.
                        JimNinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_Jim View Post
                          Welcome to the forums noshowstock!

                          I have attached some examples that can demonstrate breakeven behaviors in the Strategy Builder using Exit methods in the Conditions and Actions field. I still recommend the instruction included here as it explains the logic involved and how you can take debugging steps to check how your logic is processed. Our goal is to provide resources and instruction to accomplish your goals as we cannot design logic for all client inquires.

                          We look forward to assisting.
                          Thank you for assisting I have had those written in my strategy also. But I cant get any stop orders to trigger from the "Do the following" window. I can only get stop orders placed if I place them in the "Conditions And Actions" tab. Even when I run your two samples that you gave me they just end with "exit on session close" they don't even place stops anywhere. I thank you for your time but I have spent about 60 hours and I am not even 1/4 through my strategy but this has me at a complete road block.

                          p.s. Try to run those strategies yourself and you will see that they will not throw out stop loss orders, let alone move them to break even. The logic makes sense but there is just something missing that is not letting the stops be placed through the "Do the following" window.

                          p.s.s. I am in the process of adding some prints to see what is "stuck"

                          Comment


                            #14
                            Hello noshowstock,

                            The MoveToBEStrategyBuilder zip I uploaded appears to be a version that is calling Enter methods for the stop loss, when ExitLongStopMarket should be used. I checked the version I have on this PC and I uploaded the correct version to post #12. Attached here is a screenshot showing the Breakeven exit taking place.

                            I look forward to assisting.
                            Attached Files
                            JimNinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_Jim View Post
                              Hello noshowstock,

                              The MoveToBEStrategyBuilder zip I uploaded appears to be a version that is calling Enter methods for the stop loss, when ExitLongStopMarket should be used. I checked the version I have on this PC and I uploaded the correct version to post #12. Attached here is a screenshot showing the Breakeven exit taking place.

                              I look forward to assisting.
                              Thank you for your help, can't wait to try it later.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Zeos6, Today, 02:15 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post Zeos6
                              by Zeos6
                               
                              Started by magnatauren, Today, 02:12 PM
                              0 responses
                              1 view
                              0 likes
                              Last Post magnatauren  
                              Started by tornadoatc, Today, 01:23 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post tornadoatc  
                              Started by Akee5, Today, 12:46 PM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_ShawnB  
                              Started by XM010-3841, Today, 12:57 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post XM010-3841  
                              Working...
                              X