Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Request Breakeven Functions in Strategy Builder

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

    Hello artvandelay123,

    Thanks for your note.

    I have added your vote to this feature request.

    Let me know if I may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      Please add my vote to the breakeven feature. Just get it done already. Cmon, since 2017 people have been asking for this.
      Last edited by Jamie7834; 11-04-2022, 02:00 AM.

      Comment


        Hello Jamie7834,

        Welcome to the NinjaTrader forums!

        There is already a solution for this with logic so it may not be high priority.

        Once there is enough demand it will be considered.

        Please note, we receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing, so we cannot offer an ETA or promise of fulfillment.

        When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number may be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

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

        I've added your vote to SFT-2212. Thank you for your vote.​
        Chelsea B.NinjaTrader Customer Service

        Comment


          Originally posted by NinjaTrader_BrandonH View Post
          Hello JMont1,

          Thanks for your note.

          Please see the attached example strategy, LongOrShortTrailBuilderExample, which demonstrates creating a trailing stop in the Strategy Builder for long or short positions.

          You could compare the logic of the attached LongOrShortTrailBuilderExample strategy to the logic in your strategy to see where there may be differences.

          I am also attaching another example script, LongOrShortBreakevenBuilderExample, which you might find helpful. This example demonstrates using breakeven for long or short positions in the Strategy Builder.

          Please let me know if I may assist further.
          LongOrShortBreakevenBuilderExample - I added Long and Short profit target to "Stops and targets section", when an order is filled, I see the stop order line but I don't see the profit target line on chart. Interestingly, the profit target gets filled like it's suppose to, but I do not see it all on the chart. Is that expected activity for the strategy builder breakeven solution implemented in LongOrShortBreakevenBuilderExample? ,I'm used to see both on profit target and stop loss order on a chart. Let me know

          Comment


            Hello Jamie7834,

            Thanks for your note.

            Yes, this is the expected behavior of the LongShortBreakevenBuilderExample script linked in post # 123. The strategy will place a Long or Short entry order with EnterLong()/EnterShort(). A stop loss order is placed on the chart using ExitLongStopMarket()/ExitShortStopMarket(). No profit target order is placed on the chart. Once the Close price reaches the AveragePrice of the entry order + LongTargetTicks/ShortTargetTicks, an exit order method is called, ExitLong()/ExitShort(), to exit the entry order.

            You could review the logic of the strategy by opening a New > Strategy Builder window, selecting the LongShortBreakevenBuilderExample script, and navigating through the Strategy Builder screens.

            Let me know if I may assist further.

            Brandon H.NinjaTrader Customer Service

            Comment


              Hi all,

              Thanks for the strategy examples, that's very helpful.

              One question, though: I see that it's set to Calculate.OnBarClose. My requirement is that the strategy enters a position at candle close, but the move of the stop to breakeven should happen during the candle, so the calculation must happen on price change. How can I accomplish that?

              Thanks in advance

              Comment


                Hello dominikbritz,

                Thanks for your note.

                You could consider separating the logic of your strategy to calculate some logic OnBarClose and other logic OnPriceChange or OnEachTick.

                Note that this requires manually programming your logic in an unlocked script.

                Logic can be separated between Calculate.OnEachTick and Calculate.OnBarClose using IsFirstTickOfBar. Please note that a hosted script will inherit the Calculate mode of the script that hosts it. You can take the following approach to differentiate logic between OnBarClose and OnEachTick processing.

                Please see this reference sample which demonstrates a technique used for those who need to separate their logic to calculate some values on each tick and others only on the close of a bar. You will set your host script to Calculate.OnEachTick and use if(IsFirstTickOfBar) and place all code that needs to calculate once every bar within that condition check. Then place all code that you want to calculate OnEachTick outside of the IsFirstTickOfBar condition check.

                SampleEnterOnceExitEveryTick -https://ninjatrader.com/support/help...either_cal.htm

                Please let us know if we may assist further.​
                Brandon H.NinjaTrader Customer Service

                Comment


                  That's exactly what I was looking for. Thanks a lot!

                  Comment


                    Originally posted by NinjaTrader_ChelseaB View Post
                    Hello 123r34,

                    I am happy to submit a feature request on your behalf for the NinjaTrader Development to consider this for a future version of NinjaTrader. Please let me know if you would like to do this.

                    NinjaScript Strategies are meant to have the behavior customized by the logic of the programmer including any trailing or breakeven movements.

                    Attached are two examples of a breakeven movement and a trailing action created with the Strategy Builder.

                    (Update August 5th, 2020 - changed the CurrentTriggerPrice and CurrentStopPrice variables to doubles)
                    Sorry in advance for the newb question, I am using Chelsea's Breakeven example as a template and just modifying it to work with a very simple strategy for the stop loss portion. I have figured out how to get the stop loss function to work as I want. However, I can't get a profit target to work. If I add a profit target in the (stops and targets) tab the strategy does not work properly at all kind of goes haywire and makes very weird entries and exits. Remove it and the strategy works perfectly as far as the stop loss goes but only takes breakeven and stop loss trades because there is no profit target.

                    I assume I need to build my profit target into the conditions and actions but I'm unsure how to do this. I would like a simple 12 tick profit target. I feel like maybe I need to add a set 6 and a new trigger? However Im not familiar with adding triggers either. Sorry very new to Strategy builder. Thanks for any help.

                    Comment


                      Hello XxJamesAxX,

                      Thanks for your note.

                      I understand that you are using the Set methods in the Stops and Targets screen and Exit methods in the Conditions and Actions screen of the Strategy Builder.

                      It is not possible to use Set methods seen in the Stops and Targets screen and Exit methods from the Conditions and Actions screen as this creates a violation of the Managed Approach internal order handling rules linked below.

                      Managed Approach Internal Order Handling Rules: https://ninjatrader.com/support/help...rnalOrderHandl ingRulesThatReduceUnwantedPositions

                      You must use either Set methods or Exit methods in your strategy, not both.

                      I have attached a simple example script that demonstrates creating stop loss and profit target orders using Exit methods for you to view.

                      Here is a link to our publicly available training video, 'Strategy Builder 301', which you might find helpful.

                      Strategy Builder 301 — https://www.youtube.com/watch?v=_KQF2Sv27oE&t=13s

                      Please let me know if I may assist further.
                      Attached Files
                      Brandon H.NinjaTrader Customer Service

                      Comment


                        I'm not able to confirm if NinjaTrader has any plans to add a breakeven feature to the Strategy Builder tool, but it is possible that they are considering it. In the meantime, you may be able to use other features of the Strategy Builder tool to help you achieve a similar result to a breakeven feature. For example, you could use the "Trailing Stop" feature to move your stop loss to a breakeven point once a certain profit level has been reached. You could also use the "Profit Target" feature to set a target profit level, and then use the "Scale Out" feature to close partial positions at specific profit levels. Recently I found an article about avoiding some risks, read more if you would like to scale your business effectively.
                        Last edited by NinjaTrader_BrandonH; 12-27-2022, 10:52 AM.

                        Comment


                          Hello dewiclements,

                          Thanks for your note.

                          I have removed the third-party website link from your post because it goes against our NinjaTrader Forums policies.

                          No links to third-party websites are allowed to be posted in the Forums. If you want to share a third-party link with a community member on the Forums, you should do so by sending the community member a link to third-party sites as a private message.

                          Please let me know if I may assist further.
                          Brandon H.NinjaTrader Customer Service

                          Comment


                            Originally posted by NinjaTrader_ChelseaB View Post
                            Hello 123r34,

                            I have received a tracking ID for your request.

                            Your request for the Strategy Builder to have breakeven settings is being tracked with ID #SFT-2212.

                            Please note it is up to the NinjaTrader Development to decide if and when a request will be implemented.

                            We appreciate your feedback. Please let us know of any other suggestions you have for the NinjaTrader Platform.
                            I vote for this feature too!

                            Comment


                              Hello WattMan,

                              Thanks for your post.

                              Your vote has been added to this feature request.

                              Please let me know if you have further questions on this.
                              Brandon H.NinjaTrader Customer Service

                              Comment


                                Originally posted by NinjaTrader_BrandonH View Post
                                Hello JMont1,

                                Thanks for your note.

                                Please see the attached example strategy, LongOrShortTrailBuilderExample, which demonstrates creating a trailing stop in the Strategy Builder for long or short positions.

                                You could compare the logic of the attached LongOrShortTrailBuilderExample strategy to the logic in your strategy to see where there may be differences.

                                I am also attaching another example script, LongOrShortBreakevenBuilderExample, which you might find helpful. This example demonstrates using breakeven for long or short positions in the Strategy Builder.

                                Please let me know if I may assist further.
                                I think a lot of us are looking for partial take profit, breakeven after the 1st target and trailing stop on the 2nd.


                                An example would be to enter with 2 contracts -> Take profit on 1 at 10 ticks -> Breakeven on the 2nd contract or let it trail with a set trailing stop

                                I would so much appreciate if you could help with this.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by trilliantrader, Today, 03:01 PM
                                1 response
                                7 views
                                0 likes
                                Last Post NinjaTrader_Clayton  
                                Started by geddyisodin, Today, 05:20 AM
                                6 responses
                                34 views
                                0 likes
                                Last Post geddyisodin  
                                Started by pechtri, 06-22-2023, 02:31 AM
                                9 responses
                                122 views
                                0 likes
                                Last Post NinjaTrader_ChelseaB  
                                Started by frankthearm, 04-18-2024, 09:08 AM
                                16 responses
                                67 views
                                0 likes
                                Last Post NinjaTrader_Clayton  
                                Started by habeebft, Today, 01:18 PM
                                1 response
                                8 views
                                0 likes
                                Last Post NinjaTrader_ChelseaB  
                                Working...
                                X