• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


Trailing stop

  • Filter
  • Time
  • Show
Clear All
new posts

    Trailing stop


    In the strategy builder how do I create a trailing stop which is activated when the low of the previous bar is broken?


    Hello blueboy,

    Thanks for your post.

    The SetTrailStop() method that can be used in the Stops and Targets section of the Strategy Builder will prep NinjaTrader so a trailing stop is started after the entry order comes back as filled.

    If you would like to create a trail stop that begins when you are already in position and the low of the previous bar is broken, you could use your own Exit methods in the Conditions and Actions section of the Strategy Builder. I have included a demonstration explaining how this could be set up.

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

    More tips and a walk through on using the Strategy Builder can be found in the Strategy Builder 301 webinar.

    Strategy Builder 301 - https://www.youtube.com/watch?v=HCyt90GAs9k

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


      Thanks for the video. I can't tell you how many hours I have spent trying to get the Strategy builder to work with just a trailing stop. There was no SetstopLoss in my efforts, so your video is very helpful.

      Also do you have a video for using the ATM in a Strategy with Price closing over or under an indicator. I have looked at the sampleATM strategy but I am so lost and exhausted trying to get it to work.

      Basically I want the ATM to manage the trailing stop that goes into effect after a five tick increase (it would be nice if I could also optimize this input), and then trails by 13 ticks or some other number that I can optimize as well as being able to manually move the stop on the chart or Dome, if I want to tighten up the stop.

      I know it can be done from reading the help guide, I just don't know the language and syntax well enough to put the pieces together.

      Thank you if you can help!!!!!


        Hello TradingGuy,

        Thanks for the reply.

        I usually make demonstration videos to describe an expected behavior or to walk through a concept in the Strategy Builder. Creating a video that walks through and explains how a script works and the correct syntax that is used begins to escape the scope of services we can offer for support.

        As the ATM Strategy methods cannot be applied in the Strategy Builder, the best resource that we have available is the working example included with NinjaTrader.

        If you are looking for educational programming resources to learn the syntax, I may suggest to check out the C# programming education resources in the NinjaTrader 7 Help Guide.Another good tip is to use the Strategy Builder to create a strategy and click View Code with each code addition. More robust materials on C# programming can be found external to NinjaTrader.

        C# Programming concepts (NT7 Help Guide) - https://ninjatrader.com/support/help...g_concepts.htm

        Also to consider, we do have an EcoSystem of NinjaScript Consultants who can write this strategy or any other NinjaScript at your request. If this is something that interests you, please let us know and we can have someone reach out with more information.
        JimNinjaTrader Customer Service


        Latest Posts


        Topics Statistics Last Post
        Started by lavalampmj, Today, 05:25 PM
        0 responses
        Last Post lavalampmj  
        Started by Antares66, Today, 05:19 PM
        0 responses
        Last Post Antares66  
        Started by jmneto, Today, 05:18 PM
        0 responses
        Last Post jmneto
        by jmneto
        Started by Bobbyj78, Today, 02:21 PM
        2 responses
        Last Post bltdavid  
        Started by EnveousColnago, Today, 02:10 PM
        1 response
        Last Post NinjaTrader_Ariana