Kalman Gain Parameter MechanicsFrequently asked question is to explain how Gain parameter works in kalman funtion. This script serves as a visual representation of Gain parameter of Kalman function used in HMA-Kalman & Trendlines script. (The function creator's name was misspeled in that script as Kahlman)
To see better results set your Chart's timeframe to Daily.
Factor
Indicator Functions with Factor and HeikinAshiHello all,
This indicator returns below selected indicators values with entered parameters.
Also you can add factorization, functions candles, function HeikinAshi and more to the plot.
VERSION:
Version 1: returns series only source and Length with already defined default values
Version 2: returns series with source, Length, p1 and p2 parameters according to the indicator definition (ex: )
PARAMETERS p1 p2
for defining multi arguments (See indicators list) indicator input value usable with verison=V2 selected.. ex: for alma( src , len ,offset=0.85,sigma=6), set source=source, len=length, p1=0.85 an p2=6
FACTOR:
Add double triple, Quadruple factors to selected indicator (like converting EMA to 2-DEMA, 3-TEMA, 4-QEMA...)
1-Original
2-Double
3-Triple
4-Quadruple
LOG
Log: Use log, log10 on function entries
PLOTTING:
PType: Plotting type of the function on the screen
Original :use original values
Org. Range (-1,1): usable for indicators between range -1 and 1
Stochastic: Convert indicator values by using stochastic calculation between -1 & 1. (use AT/% length to better view)
PercentRank: Convert indicator values by using Percent Rank calculation between -1 & 1. (use AT/% length to better view)
ST/%: length for plotting Type for stochastic and Percent Rank options
Smooth: Use SWMA for smoothing the function
DISPLAY TYPES
Plot Candles: Display the selected indicator as candle by implementing values
Plot Ind: Display result of indicator with selected source
HeikinAshi: Display Selected indicator candles with Heikin Ashi calculation
INDICATOR LIST:
hide = 'DONT DISPLAY', //Dont display & calculate the indicator. (For my framework usage)
alma = 'alma( src , len ,offset=0.85,sigma=6)', // Arnaud Legoux Moving Average
ama = 'ama( src , len ,fast=14,slow=100)', //Adjusted Moving Average
acdst = 'accdist()', // Accumulation/distribution index.
cma = 'cma( src , len )', //Corrective Moving average
dema = 'dema( src , len )', // Double EMA (Same as EMA with 2 factor)
ema = 'ema( src , len )', // Exponential Moving Average
gmma = 'gmma( src , len )', //Geometric Mean Moving Average
hghst = 'highest( src , len )', //Highest value for a given number of bars back.
hl2ma = 'hl2ma( src , len )', //higest lowest moving average
hma = 'hma( src , len )', // Hull Moving Average .
lgAdt = 'lagAdapt( src , len ,perclen=5,fperc=50)', //Ehler's Adaptive Laguerre filter
lgAdV = 'lagAdaptV( src , len ,perclen=5,fperc=50)', //Ehler's Adaptive Laguerre filter variation
lguer = 'laguerre( src , len )', //Ehler's Laguerre filter
lsrcp = 'lesrcp( src , len )', //lowest exponential esrcpanding moving line
lexp = 'lexp( src , len )', //lowest exponential expanding moving line
linrg = 'linreg( src , len ,loffset=1)', // Linear regression
lowst = 'lowest( src , len )', //Lovest value for a given number of bars back.
pcnl = 'percntl( src , len )', //percentile nearest rank. Calculates percentile using method of Nearest Rank.
pcnli = 'percntli( src , len )', //percentile linear interpolation. Calculates percentile using method of linear interpolation between the two nearest ranks.
rema = 'rema( src , len )', //Range EMA (REMA)
rma = 'rma( src , len )', //Moving average used in RSI . It is the exponentially weighted moving average with alpha = 1 / length.
sma = 'sma( src , len )', // Smoothed Moving Average
smma = 'smma( src , len )', // Smoothed Moving Average
supr2 = 'super2( src , len )', //Ehler's super smoother, 2 pole
supr3 = 'super3( src , len )', //Ehler's super smoother, 3 pole
strnd = 'supertrend( src , len ,period=3)', //Supertrend indicator
swma = 'swma( src , len )', //Sine-Weighted Moving Average
tema = 'tema( src , len )', // Triple EMA (Same as EMA with 3 factor)
tma = 'tma( src , len )', //Triangular Moving Average
vida = 'vida( src , len )', // Variable Index Dynamic Average
vwma = 'vwma( src , len )', // Volume Weigted Moving Average
wma = 'wma( src , len )', //Weigted Moving Average
angle = 'angle( src , len )', //angle of the series (Use its Input as another indicator output)
atr = 'atr( src , len )', // average true range . RMA of true range.
bbr = 'bbr( src , len ,mult=1)', // bollinger %%
bbw = 'bbw( src , len ,mult=2)', // Bollinger Bands Width . The Bollinger Band Width is the difference between the upper and the lower Bollinger Bands divided by the middle band.
cci = 'cci( src , len )', // commodity channel index
cctbb = 'cctbbo( src , len )', // CCT Bollinger Band Oscilator
chng = 'change( src , len )', //Difference between current value and previous, source - source.
cmo = 'cmo( src , len )', // Chande Momentum Oscillator . Calculates the difference between the sum of recent gains and the sum of recent losses and then divides the result by the sum of all price movement over the same period.
cog = 'cog( src , len )', //The cog (center of gravity ) is an indicator based on statistics and the Fibonacci golden ratio.
cpcrv = 'copcurve( src , len )', // Coppock Curve. was originally developed by Edwin "Sedge" Coppock (Barron's Magazine, October 1962).
corrl = 'correl( src , len )', // Correlation coefficient . Describes the degree to which two series tend to deviate from their ta. sma values.
count = 'count( src , len )', //green avg - red avg
dev = 'dev( src , len )', //ta.dev() Measure of difference between the series and it's ta. sma
fall = 'falling( src , len )', //ta.falling() Test if the `source` series is now falling for `length` bars long. (Use its Input as another indicator output)
kcr = 'kcr( src , len ,mult=2)', // Keltner Channels Range
kcw = 'kcw( src , len ,mult=2)', //ta.kcw(). Keltner Channels Width. The Keltner Channels Width is the difference between the upper and the lower Keltner Channels divided by the middle channel.
macd = 'macd( src , len )', // macd
mfi = 'mfi( src , len )', // Money Flow Index
nvi = 'nvi()', // Negative Volume Index
obv = 'obv()', // On Balance Volume
pvi = 'pvi()', // Positive Volume Index
pvt = 'pvt()', // Price Volume Trend
rise = 'rising( src , len )', //ta.rising() Test if the `source` series is now rising for `length` bars long. (Use its Input as another indicator output)
roc = 'roc( src , len )', // Rate of Change
rsi = 'rsi( src , len )', // Relative strength Index
smosc = 'smi_osc( src , len ,fast=5, slow=34)', //smi Oscillator
smsig = 'smi_sig( src , len ,fast=5, slow=34)', //smi Signal
stdev = 'stdev( src , len )', //Standart deviation
trix = 'trix( src , len )' , //the rate of change of a triple exponentially smoothed moving average .
tsi = 'tsi( src , len )', //True Strength Index
vari = 'variance( src , len )', //ta.variance(). Variance is the expectation of the squared deviation of a series from its mean (ta. sma ), and it informally measures how far a set of numbers are spread out from their mean.
wilpc = 'willprc( src , len )', // Williams %R
wad = 'wad()', // Williams Accumulation/Distribution .
wvad = 'wvad()' //Williams Variable Accumulation/Distribution
I will update the indicator list when I will update the library
Thanks to tradingview, @RodrigoKazuma for their open source indicators
lib_Indicators_v2_DTULibrary "lib_Indicators_v2_DTU"
This library functions returns included Moving averages, indicators with factorization, functions candles, function heikinashi and more.
Created it to feed as backend of my indicator/strategy "Indicators & Combinations Framework Advanced v2 " that will be released ASAP.
This is replacement of my previous indicator (lib_indicators_DT)
I will add an indicator example which will use this indicator named as "lib_indicators_v2_DTU example" to help the usage of this library
Additionally library will be updated with more indicators in the future
NOTES:
Indicator functions returns only one series :-(
plotcandle function returns candle series
INDICATOR LIST:
hide = 'DONT DISPLAY', //Dont display & calculate the indicator. (For my framework usage)
alma = 'alma(src,len,offset=0.85,sigma=6)', //Arnaud Legoux Moving Average
ama = 'ama(src,len,fast=14,slow=100)', //Adjusted Moving Average
acdst = 'accdist()', //Accumulation/distribution index.
cma = 'cma(src,len)', //Corrective Moving average
dema = 'dema(src,len)', //Double EMA (Same as EMA with 2 factor)
ema = 'ema(src,len)', //Exponential Moving Average
gmma = 'gmma(src,len)', //Geometric Mean Moving Average
hghst = 'highest(src,len)', //Highest value for a given number of bars back.
hl2ma = 'hl2ma(src,len)', //higest lowest moving average
hma = 'hma(src,len)', //Hull Moving Average.
lgAdt = 'lagAdapt(src,len,perclen=5,fperc=50)', //Ehler's Adaptive Laguerre filter
lgAdV = 'lagAdaptV(src,len,perclen=5,fperc=50)', //Ehler's Adaptive Laguerre filter variation
lguer = 'laguerre(src,len)', //Ehler's Laguerre filter
lsrcp = 'lesrcp(src,len)', //lowest exponential esrcpanding moving line
lexp = 'lexp(src,len)', //lowest exponential expanding moving line
linrg = 'linreg(src,len,loffset=1)', //Linear regression
lowst = 'lowest(src,len)', //Lovest value for a given number of bars back.
pcnl = 'percntl(src,len)', //percentile nearest rank. Calculates percentile using method of Nearest Rank.
pcnli = 'percntli(src,len)', //percentile linear interpolation. Calculates percentile using method of linear interpolation between the two nearest ranks.
rema = 'rema(src,len)', //Range EMA (REMA)
rma = 'rma(src,len)', //Moving average used in RSI. It is the exponentially weighted moving average with alpha = 1 / length.
sma = 'sma(src,len)', //Smoothed Moving Average
smma = 'smma(src,len)', //Smoothed Moving Average
supr2 = 'super2(src,len)', //Ehler's super smoother, 2 pole
supr3 = 'super3(src,len)', //Ehler's super smoother, 3 pole
strnd = 'supertrend(src,len,period=3)', //Supertrend indicator
swma = 'swma(src,len)', //Sine-Weighted Moving Average
tema = 'tema(src,len)', //Triple EMA (Same as EMA with 3 factor)
tma = 'tma(src,len)', //Triangular Moving Average
vida = 'vida(src,len)', //Variable Index Dynamic Average
vwma = 'vwma(src,len)', //Volume Weigted Moving Average
wma = 'wma(src,len)', //Weigted Moving Average
angle = 'angle(src,len)', //angle of the series (Use its Input as another indicator output)
atr = 'atr(src,len)', //average true range. RMA of true range.
bbr = 'bbr(src,len,mult=1)', //bollinger %%
bbw = 'bbw(src,len,mult=2)', //Bollinger Bands Width. The Bollinger Band Width is the difference between the upper and the lower Bollinger Bands divided by the middle band.
cci = 'cci(src,len)', //commodity channel index
cctbb = 'cctbbo(src,len)', //CCT Bollinger Band Oscilator
chng = 'change(src,len)', //Difference between current value and previous, source - source .
cmo = 'cmo(src,len)', //Chande Momentum Oscillator. Calculates the difference between the sum of recent gains and the sum of recent losses and then divides the result by the sum of all price movement over the same period.
cog = 'cog(src,len)', //The cog (center of gravity) is an indicator based on statistics and the Fibonacci golden ratio.
cpcrv = 'copcurve(src,len)', //Coppock Curve. was originally developed by Edwin "Sedge" Coppock (Barron's Magazine, October 1962).
corrl = 'correl(src,len)', //Correlation coefficient. Describes the degree to which two series tend to deviate from their ta.sma values.
count = 'count(src,len)', //green avg - red avg
dev = 'dev(src,len)', //ta.dev() Measure of difference between the series and it's ta.sma
fall = 'falling(src,len)', //ta.falling() Test if the `source` series is now falling for `length` bars long. (Use its Input as another indicator output)
kcr = 'kcr(src,len,mult=2)', //Keltner Channels Range
kcw = 'kcw(src,len,mult=2)', //ta.kcw(). Keltner Channels Width. The Keltner Channels Width is the difference between the upper and the lower Keltner Channels divided by the middle channel.
macd = 'macd(src,len)', //macd
mfi = 'mfi(src,len)', //Money Flow Index
nvi = 'nvi()', //Negative Volume Index
obv = 'obv()', //On Balance Volume
pvi = 'pvi()', //Positive Volume Index
pvt = 'pvt()', //Price Volume Trend
rise = 'rising(src,len)', //ta.rising() Test if the `source` series is now rising for `length` bars long. (Use its Input as another indicator output)
roc = 'roc(src,len)', //Rate of Change
rsi = 'rsi(src,len)', //Relative strength Index
smosc = 'smi_osc(src,len,fast=5, slow=34)', //smi Oscillator
smsig = 'smi_sig(src,len,fast=5, slow=34)', //smi Signal
stdev = 'stdev(src,len)', //Standart deviation
trix = 'trix(src,len)' , //the rate of change of a triple exponentially smoothed moving average.
tsi = 'tsi(src,len)', //True Strength Index
vari = 'variance(src,len)', //ta.variance(). Variance is the expectation of the squared deviation of a series from its mean (ta.sma), and it informally measures how far a set of numbers are spread out from their mean.
wilpc = 'willprc(src,len)', //Williams %R
wad = 'wad()', //Williams Accumulation/Distribution.
wvad = 'wvad()' //Williams Variable Accumulation/Distribution.
}
f_func(string, float, simple, float, float, float, simple) f_func Return selected indicator value with different parameters. New version. Use extra parameters for available indicators
Parameters:
string : FuncType_ indicator from the indicator list
float : src_ close, open, high, low,hl2, hlc3, ohlc4 or any
simple : int length_ indicator length
float : p1 extra parameter-1. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
float : p2 extra parameter-2. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
float : p3 extra parameter-3. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
simple : int version_ indicator version for backward compatibility. V1:dont use extra parameters p1,p2,p3 and use default values. V2: use extra parameters for available indicators
Returns: float Return calculated indicator value
fn_heikin(float, float, float, float) fn_heikin Return given src data (open, high,low,close) as heikin ashi candle values
Parameters:
float : o_ open value
float : h_ high value
float : l_ low value
float : c_ close value
Returns: float heikin ashi open, high,low,close vlues that will be used with plotcandle
fn_plotFunction(float, string, simple, bool) fn_plotFunction Return input src data with different plotting options
Parameters:
float : src_ indicator src_data or any other series.....
string : plotingType Ploting type of the function on the screen
simple : int stochlen_ length for plotingType for stochastic and PercentRank options
bool : plotSWMA Use SWMA for smoothing Ploting
Returns: float
fn_funcPlotV2(string, float, simple, float, float, float, simple, string, simple, bool, bool) fn_funcPlotV2 Return selected indicator value with different parameters. New version. Use extra parameters fora available indicators
Parameters:
string : FuncType_ indicator from the indicator list
float : src_data_ close, open, high, low,hl2, hlc3, ohlc4 or any
simple : int length_ indicator length
float : p1 extra parameter-1. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
float : p2 extra parameter-2. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
float : p3 extra parameter-3. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
simple : int version_ indicator version for backward compatibility. V1:dont use extra parameters p1,p2,p3 and use default values. V2: use extra parameters for available indicators
string : plotingType Ploting type of the function on the screen
simple : int stochlen_ length for plotingType for stochastic and PercentRank options
bool : plotSWMA Use SWMA for smoothing Ploting
bool : log_ Use log on function entries
Returns: float Return calculated indicator value
fn_factor(string, float, simple, float, float, float, simple, simple, string, simple, bool, bool) fn_factor Return selected indicator's factorization with given arguments
Parameters:
string : FuncType_ indicator from the indicator list
float : src_data_ close, open, high, low,hl2, hlc3, ohlc4 or any
simple : int length_ indicator length
float : p1 parameter-1. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
float : p2 parameter-2. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
float : p3 parameter-3. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
simple : int version_ indicator version for backward compatibility. V1:dont use extra parameters p1,p2,p3 and use default values. V2: use extra parameters for available indicators
simple : int fact_ Add double triple, Quatr factor to selected indicator (like converting EMA to 2-DEMA, 3-TEMA, 4-QEMA...)
string : plotingType Ploting type of the function on the screen
simple : int stochlen_ length for plotingType for stochastic and PercentRank options
bool : plotSWMA Use SWMA for smoothing Ploting
bool : log_ Use log on function entries
Returns: float Return result of the function
fn_plotCandles(string, simple, float, float, float, simple, string, simple, bool, bool, bool) fn_plotCandles Return selected indicator's candle values with different parameters also heikinashi is available
Parameters:
string : FuncType_ indicator from the indicator list
simple : int length_ indicator length
float : p1 parameter-1. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
float : p2 parameter-2. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
float : p3 parameter-3. active on Version 2 for defining multi arguments indicator input value. ex: lagAdapt(src_, length_,LAPercLen_=p1,FPerc_=p2)
simple : int version_ indicator version for backward compatibility. V1:dont use extra parameters p1,p2,p3 and use default values. V2: use extra parameters for available indicators
string : plotingType Ploting type of the function on the screen
simple : int stochlen_ length for plotingType for stochastic and PercentRank options
bool : plotSWMA Use SWMA for smoothing Ploting
bool : log_ Use log on function entries
bool : plotheikin_ Use Heikin Ashi on Plot
Returns: float
Dow Factor Stoch RSIThe indicator was generated by adding the Dow Factor to the Stochastic Relative Strength Index.( Stoch RSI )
The Dow factor is the effect of the correlation coefficient, which determines the relationship between volume and price, on the existing indicators.
With these codes we are able to integrate them numerically into the indicators.
For more information on the Dow factor, please see my indicator:
This code is open source under the MIT license. ( github.com )
My dow factor updates will continue.We adapted the indicators and saw successful results, now it is time to examine and develop the factor itself.
Stay tuned , best regards.
Trend Continuation FactorTrend Continuation Factor indicator script.
This indicator was originally developed by M.H. Pee (Stocks & Commodities V. 20:3 (58-64): Trend Continuation Factor).
Trend Trigger FactorTrend Trigger Factor indicator script. This indicator was originally developed by M. H. Pee (Stocks & Commodities V.22:12 (28-36): Trend Trigger Factor).
Trend continuation factor, by M.H. PeeTrend continuation factor, by M.H. Pee
The related article is copyrighted material from Stocks & Commodities.