Standard Error of the Estimate -Jon Andersen- V2Original implementation idea of bands by:
Traders issue: Stocks & Commodities V. 14:9 (375-379):
Standard Error Bands by Jon Andersen
Standard Error Bands are quite different than Bollinger's.
First, they are bands constructed around a linear regression curve.
Second, the bands are based on two standard errors above and below this regression line.
The error bands measure the standard error of the estimate around the linear regression line.
Therefore, as a price series follows the course of the regression line the bands will narrow , showing little error in the estimate. As the market gets noisy and random, the error will be greater resulting in wider bands .
Thanks to the work of @glaz & @XeL_arjona
In this version you can change the type of moving averages and the source of the bands.
Add a few studies of @dgtrd
1- ADX Colored Directional Movement Line
Directional Movement (DMI) (created by J. Welles Wilder ) consists of the Average Directional Index ( ADX ), to define whether or not there is a trend present, and Plus Directional Indicator (+D I) and Minus Directional Indicator (-D I) serve the purpose of determining trend direction
ADX Colored Directional Movement Line is custom interpretation of Directional Movement (DMI) with aim to present all 3 DMI indicator components with SINGLE line and ability to be added on top of the price chart (main chart)
How to interpret :
* triangle shapes:
▲- bullish : diplus >= diminus
▼- bearish : diplus < diminus
* colors:
green - bullish trend : adx >= strongTrend and di+ > di-
red - bearish trend : adx >= strongTrend and di+ < di-
gray - no trend : weekTrend < adx < strongTrend
yellow - week trend : adx < weekTrend
* color density:
darker : adx growing
lighter : adx falling
2- Volatility Colored Price/MA Line
Custom interpretation of the idea “Prices high above the moving average (MA) or low below it are likely to be remedied in the future by a reverse price movement”. Further details can be found under study “Price Distance to its MA by DGT”
How to interpret :
-▲ – Bullish , Price Action above Moving Average
-▼ – Bearish , Price Action below Moving Average
-Gray/Black - Low Volatility
-Green/Red – Price Action in Threshold Bands
-Dark Green/Red – Price Action Exceeds Threshold Bands
3- Volume Weighted Bar s
Volume Weighted Bars, a study of Kıvanç Özbilgiç, aims to present whether volume supports price movements. Volume Weighted Bars are calculated based on volume moving average.
How to interpret :
-Volume high above the volume moving average be displayed with red/green colors
-Average volume values will remain as they are and
-Volume low below the volume moving average will be indicated with darker colors
4- Fear & Greed index value, using technical anlysis approach calculated based on :
⮩1 - Price Momentum : Price Distance to its Moving Average
⮩2 - Strenght : Rate of Return, price movement over a period of time
⮩3 - Money Flow : Chaikin Money Flow, quantify changes in buying and selling pressure. CMF calculations is based on Accumulation/Distribution
⮩4 - Market Volatility : CBOE Volatility Index ( VIX ), the Volatility Index, or VIX , is a real-time market index that represents the market's expectation. It provides a measure of market risk and investors' sentiments
⮩5 -Safe Haven Demand: in this study GOLD demand is assumed
Standarderrorbands
[blackcat] L1 Jon Andersen Standard Error BandsLevel: 1
Background
The standard error bands created by Jon Andersen in "Standard error bands" in the September 1996 STOCKS & COMMODITIES.
Function
This script calculates the beta and alpha coefficients of the linear regression. First, it creates the calcB and calcA functions, which refer to the beta and alpha coefficients. Create calcB first, then calcA. These functions are used in calculating the regression coefficients for the standard error bands. In This standard error bands indicator, the "Length" value specifies the period of the linear regression line; the default is 21. The SDeg value specifies the smoothing factor that is used to smooth the linear regression and standard error bands; the default is 3.
Key Signal
LinRegS --> standard error bands center line
LinRegS + SErr --> standard error bands upper line
LinRegS - SErr --> standard error bands lower line
Labels and alerts are added.
Remarks
Feedbacks are appreciated.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Standard Error Bandswith the best settings - this indicator is a better version of the bollinger bands, because it uses a linear regression .
Use this carefully and with other indicators.
Standard Error of the Estimate -Composite Bands-Standard Error of the Estimate - Code and adaptation by @glaz & @XeL_arjona
Ver. 2.00.a
Original implementation idea of bands by:
Traders issue: Stocks & Commodities V. 14:9 (375-379):
Standard Error Bands by Jon Andersen
This code is a former update to previous "Standard Error Bands" that was wrongly applied given that previous version in reality use the Standard Error OF THE MEAN, not THE ESTIMATE as it should be used by Jon Andersen original idea and corrected in this version.
As always I am very Thankfully with the support at the Pine Script Editor chat room, with special mention to user @glaz in order to help me adequate the alpha-beta (y-y') algorithm, as well to give him full credit to implement the "wide" version of the former bands.
For a quick and publicly open explanation of this truly statistical (regression analysis) indicator, you can refer at Here!
Extract from the former URL:
Standard Error Bands are quite different than Bollinger's. First, they are bands constructed around a linear regression curve. Second, the bands are based on two standard errors above and below this regression line. The error bands measure the standard error of the estimate around the linear regression line. Therefore, as a price series follows the course of the regression line the bands will narrow, showing little error in the estimate. As the market gets noisy and random, the error will be greater resulting in wider bands.