Keltner Channels are built from a SMA and the average true range. Your channels are built from an EMA and the average true range. They are modified Keltner Channels, as Linda Raschke intorduced them. The multipliers of 2.62 and 3 are close together so on the chart the two upper bands will be as close as shown.
So, that is what I'm looking for in the Keltner indie calc, right?
But this is what I find there in Keltner:
the difference between the high and low of the previous bars
and in the code as...
diff.Set(High - Low);
So I must be missing something or the canned Keltner is not actually using the correct ATR calculation.
The other differences that you noted sma or ema seem to be minor relative to that calc difference. Unless I just don't see it.
The Keltner Channel in terms of display on NT contracts too much during low vola and perhaps expands too much during high vola...at least based on a first view. I conclude that I am missing something or the two Keltner Channel and what I was seeking help to code are not the same. I think Im back to square one or slightly advanced from it.
I am going to keep trying to get that code that I posted above converted into C# and displayed on NT7. I have another version of the code that produces the same result. Would it be helpful to post that as well? What am I missing?
this has nothing to do with anyone named Linda Raschke. I have no idea who she is or how what I am doing is related to her. I realize that there is nothing new under the sun when it comes to math...an exact science. In that, we do not necessarily rely on the work of others, but we may from time to time , knowingly or unknowingly employ the same princilpes. When that occurs I get excited because when smart people are led to the same place independently of one another the destination tends to validte the thought process and the work.
Linda, does she bank cash? Should I know her or care to find out who she is.
My insecurity leads me to feel like you are trying to expose me or decloak me by saying that is Keltner or the work of someone named Linda that I'm trying to build on and claim as my own. I know that is not true that you have a nefarious purpose so I'm not posting to defend or attack, rather to express my frustration at my inability to code independently of help from guys like you that have that skill.
That little piece of code was the result of looking for a primary price target that would consider volatility and adjust in step with it to maximize first target. Data from different about price movement within different timeframes was exported to excell and then evaluated for specific outcome. It is somewhat interesting that the data set that produced the best result was all Fib related or "9" related...coincidence or some mystical metaphysical BS, honeybadger and wildman don't care none if it banks cash.
Thanks again for your help and direction on this. I hope that you will continue to push me along. DB
You are right. The original Keltner Channels just use the range of the bars, not the true range. That is another reason that I used the Universal Keltner Channel
-> it allows you to select a different period for moving average and true range
-> it allows you to select the type of the average, that is EMA, SMA, etc.
-> it allows you to choose from the simple range and the true range
For the chart that I have posted the true range was used, as in the trade station formula.The chart shows bands at a distance of 2.618 and 3.0 ATRs.
The first screenshot which you have posted has nothing to do with the tradestation code, as it uses different settings. Your bands on the chart do not use offsets of 2.618 and 3.0, this can be easily seen without measuring anything.
Last edited by Fat Tails; September 8th, 2011 at 05:46 AM.
Fat Tails, you are the one that suggested Keltner either universal or simple, not me. I went to look at that suggestion because I asked for help with programing the piece of code that I posted for use in NT7.
My display on the chart I posted is what I want to display on mt NT charts. I assure you it is generated by the code I posted and the settings are 3* and 4.23* the 34 period atr. So you are telling me that what I am asking for help with is not what Im asking for help with and that my display is wrong? How can that be?
What I would like to do is post two variable atr lines above the period ema and two variable atr's below the period ema as referenced in the code I posted.
that is correct. I'm trying to recover/import indicators for use in NT7. That is the first chart, yes. Chosen because it should be the easiest to replicate IMO.
Yes the green and purple are primary, the two outer gray are secondary. The colored lines are plotted as the 34 period xma + 3*travg where travg = xaverage(range,trlength)....just like it shows in the posted code. I'll post different code that generates the same view and another chart or two. This is the simple one I have no idea how to handle adaptive or cycle period adjusted cci or Heiken Ashi.
That is what I meant: On your charts the settings were 3.0 and 4.23. The TradeStation code showed 2.618 and 3.0.
You can just download the Universal Keltner Channel, as I suggested and it will exactly display those lines. Settings are
(EMA, EMA, 3.0, 34, 34, TrueRange, false) for the first one and (EMA, EMA, 4.23, 34, 34, TrueRange, false) for the seceond one. Set the opacity to 0 for better display.
If you like smoothing you can set "Smoothed Channels" to "true", this will get you smoother channels, see chart attached.
that is not easy language, it is qscript. The Wave59 "language".
I don't want to come across the wrong way or sound disrespectful but I have to say that if I wanted Keltner Channel I would have used Keltner channel. The search for that which I am trynig to display in NT would have included Keltner, Hurst, Kirschenbaum, Bollinger and anything applied by Wilder or Ehlers. I will do what you have suggested and I appreciate the suggestions. In the mean time maybe someone that knows C# will view the thread and create the appropriate code.
The discussion here though does give me an idea to overlay this universal keltner or kirshenbaum and a modified bollinger on the same chart because they handle volatility differently. Say an upper band cross of an upperband consistent with some element of price action, like a close above or below some mid line might be the basis for something interesting.
I do not typically download indicators but I will search BMP for universal keltner. DB