JMF_Tattoo

Standard Deviation Channel V.1

JMF_Tattoo アップデート済   
Standard Deviation channel For TradingView V.1

Many thanks to and Made with help from @rumpypumpydumpy

█ - How to add the indicator-
You can “Boost” the tool if you like it, then scroll down on this page to "Add to favorite indicators" so it will be saved in your favorites. Easiest way to add to chart past that is simply copy the indicators name, Navigate to a chart, then paste the indicators name into your chart's "Indicators" tab. It should then be immediately added to the current chart. If your display is not large enough, when you first add your channel,, you may realize that you see labels appear, but no channel. Simply scroll backwards in time until the chart loads. TradingView needs to be able to see the data you would like the channel to read in order to plot and display correctly. This is a simple one or two mouse wheel scroll and it will appear.
You may notice a compression of price scale. IF this happens simply right click your right price axis, a menu will appear, select “Scale price chart only”, and "Auto (fits data to screen) This will release the scale compression and let you view the channel and price normally. Once your Channel is added, loaded, and ready to go, you can proceed to settings. In the top left corner of your main chart there will be a Indicator title, hover that and click on the gear icon to access the channels custom settings. You can also double click any of the active plots from the channel or averages on the chart, and gain access to the settings panel through that.

█  OVERVIEW
Settings explained -
Inputs and color choices
You can think of the settings panel as 3 separate sections.

First - Look and feel- You will have your Channels visual inputs, Simple Yes or No check boxes on whether you would like to display the visual items listed. You can choose to display the channel in a multitude of ways, with or without half deviations, with no 2nd, 3rd, or 4th deviations. This first section is your quick access control panel to the visual feel and display of the channel and its items.
Then below that you will see quick access color presets for each deviation and half deviations. You can choose to leave these as is, or you can choose custom colors per your preference.
The positive and negative Second deviations (+/-2std) are colored by positive and negative slope of channel. This will help to show overall trend, whether up or down, positive or negative. User can change the positive and negative slope colors if they would like.

Second, - Time and Regression - Next as you scroll down the settings panel you will encounter the Time and regression settings. In order for the channel to match the channel used widely in TOS, we had to Preset the look back lengths into the code because on Tradingview we have an “Continuous left edge of the chart”. We needed to tell the channel how far to look back and start calculating. The frame work for this time logic came initially from the channel that was developed years back by @corgalicious, We then took that time logic and re-worked it in order to fit the parameters that the widely used and popular TOS channel has.

Above the time frame length back inputs you will find a dropdown menu "Regression method type". This will offer different methods of regression and calculating the standard deviation from the center linear regression line. It is preset to “Population standard deviation” which will mimic the widely used TOS channel. There is also a choice for “Regression method standard error, or RMSE. This is a similar regression style, but will result in a tighter fitting, smaller deviation measurement and channel all around. As well as a multitude of other regression styles thanks to the genius of @rumpypumpydumpy

All the time presets were carefully chosen based off Pre set time frames TOS offers for their widely used Standard deviation channel, and time frames I had noted as widely used. You as the user can change those look back windows if you prefer through the input length settings. I recommend using the stock settings in most scenarios. Trading view has a 5000 bar look back limit, so we have implemented “Max lookbacks” inside the code to avoid any user error or confusion. The standard error of the sample mean is an estimate of how far the sample mean is likely to be from the population mean, whereas the standard deviation of the sample is the degree to which individuals within the sample differ from the sample mean. For longer time frames and sample sets I tend to use Population Standard Dev setting. For smaller sample sets I will go with Linreg RMSE setting. This is a personal preference. It is encouraged to try all of them and see what fits your trading style the best.

If the user would like to use a "Max bar lookback and plot the maximum allowed length on the current time frame, Simply select, "Use the full range of data allowed in max bars back for calculation?" This will automatically search back on the current time frame and plot the channel 4999 bars back. User will have to SCROLL BACK in order to fully load the channel into view. Again, Tradingview needs to see the candles you would like to plot on.

Third, - Finally at the bottom of the settings I have included Exponential moving average clouds. These are NOT enabled by default. If the user would like them enabled simply check "show momentum average clouds" and "Show Candle EMA". These are Multiple time frame moving average clouds consisting of 72/89 length 3, and 5min exponential moving averages. I use these to simply show the front or back side of a move and to find if trend is strong or weakening. These are not always needed so they are turned off by default.

█  CONCEPTS
Reversion and Repulsion-
You will find that the channel linear regression trend line has two characteristic's, Reversion to the mean, and Repulsion away from the mean. Price either seeks to aggressively return to the mean when it has exited a normal distribution, or price seeks to aggressively move away from the mean in times of momentum. Most seek to participate in the move through MAJOR WHOLE deviation levels in one scenario or the other.
The idea behind using a Standard deviation channel is to see extension and find where in the move we are. Are you extended out to 3 or 4 deviation's up or down? If so, you could start to think about reversion back to the mean. Have you had a violent move down to -3 or -4 deviations in a sell off? Maybe look at reversion back up toward the mean off a whole deviation break. Have you broken out of a normal distribution at +1 deviation and are building trend? maybe seek to join trend.
I have found most success by using a Split screen style layout. On the left chart most will have a 1min intraday channel showing, and on the left chart a 4hr channel showing. The idea is to mark your longer time frame deviations onto your intraday time frame, and use the intraday Channel to guide you through the higher time framed move. The move through +/- 1 deviation is a high momentum area in most names as price either seeks to return to the mean, or move strongly away from the mean.

█  Time periods
The channel has pre determined lookback presets for each major time frame. These have been preset in the code to mimic the widely used channel in TOS to the best of our ability.
Preset timeframe lookbacks include.

//intraday shorter time frames. 1/2min with 2day lookbacks

'1D-1Min' - Default= 2D, minval=1, maxval=5
'1D-2Min' - Default= 2D, minval=1, maxval=7

//intraday shorter time frames. 3/5min with 5day lookbacks. User can set shorter or longer if they choose, up to a 5000k bar look back depending on their Data tier level, Basic, Pro, Pro+, Premium etc.

'5D-3Min' - Default= 5D, minval=1, maxval=7
'5D-5Min' - Default= 5D, minval=1, maxval=20

// larger intraday time frames, 10/15min with 5day look backs.

'5D-10Min' - Default= 5D, minval=1, maxval=20
'5D-15Min' - Default= 5D, minval=1, maxval=60

// "Swing style time frames" 30/60 min with 10 and 20 day look back.

'10D-30Min' - Default= 10D, minval=1, maxval=60
'20D-1Hr' - Default= 20D, minval=1, maxval=90

//longer lookbacks for larger time frames using day lookback with the exception of week/month

'90D-2Hr' - Default = 90D, minval=1, maxval=180
'4h ' - Default = 180D,minval=1, maxval=4999
'6h' - Default = 36D, minval=1, maxval=252
'5Yr-W' - Default = 260W,minval=1, maxval=260
'1Yr-1D' - Default = 252D,minval=1, maxval=4999
'1Yr-1W' - Default = 52W, minval=1, maxval=480
'5Yr-1M' - Default = 60W, minval=1, maxval=480

█ Minimum Window Size

Note that on each time frame you MUST quickly scroll out to the first bar that the channel should start calculating on in order for the channel to populate on longer time frame series. This is under construction and as soon as there is a fix or other way around this, it will be addressed.

█  NOTES

Enjoy!
In the end I encourage any who tries the Channel to really sit down and spend some time playing around with the settings in order to find out how they like the Channel set up. I usually run the default settings on a intraday 5min chart, and then another instance of the study on a 4 hour chart. That way I can see granular intraday levels, and macro long term levels in the same view. See what fit's you the best, and how you like to trade. Most of all ENJOY!
Good luck -
JMF.

IMPORTANT INFO-
As always, the creator of this code is NOT a licensed investment advisor. No output of this tool is to be taken as investment advice or a recommendation to buy or sell any security.
Trading is risky, any one using this tool acknowledges they CAN LOSE some if not all of their initial investment even with this tool enabled.
User assumes ALL RESPONSIBILITY when using this tool in their technical analysis. There is NO GUARANTEE THAT THE USE OF THIS TOOL WILL RESULT IN PROFIT Use at your own risk.
リリースノート:
Typo in the above description where I talk about Split screen use of the channel. I reference both screens as "Left". It should instead read as
I have found most success by using a Split screen style layout. On the left chart most people will have a 1min intraday channel showing, and on the RIGHT chart a 4hr channel showing. The idea is to mark your longer time frame deviations onto your intraday time frame, and use the intraday Channel to guide you through the higher time framed move. The move through +/- 1 deviation is a high momentum area in most names as price either seeks to return to the mean, or move strongly away from the mean.

Left chart - intraday view, Right chart - Long term 4hr, Daily, Weekly view. Marking the longer term levels on to my intraday chart, and using the intraday channel to help guide me through the higher time frame move.
リリースノート:
ability to now plot the full length of the allowable intraday max 5,000 candles back

保護スクリプト
このスクリプトは保護スクリプトとして公開されていますが、利用することができます。お気に入りに登録してチャート上でご利用頂けます。但しこのスクリプトのソースコードを閲覧したり変更することはできません。
免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?