KK_Price Action Channel (TDI BH)

Hey guys,

this little script is an addition to another one I will release right after this.

This is the Price Action Channel. The bands are calculated using a smoothed moving average of the highs/lows. I have taken the smoothed moving average script from the public library in order to create this, so all props to whoever created that one.

I am fairly new to creating scripts so use it with caution and let me know what you think!

EDIT: Here is the script I have written this one for:
KK_Traders Dynamic Index_Bar Highlighting
Remove from Favorite Scripts Add to Favorite Scripts
//author: Kurbelklaus
//Code for the smoothed moving average taken from the public library
study(title = "KK_Price Action Channel", shorttitle="PAC", overlay=true)
srcH = high
srcL = low
lenH = input(5, minval=1, title="Length High")
lenL = input(5, minval=1, title="Length Low")
smmaH = na(smmaH[1]) ? sma(srcH, lenH) : (smmaH[1] * (lenH - 1) + srcH) / lenH
smmaL = na(smmaL[1]) ? sma(srcL, lenL) : (smmaL[1] * (lenL - 1) + srcL) / lenL
plot(smmaH, color=blue)
plot(smmaL, color=blue)
Ok I understand what the script is doing, but I am curious as to where the formula you used comes from in reference to the Traders Dynamic Index docs. I was under a different impression as to how to construct it. Being as it may, yours seems to be a lot closer to the images from the PDF on the subject. Thanks, (7 months late)
Kurbelklaus PRO ShirokiHeishi
a year ago
Hello Shiroki,
you're very welcome :)

The calculation logic for the Smoothed Moving Average has been taken from the Public Script Library, unfortunately it does not state the author.
The PDF itself only states, that you should take the 5-period Smoothed Moving Average of the highs and lows. And this is what i have done here.

I hope this answers your question.
Kind regards
ShirokiHeishi PRO Kurbelklaus
a year ago
Thanks, I was unclear in my previous post, I see where I was wrong in my construction. What I did was construct a simple MA, and that was not the correct way to visualize the channel. Thanks again.
Kurbelklaus PRO ShirokiHeishi
a year ago
Sure you're welcome!
Hi i was just wondering how this system works as in reliability? as i have just came across the PDF. is it a good system to use or a waste of time? and also
Kurbelklaus PRO Brown.Michael.6
a year ago
well just as with all systems it has it strength and weaknesses. This is clearly a trend following system, so it will make you money in strong trending environments and loose you money in sideways environments.

If this system works or not depends on the instrument you are using it on, so before using it maybe just do some paper trading with historical data on the specific instrument. Then before you start trading switch to a higher timeframe (1W when trading the daily for example) and try to determine the state of the instrument. Is it currently in a large range? Is it in a corrective phase? Is it in a trending phase? And ask yourself if the strategy will be suitable in this current state.

As always the key to success is using this system over a larger amount of time, as it only gives you a statistical edge but will never give you a 100% win rate. When doing so the position sizing is very important. Having a good position sizing strategy compared to a bad one or none at all will often make the difference between a system loosing or winning you money. If you havent gotten into this topic yet i highly recommend doing so first.

Kind regards
Ideas Scripts Chart
United States
United Kingdom
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out