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 of the highs/lows. I have taken the 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:
//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) ? sma(srcH, lenH) : (smmaH * (lenH - 1) + srcH) / lenH smmaL = na(smmaL) ? sma(srcL, lenL) : (smmaL * (lenL - 1) + srcL) / lenL plot(smmaH, color=blue) plot(smmaL, color=blue)
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.
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.