Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

sell entry breakeven and trail stop

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

    sell entry breakeven and trail stop


    Hello everyone,
    as you know, ninjatrader has not yet set up in the builder strategy an easy system like the atm strategy for the breakeven trail stop, its implementation is only possible after multiple complex operations, which are very complicated for a programming novice.A request has already been made by a large number of members, but I imagine it will be done in the near future.This function can be easy for many of you, but it remains enormously complicated for beginners, a real ordeal.
    Fortunately some examples were given by Chelsea and other members of the forum,thanks so much, but this only concerns the part for buy orders.
    I was able to set up this part successfully.
    Regarding sell orders, despite my efforts, I could not put the breakeven and the trailstop.I would surely find the answers in a few months or years, but I have already managed, after a lot of effort, to make a system that suits to me,Im just missing this part.I was able to ask a moderator for help, but since I am a beginner, understanding his answer will probably take a few months, and respond to his requests a few more.
    I would like to know if it is possible that someone can upload an example of a sell breakeven trail stop,for the builder, it would help the community enormously and especially beginners who are getting into automated systems.Or much better to put it directly in the attached system,so everyone can use it as example and put their entry logic inside.
    I can also compensate the person for this information and for his time spent in carrying it out,just msg me
    Attached Files

    #2
    Hello janio973,

    Thanks for your post.

    Yes, it can be very frustrating trying to learn something new and we appreciate your efforts to learn.

    I've taken NinjaTrader_Chelsea's strategy builder trail stop example and modified it to show both long and short. Here is a link to a short video on the strategy: https://Paul-ninjaTrader.tinytake.co...OF8xODI5Mjg5MQ

    To provide further understanding, here is an explanation of the strategy:

    The Strategy is set to Calculate.OnEachTick and will only function with Real-time or playback with market replay data. You should not use Calculate.OnBarClose with a trailing stop type strategy as this will cause the orders to be moved incorrectly relative to the current price. You could use Calculate.OnPriceCange.

    Inputs:

    TrailFrequency (Long order only) sets the number of ticks of profit it takes to then adjust the stop. This must be a positive value because it is added to the current price to set a trigger level above the price that will then adjust the stop.

    TrailStopDistance (Long orders only), set the number of ticks that the stop will be placed BELOW the current price. This must be a negative number because it is added to the current price (so adding a negative subtracts).

    ShortTrailFrequency (Short orders only) Sets the number of ticks of profit to then adjust the stop. This must be a negative value because it is (effectively) subtracted from the current price to set a trigger level below the current price to then adjust the stop.

    ShortTrailStopDistance (Short orders Only), sets the number of ticks that the stop will be placed ABOVE the current price. This must be a positive value as it is added to the current price.


    TrailBuilderLongShortExample.zip
    Last edited by NinjaTrader_PaulH; 12-09-2021, 02:54 PM. Reason: change example from OnEachTick to OnPriceChange

    Comment


      #3

      Hello NinjaTrader_PaulH,
      You can not imagine how reassuring it is to see that the ninjatrader team really takes care of their clients and do their best to help them and allow them to evolve in their projects,now I could continue working on my automated system and continue my learning.
      I will look carefully at all the information you sent me above.
      Thank you very much for helping out

      I wish you a pleasant day

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      650 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      370 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      577 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X