Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90


How to set parabolic/trailing stop strategy builder AND a time gap issue over night

  • Filter
  • Time
  • Show
Clear All
new posts

    How to set parabolic/trailing stop strategy builder AND a time gap issue over night

    In the strategy builder. I am trying to figure out how to set up a moving stop. Basically, for example, let's say I have 100 tick profit target. I wan the stop to move to 25 when price reaches 50 ticks, then move to 50 ticks profit, when price moves to 75 ticks, then close out when price reaches 100. What exactly and where do I input that into the strategy builder?

    I have searched all the help sections for parabolic, if that is even what I need? Those instructions are just not complete enough. For example, under "Acceleration", it just says "this is the acceleration value". What does that mean? Same thing for "max acceleration". It is the "max" for the acceleration (which is never explained...i/e, what is it, what value should be used (.1,1,1000, who knows).

    I just want to move the stop in increments. Please tell me how to do that.

    AND I had a weird thing happen. I am running a LIVE strategy on the micro just to experiment. I put the computer to sleep when I leave the office every night. When I arrived this morning, the chart literally has NO candles or executions during the time the computer was put to sleep. Does that make sense? Even IF the computer being put to sleep paused the strategy (is that correct btw?), how would any of that affect the candle display?

    Thank you

    Hello Touch-Ups,

    Thank you for your post.

    One option available to you is to set a trailing stop, although this stop would trail with each tick of profit rather than adjusting for every 25 additional ticks in profit. A trailing stop is set to a specific value when the entry is filled, and then it will keep the same distance from the price and trail behind for each tick of profit. To achieve what you have described, you could use exit order methods and add logic in the Strategy Builder that modifies the price of the exit methods. It is important to note that you can not use exit methods in conjunction with any orders from the Stops and Targets window, which use Set() methods, per the internal order handling rules:

    There is an example created by my colleague Chelsea that uses the Strategy Builder to perform a breakeven movement on an ExitLongStopMarket order. You could utilize a similar approach that modifies the price of the Exit order when 50 ticks and 75 ticks of profit. The example may be found here:

    A parabolic stop would follow a formula to trail the stop loss, although the trailing is not in even increments. It would be in more of a parabolic motion where the higher the acceleration, the quicker the stop price would move toward the market price. Max acceleration could be thought of as hitting a maximum speed increase toward the price. There are also some ideas about the Parabolic SAR on this publicly available link that may help to understand how a Parabolic Stop would behave:

    In addition, my colleague Brandon has written a post that goes into further depth regarding how a Parabolic Stop works and how it is similar to the Parabolic SAR indicator:

    For NinjaTrader to receive data and run a live strategy, it must be open and connected. Typically, putting a computer into sleep mode disconnects the internet as well. Your chart would not be able to plot candles if it is not connected to your market data provider. Once NinjaTrader has connected to data again, you could right-click the chart and select "Reload all historical data" to fill in any missing candles. While running a strategy, there are certain behaviors that NinjaTrader can follow when the connection is lost. This setting may be found at Control Center > Tools > Options > Strategies > On connection loss. The options are keep running, recalculate, or stop strategy. A description of each may be found here:

    Please let us know if we may be of further assistance.
    Emily C.NinjaTrader Customer Service


      Thank you very much for the reply! I will check out those links.


      Latest Posts


      Topics Statistics Last Post
      Started by ttodua, 03-01-2019, 05:17 AM
      24 responses
      Last Post StoneMan78  
      Started by torento, 03-16-2023, 06:02 AM
      5 responses
      Last Post torento
      by torento
      Started by alanlopen, 03-18-2023, 03:05 AM
      4 responses
      Last Post alanlopen  
      Started by paypachaysa, 03-18-2023, 09:22 AM
      4 responses
      Last Post paypachaysa  
      Started by alanlopen, Yesterday, 03:40 AM
      4 responses
      Last Post alanlopen