Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Request Breakeven Functions in Strategy Builder

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

  • artvandelay123
    replied
    Please add my vote for this feature. Thanks.

    Leave a comment:


  • NinjaTrader_BrandonH
    replied
    Hello Uregon,

    Thanks for your note.

    You could view the LongShortBreakEvenBuilderExample sample linked in post #123 for how to create a long for a short breakeven strategy using the Strategy Builder.

    You could study how the BreakEvenBuilderExample_NT8 and LongShortBreakEvenBuilderExample samples work and implement similar logic into your strategy. You could compare the samples to your strategy to see where the differences might be.

    Let me know if I may assist you further.

    Leave a comment:


  • Uregon
    replied
    NinjaTrader_ChelseaB

    Please upload the
    BreakEvenBuilderExample_NT8.zip (11.5 KB, 1624 views)

    For trading market Short too


    Thank you

    Leave a comment:


  • NinjaTrader_BrandonH
    replied
    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.
    Attached Files

    Leave a comment:


  • JMont1
    replied
    image_74869.png
    Originally posted by JMont1 View Post
    Strategies can either use standard Stop and Targets from Strategy Builder OR a manual method as described and applied to the attached strategy. This version includes not just the Break Even and Trigger Stops but a target set for manual trading. The benefit of this manual trading is that you could really get intricate in the trade management for long term trades. But still the standard stop and targets likely best to use.

    If you want to use the standard ATM then you MUST delete the step for manual profit or it could be an issue.

    Not being a programmer I cannot trust this completely for live trading but trade in SIM then decide if you want to enter a matching entry.

    Again this is only for longs. If anyone modifies it for shorts or adds more profitable logic it would be appreciated if a URL to that strategy is sheared by a post here.

    BTW, it appears to do well in CL using a 150 second (2 1/2 minutes) timeframe.
    NinjaTrader_Kate & NinjaTrader_ChelseaB I have attempted to build a framework using Break Even and Trailing info. I am stuck where I cannot get the trailing stop to not trail lower from its current position. Since TrailstopA in Step 6 is trailing down as the long price decreases, and there is no option for previous stop levels to be designated, ie. TrailStopA[1) the stop goes lower with the close[0]
    Please help.
    Attached Files
    Last edited by JMont1; 08-03-2022, 02:22 PM.

    Leave a comment:


  • NinjaTrader_BrandonH
    replied
    Hello j0sephk3nt and JMont1,

    Thanks for your notes.

    j0sephk3nt,

    I have added your vote for this feature request.



    JMont1,

    There are no updates for this feature request at this time.

    Deciding on features for future releases is not a simple black and white decision. There are many factors involved including but not limited to:
    • Demand which is measured by objective user requests and subjective discretion on the part of our Product Management team.
    • Feasibility
    • Developer bandwidth
    • Current projects in the queue
    • Economics
    You'll find a note regarding your feature request in the release notes when a feature is implemented.

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

    In regard to your question about Strategy Builder breakeven logic, we do not have a reference sample that demonstrates exactly what you have described. However, you could find examples of Strategy Builder breakeven and trailing stop in the Strategy Builder on the forum thread linked below. Note that these are meant to be reference samples and not fully working scripts. Ultimately, it would be up to you to program the logic of the strategy to accomplish your specific goal.

    https://ninjatrader.com/support/foru...der#post806596

    Let me know if I may assist further.

    Leave a comment:


  • JMont1
    replied
    Originally posted by JMont1 View Post
    Strategies can either use standard Stop and Targets from Strategy Builder OR a manual method as described and applied to the attached strategy. This version includes not just the Break Even and Trigger Stops but a target set for manual trading. The benefit of this manual trading is that you could really get intricate in the trade management for long term trades. But still the standard stop and targets likely best to use.

    If you want to use the standard ATM then you MUST delete the step for manual profit or it could be an issue.

    Not being a programmer I cannot trust this completely for live trading but trade in SIM then decide if you want to enter a matching entry.

    Again this is only for longs. If anyone modifies it for shorts or adds more profitable logic it would be appreciated if a URL to that strategy is sheared by a post here.

    BTW, it appears to do well in CL using a 150 second (2 1/2 minutes) timeframe.
    NinjaTrader_ChelseaB Is there any update to SFT-2212?
    Also, my initial post of a sample still works. But as I tried to use the Trail stop I have run into an issue with not having a trail trigger. So if I want my trail frequency to be 3 ticks, then my initial trail stop is 3 ticks from entry.
    Very few bots would immediately hit stop out as I have found. So like it basically needs a method to start it after let's say 10 ticks. Can you update your sample with something like that?

    Leave a comment:


  • j0sephk3nt
    replied
    Add my vote for the feature aswell please

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    Hi alnghiem, I am sorry but I have already provided many example modifications of the original script. This thread will remain open to the community to contribute.

    Kind regards,
    -ChrisL

    Leave a comment:


  • alnghiem
    replied
    Hi, I'm struggling to figure out how to combine the Breakeven commands with the Trailing Stop commands. Could someone please send me an example? Thanks!

    Leave a comment:


  • NinjaTrader_ChrisL
    replied
    Hi, I uploaded a short version of the break even strategy builder example. Please see attached.
    Attached Files

    Leave a comment:


  • joeyfreshwater
    replied
    I was able to get the breakeven to work when entering Long. Can you post a file on Beak Even when entering Short? I attempted to reverse everything but was unsuccessful. Thanks!

    Leave a comment:


  • HaveGunsWillTravel
    replied
    Originally posted by Steve4616 View Post

    This is currently my issue. I have finally, after 9 days, got the breakeven working and everything looks great on the lower timeframe charts(15 seconds etc) however as soon as i try on larger time frames, the stop doesn't work if the price on the entry bar goes below your stop price, and will never work after that bar if this happens. Has anyone figured out a workaround on this?
    You probably need to bring in a tick time frame, then execute orders on it. Doing it this way will not allow high resolution back tests via the Strategy Analyzer. Instead you have to unlock the code, then index the order executions to that tick data series. Whenever you back test from there it will use the tick data for orders and everything should work better.

    the reason why you get wild on higher time frames is because of the bar height and how the engine calculates....explained here:

    https://ninjatrader.com/support/help...lFillAlgorithm

    You need more 'intrabar granualarity' and then you have to manage your order executions like this:

    https://ninjatrader.com/support/help...BasicOperation

    mapping all the orders to the tick series using:

    "AnOrderMethod"(intbarsInProgressIndex,boolisLiveUntilCancelled,intquantity,doublelimitPrice,stringsignalName)

    so 0 is your chart TF and if you added 1-tick that would be '1'

    so intbarsInProgressIndex would be set to '1'

    Here is a post going into more detail....

    https://ninjatrader.com/support/foru...nce#post100192
    Last edited by HaveGunsWillTravel; 03-22-2022, 06:20 AM.

    Leave a comment:


  • Steve4616
    replied
    Originally posted by Boesdude View Post
    Hi

    When using examples like the BreakEvenBuidler you always end up trading with no stop loss until the close of the entry bar. Is there anyway to work around this. Post the first bar everything works perfectly as you have a stop.

    thank you
    This is currently my issue. I have finally, after 9 days, got the breakevens working and everything looks great on the lower timeframe charts(15 seconds etc) however as soon as i try on larger time frames, the stop doesn't work if the price on the entry bar goes below your stop price, and will never work after that bar if this happens. Has anyone figured out a workaround on this?

    Leave a comment:


  • Chidiroglou
    replied
    Hello Chelsea
    I have the
    TrailBuilderExample_NT8.zip (6.1 KB, 579 views
    tested and works great but it only opens long positions.
    Do you have the possibility to create a script of this strategy also for sell positions?
    Unfortunately I do not have the experience for this, I would be very grateful.

    Greetings Vasili

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
0 responses
644 views
0 likes
Last Post Geovanny Suaza  
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
0 responses
367 views
1 like
Last Post Geovanny Suaza  
Started by Mindset, 02-09-2026, 11:44 AM
0 responses
107 views
0 likes
Last Post Mindset
by Mindset
 
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
0 responses
569 views
1 like
Last Post Geovanny Suaza  
Started by RFrosty, 01-28-2026, 06:49 PM
0 responses
573 views
1 like
Last Post RFrosty
by RFrosty
 
Working...
X