Is there a way to have it use weighted moving average?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
stochastic with WMA
Collapse
X
-
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.htmlBertrandNinjaTrader Customer Service
-
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.htmlBertrandNinjaTrader Customer Service
Comment
-
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
-
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.htmBertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by falcondroneus, Today, 01:15 AM
|
0 responses
2 views
0 likes
|
Last Post Today, 01:15 AM | ||
Started by Vikuno1, 11-28-2023, 11:42 PM
|
15 responses
357 views
1 like
|
Last Post
by PaulMohn
Today, 12:45 AM
|
||
Started by PaulMohn, Yesterday, 02:06 AM
|
3 responses
12 views
0 likes
|
Last Post
by PaulMohn
Today, 12:33 AM
|
||
Started by gertrudeabrams, Today, 12:33 AM
|
0 responses
3 views
0 likes
|
Last Post Today, 12:33 AM | ||
Started by NJA_MC, 01-03-2021, 10:34 PM
|
11 responses
150 views
0 likes
|
Last Post
by wzgy0920
Today, 12:14 AM
|
Comment