Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stochastic with WMA

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

    stochastic with WMA

    it appears the stochastic indicator uses simple moving average.

    Is there a way to have it use weighted moving average?

    #2
    Hi politcat,

    Yes, you can open up the Stochastics code, save it under a different name and change the 'SMA' in the last D.Set into a WMA to change the final smoothing in the indicator. If you also like to change the K.Set smoothing to WMA the programming becomes a bit more involved (not knowing how familiar you are with NinjaScript).

    For some good tutorials on custom indicator coding, please take a look here - http://www.ninjatrader-support.com/H...verview18.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      thx!

      i'm new to NT ...i'll look at the tutorials

      Comment


        #4
        Great to have you here, make sure then to check our sharing section out, there are a couple Stochastic variations posted - http://www.ninjatrader-support2.com/...chastic&desc=1

        To import NinjaScript files, please see here - http://www.ninjatrader-support.com/H...6/Import1.html
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I changed the D.Set line to WMA.

          I would like to change the K.Set smoothing to WMA also, but I really don't know anything about programming

          I couldn't find "k.set" in the help guide

          can someone provide the WMA version of this:

          K.Set(100 * SUM(nom, Smooth)[0] / (SUM(den, Smooth)[0] == 0 ? 1.0 : SUM(den, Smooth)[0]));

          thx!

          Comment


            #6
            Hi politcat,

            The K.Set is a DataSeries object in the code, like the one you edited already. To learn more about DataSeries objects in NinjaScript see here - http://www.ninjatrader-support.com/H...iesObject.html

            Here is a link to NinjaScript consultants, should you need custom programming help - http://www.ninjatrader.com/webnew/pa...injaScript.htm
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            942 views
            0 likes
            Last Post spwizard  
            Started by Max238, Today, 01:28 AM
            0 responses
            9 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by rocketman7, Today, 01:00 AM
            0 responses
            4 views
            0 likes
            Last Post rocketman7  
            Started by wzgy0920, 04-20-2024, 06:09 PM
            2 responses
            28 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, 02-22-2024, 01:11 AM
            5 responses
            33 views
            0 likes
            Last Post wzgy0920  
            Working...
            X