Has anybody scripted an indicator for KeltnerATR using Ema of AP ?
Size:
Color:
I believe it's extremely simple, one-line code - something like EMA.Series( AveragePriceC.Series(Bars), period, EMACalculation.Modern).
Size:
Color:
Eugene, the Ema part I get. But how do I embed that into the code for the KeltnerATR Indicator to make a KeltnerATR-EMA indicator ? Thanks
Size:
Color:
Upper band:
CODE:
Please log in to see this code.
Lower band:
CODE:
Please log in to see this code.
QUOTE:
But how do I embed that into the code for the KeltnerATR Indicator to make a KeltnerATR-EMA indicator ?
Now I understand that you want to modify the compiled indicator in our library. The source code for Community.Indicators is open, you would need to install MS Visual Studio (Express) or SharpDevelop, load the project, make sure that target .NET framework is 2.0, navigate to Bands.cs, and modify the KeltnerATR classes almost as shown above (i.e. change the SMA to an EMA).
Size:
Color:
I'll try and make Dataseries for the two bands (maybe using the simpler Keltner rather than the KeltnerATR) but please may I request both Keltner EMA and KeltnerATR EMA for a future update of Community.Indicators . Thank You
Size:
Color:
As a rule, Community.Indicators accepts custom indicators that involve a minimum of 4 simple math operations. Hence, adding this one-line function (EMA of HLC/3) doesn't sound like a good addition.
Regarding Keltner EMA + ATR, please take a look at what is already available in Community.Indicators:
ATRBandLowerATRBandUpperJust pass an EMA of AveragePriceC.Series as the data series parameter of ATRBandLower/ATRBandUpper, and voila -- you have a Keltner EMA + ATR.
Size:
Color:
P.S. Adding a modification of Keltner Bands also doesn't sound like a good idea as it possibly can create confusion. Modifying the existing KeltnerATR to accept a choice of MAs is feasible, but a) will break backward compatibility for those who are already using it, and b) this is not going to be universal - we can only hardcode a handful of typical MAs like SMA, EMA and WMA, but what if at some point in time someone asks about, say, ASEMA/VMA/HullMA_of_(OHLC/4) etc.?
So, my advice above on marrying an EMA(AveragePriceC) with ATRBand* in your strategy seems like more universal approach.
Size:
Color:
That worked - Thanks v m
Size:
Color:
Due to my lack of programming experience, I cannot implement successfully the above mentioned alternative to the Keltner EMA ATR bands. I don't know where to insert the EMA part to the ATR bands. Any Help?
PS, according the stockcharts.com, this indicator doesn't seem too complex. I understand from the posts before that to modify the current Keltner bands indicator is not a good solution, why can't you just create a whole new indicator where you can specify the ATR multiple and period? It seems like Ninjatrader and Multicharts both have this capability coded right into the indicator. Again, this is probably due to my lack of programming expertise, but any commment on that?
here is the link to simple parameters of the indicator...
http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:keltner_channelsThanks,
Size:
Color:
Are you looking for something like this?
CODE:
Please log in to see this code.
Since this is simple, I hope that understanding it will add to your programming experience. For the basics, please read the WealthScript Programming Guide >
DataSeries.
Size:
Color:
Thanks Eugene, seems to be exactly what I was looking for!
Size:
Color: