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

Modified Stochastics

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

    Modified Stochastics

    Hello,
    I am trying to see whether if I can recreate this simple stochastic s formula in Ninjatrader. Here is the formula:

    Stochastics measures the velocity of a security's price movement to identify overbought and oversold conditions. The indicator measures current price relative to highs and lows over a time period. In an up-trend, markets tend to close near the high and while in a down-trend they to close nearer to the lows. This indicator is calculated with the following formula:

    %K = 100*Closing Range/Total Range

    where:

    Closing Range = Close - Range Minimum

    Total Range = Range Maximum - Range Minimum

    The extent of the Range is determined by the %K period parameter.

    %D = N-period moving average of %K where N is the %D period parameter.

    %K with %D is sometimes referred to as the Fast Stochastics. %DS and %DSS, sometimes referred to as the Slow Stochastics, have additional smoothing as determined by their respective period parameters. Stochastics can be used to recognize potential turning points to help make entry/exit decisions.

    What I would need is an input boxes for:
    %K
    %D
    %DS
    %DSS
    %DS/%DSS

    How can I go about it? Does the current NT interface allow me to plot this indicator?

    Thanks

    #2
    Hello agassi,

    Thank you for writing in.

    From what I am seeing in your description this indicator can be made for NinjaTrader.

    I suggest that you look at the code of the Stochastics indicator that is supplied with NinjaTrader to see what would be needed to make your indicator as they are similar.

    (Tools -> Edit NinjaScript -> Indicator... -> Stochastics -> OK)
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by agassi View Post
      Hello,
      I am trying to see whether if I can recreate this simple stochastic s formula in Ninjatrader. Here is the formula:

      Stochastics measures the velocity of a security's price movement to identify overbought and oversold conditions. The indicator measures current price relative to highs and lows over a time period. In an up-trend, markets tend to close near the high and while in a down-trend they to close nearer to the lows. This indicator is calculated with the following formula:

      %K = 100*Closing Range/Total Range

      where:

      Closing Range = Close - Range Minimum

      Total Range = Range Maximum - Range Minimum

      The extent of the Range is determined by the %K period parameter.

      %D = N-period moving average of %K where N is the %D period parameter.

      %K with %D is sometimes referred to as the Fast Stochastics. %DS and %DSS, sometimes referred to as the Slow Stochastics, have additional smoothing as determined by their respective period parameters. Stochastics can be used to recognize potential turning points to help make entry/exit decisions.

      What I would need is an input boxes for:
      %K
      %D
      %DS
      %DSS
      %DS/%DSS

      How can I go about it? Does the current NT interface allow me to plot this indicator?

      Thanks
      What you are describing is the Full Stochastics. NinjaTrader simply calls it Stochastics. The other Stochastics are Fast Stochastics and Slow Stochastics, both of which are direct derivatives of the Full Stochastics, and can be completely duplicated by using the appropriate parameters on the Full Stochastics.

      ref: http://www.ninjatrader.com/support/f...06&postcount=7

      Comment


        #4
        Thanks for responding. Good to know that there is a way to duplicate this formula using the parameters. I will read the link and then post if I have any questions.

        Koganam:

        Are you able to guide me through the exact steps? I figured that this is some sort of a derivative. But I am sort of stuck because I do not have 4 input boxes to enter the parameters. So how or where would i enter the input parameters?

        Comment


          #5
          Originally posted by agassi View Post
          Thanks for responding. Good to know that there is a way to duplicate this formula using the parameters. I will read the link and then post if I have any questions.

          Koganam:

          Are you able to guide me through the exact steps? I figured that this is some sort of a derivative. But I am sort of stuck because I do not have 4 input boxes to enter the parameters. So how or where would i enter the input parameters?
          It is pretty much as I said in the post to which I referred you.

          The Full Stochastics uses 3 parameters, PeriodK, Smooth, PeriodD. The Smooth parameter is used to modify the raw %K that is first calculated.

          If you smooth %K with a period of 1, the raw %K is simply not smoothed and you get the %K of the Fast Stochastics, which is them again passed through the PeriodD parameter to get %D.

          If you smooth %K with a period of 3, the raw %K is smoothed to get the %K of the Slow Stochastics, which is them again passed through the PeriodD parameter to get %D. So the %K of the Slow Stochastics, is identical to the %D of the Fast Stochastics, which is then smoothed to get the %D of the Slow Stochastics.

          Using the standard, accepted definitions then:

          Full Stochastics %K, smoothed by 3 = Fast Stochastics %D = Slow Stochastics %K.
          Slow Stochastics %D = Slow Stochastics %K, smoothed by 3. From your statement, I surmise that this is probably what you are calling %%D (as in, "twice smoothed")

          One can do anything one wants, including further smoothing %D of Slow Stochastics, but that is not any standard Stochastic variant, and would have to be code that is newly written.

          Comment


            #6
            Thank you Koganam. I am not a developer or a coder. Would you be willing to code this for me? Please provide me with your contact number so we can discuss. I am hoping you can code this for a reasonable amount.

            Comment


              #7
              Originally posted by agassi View Post
              Thank you Koganam. I am not a developer or a coder. Would you be willing to code this for me? Please provide me with your contact number so we can discuss. I am hoping you can code this for a reasonable amount.
              Certainly. Send me a PM.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by rtwave, 04-12-2024, 09:30 AM
              2 responses
              20 views
              0 likes
              Last Post rtwave
              by rtwave
               
              Started by tsantospinto, 04-12-2024, 07:04 PM
              5 responses
              67 views
              0 likes
              Last Post tsantospinto  
              Started by cre8able, Today, 03:20 PM
              0 responses
              6 views
              0 likes
              Last Post cre8able  
              Started by Fran888, 02-16-2024, 10:48 AM
              3 responses
              49 views
              0 likes
              Last Post Sam2515
              by Sam2515
               
              Started by martin70, 03-24-2023, 04:58 AM
              15 responses
              115 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X