Announcement

Collapse

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

Collapse

Can somebody code the Volatility stop for NT

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

    Can somebody code the Volatility stop for NT

    Formula and info found here :
    The Volatility Stop Indicator helps define the current trend. The indicator plots a red line above the prices bars when a downward trend is detected, and a blue line below the bars when an upward trend is detected. These lines are commonly used as trailing stops. This indicator is commonly used as a exit tool rather than an entry technique. When price crosses the VSTOP value, the trend reverses and VSTOP moves to the other side of price. The VSTOP calculation method can be found above. Long... CL > VSTOP AND CL.1 = VSTOP Keyboard Adjustment NA The Formula When Up Trend Detected....



    You work is much appreciated
    Thank you

    Nico

    #2
    Originally posted by nico_p View Post
    Formula and info found here :
    The Volatility Stop Indicator helps define the current trend. The indicator plots a red line above the prices bars when a downward trend is detected, and a blue line below the bars when an upward trend is detected. These lines are commonly used as trailing stops. This indicator is commonly used as a exit tool rather than an entry technique. When price crosses the VSTOP value, the trend reverses and VSTOP moves to the other side of price. The VSTOP calculation method can be found above. Long... CL > VSTOP AND CL.1 = VSTOP Keyboard Adjustment NA The Formula When Up Trend Detected....



    You work is much appreciated
    Thank you

    Nico

    Maybe this would help you: http://www.ninjatrader-support.com/v...ead.php?t=3660 or maybe point you in the right direction.

    Comment


      #3
      Thank you PrTester

      I believe that first version of you ATR- Trailing Stop Indicator does exactly what I wanted
      Thx
      Nico

      Comment


        #4
        Could I get the code ?

        PrTester:
        I am not sure if the thread still works. I truly want to use volatility stop in Ninja. Could you help me to use it? Thanks very much.


        Profitmaker9

        Comment


          #5
          Volatility Stop

          The volatility stop is a stop which is based on the current bars close and the current bar's true range. When the trend is up, the stop is calculated by deducting a multiple of the current bar's true range from the current bar's close. When the trend is down, a multiple of the current bar's true range is added to the current bar's close.

          An enhanced version of the volatility stop is known as the SuperTrend. The SuperTrend has the close replaced with a m-period moving average and the true range replaced with the n-period average true range. The special case m=1 & n=1 produces a volatility stop.

          Adaptation to intraday data: There are many indicators that come with NinjaTrader and which should not be used with CalculateOnBarClose = false. One of them is the ATR (average true range). With the first tick of the current bar, the true range typically takes the value zero and therefore the average true range is distorted when the value for the unstable period is included.

          I have therefore coded the SuperTrend in a way that it uses both

          - the value of the moving average calculated for the prior bar
          - the average true range of the prior bar

          This eliminates the distortion during the unstable period and enhances the usability of the indicator.

          The indicators available are the SuperTrendM11 ("M" stands for Median, "11" stands for the displacement of 1 bar used for both the median and the average true range) and the SuperTrend U11 ("U" stands for Universal, as you may select one out of 30 moving averages). You can download them here:

          The best futures trading community on the planet: futures trading, market news, trading charts, trading platforms, trading strategies

          The best futures trading community on the planet: futures trading, market news, trading charts, trading platforms, trading strategies


          Elite membership is required to access downloads.

          Attached is a chart which shows the SuperTrendM11 with the median period and the ATR period set to 1. This is a volatility stop displaced by one bar for the reasons explained above.

          But why would you want to restrict yourself to the setting m=1 and n=1. The SuperTrend is much more versatile than a simple volatility stop. The indicators come with paint bars. The trend reversal can be selected based on the breach of the stop line intrabar or at the close (setting reverse-intrabar, which takes the value true or false).
          Attached Files

          Comment


            #6
            Originally posted by profitmaker9 View Post
            PrTester:
            I am not sure if the thread still works. I truly want to use volatility stop in Ninja. Could you help me to use it? Thanks very much.


            Profitmaker9
            The original pointed to thread was moved to http://www.ninjatrader.com/support/f...ead.php?t=3660

            All the best.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by JonesJoker, 04-22-2024, 12:23 PM
            8 responses
            41 views
            0 likes
            Last Post JonesJoker  
            Started by timko, Today, 06:45 AM
            0 responses
            3 views
            0 likes
            Last Post timko
            by timko
             
            Started by Waxavi, 04-19-2024, 02:10 AM
            2 responses
            38 views
            0 likes
            Last Post poeds
            by poeds
             
            Started by chbruno, Yesterday, 04:10 PM
            1 response
            44 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Max238, Today, 01:28 AM
            1 response
            25 views
            0 likes
            Last Post CactusMan  
            Working...
            X