Average, Median, Mode, Biggest: Pip Range Measures & LabelsApply various simple statistical measures to series of full candle ranges over user input length (in bars).
Choose between AVERAGE, MEDIAN, MODE, BIGGEST.
All calculations derive from the high-low range of a candle.
Default length = 260, the number of daily candles in a year.
MODE is calculated from pip ranges rounded to reasonable increments (to nearest 10pips foreign currencies; to nearest 100 pips for DXY ; nearest $10 for other assets). Best only use MODE for the major FX pairs encoded, and on Daily timeframe .
User input 'unit multiplier' only applies when asset is NOT a major Forex pair (unit and multiplier is auto applied for for major FX pairs).
© twingall
Mode
Ehlers Market Mode Indicator [CC]The Market Mode Indicator was created by John Ehlers (Rocket Science For Traders pgs 114-117) and this is a handy tool that will tell you if the market is currently in a cycle or a trend. When the current market is in a cycle or choppy state then the indicator will read 0 and when it is in a trend then it will read 1. He uses some advanced digital signal processing to figure out the current trend and for how long it has been trending. I have included buy and sell signals using the trendline and so buy when the line turns green and sell when it turns red. Let me know if this indicator is useful for you.
Let me know if there are any other indicators you would like to see me publish!
Scalpius Trend & Decreasing VolatilityScalpius Trend & Decreasing Volatility
Identify trends and 'decreasing volatility' trends (strong trends)
Can be used on any market
Setup usually used for 3 timeframes e.g. 2 min, 5 min, 10 min
Contains 2 parts:
I) Trend Indicator
Trends can be defined in several ways,
this indicator defines a trend that uses statistally significant price behaviour that includes the use of the Bollinger Bands
II) Decreasing Volatility Indicator
Trends that are accompanied by decreasing volatility are statistically more likely to go further and longer,
this indicator shows you when 'Decreasing Volalitility Mode' is on and when it turns off using 'pivot highs' and Average True Range
Using this indicator you can filter your trades to 2 types of trades: trend trades and mean reversion trades
I) Trend indicator
-----------------------
Trend Mode ON:
1) A candle touching the Bollinger Band (default settings: length=20, standard deviation=2) (the Bollinger Candle)
2a) (uptrend) A follow-up candle with a higher high and a higher close than the Bollinger Candle
2b) (downtrend) A follow-up candle with a lower low and a lower close than the low of the Bollinger Candle
Examples Trend Mode ON:
Uptrend
Downtrend
Trend Mode OFF when:
1) Price touches the opposite Bollinger Band
2) 20 candles without new high or low
3a) (uptrend) price closes consecutively below 2 EMA's (8 EMA & 21 EMA), above and below again, without making new trend highs
3b) (downternd) price closes consecutively above 2 EMA's (8 EMA & 21 EMA), below and above again, without making new trend lows
Examples Trend Mode OFF:
Uptrend ends because of opposite Bollinger Band touch:
Uptrend ends because of 20 candles without new high:
Uptrend ends because of price consecutively close below, above, below EMA 8 and EMA 21:
Downtrend ends because of opposite Bollinger Band touch:
Downtrend ends because of 20 candles without new low:
Downtrend ends because of price consecutively close above, below, above EMA 8 and EMA 21:
II) Decreasing Volatility Indicator
Decreasing Volatility Mode ON:
1) Trend Mode must be ON
2) Highest or lowest close in the trend must happen on a DOWNTICK in ATR (Average True Range, default setting=14)
Decreasing Volatility Mode OFF:
1) New ATR high in the trend
2) Breaking the pattern of lower lows and lower highs in ATR, aka 'pivot high' or '2 pivot high'
Examples DV Mode ON:
In an uptrend:
In a downtremd:
Examples DV Mode OFF:
In an uptrend:
In a downtremd:
If trend stops, DV Mode stays ON until DV OFF signal comes
Trend Mode Indicator by Kripto MuhtarEn: This indicator is a combination of both linear regression slope and relative strength index. Linear regression slope is calculated, maximum and minimum values of a certain period is determined and a band for slope movement is declared. This bands is a similar of Bollinger Bands. While the slope is refered as speed, the speed of the trend mode is calculated by the movement in the bands. If slope crosses the mid band and sRSI is above 55(50 +filter value), it is accepted that the trend is in rising mode and vice versa. The RSI filter is optional. Blue area is rising trend mode, red area is falling trend mode, silver area is ranging trend mode.
The inputs:
Look back:Calculation period of linear regression slope
Smoothing: Weighted moving average period of the slope
Filter Value: The constant to add/subtract from smoothed RSI on signal line 50.
SRSI Period: Smoothed RSI period
Tr: Bu indikatör, lineer regresyon eğimi ve göreceli güç endeksi indikatörlerinin birleştirilmesi sonucu elde edilmiştir. Öncelikle lineer regresyon eğimi hesaplanmış, belirli bir periyotta maksimum ve minimum değerleri hesaplanmış ve bu sonuçlara göre Bollinger Bantlarına benzeyen bir bant elde edilmiştir. Hız, eğim ile ifade edildiğinden trendin hareket hızı da bant içindeki eğimin hareketine göre belirlenerek trend modu tespit edilmiştir. Eğer eğim çizgisi orta bandı yukarı keser ve sRSI 55(50+filter value) üzerinde ise bu koşul yükselen bir trendi göstermektedir ya da tersi. RSI filtresi opsiyoneldir. Mavi bölge yükselen trend modunu, kırmızı bölge düşen trend modunu, gümüş bölge yatay trend modunu göstermektedir.
Girdiler:
Look back: Lineer regresyon eğiminin hesaplama perioyodu
Smoothing: Eğimin ağırlıklı ortalama periyodu
Filter Value: RSI sinyal çizgisi 50 değerine eklenip çıkartılacak değer
SRSI Period: Yumuşatılmış RSI hesaplama periyodu
CryptoField - TREND Mode indicatorThe CryptoField TREND Mode indicator identifies the trend direction (uptrend or downtrend) and the mode (trending or sideways) of the market.
Uptrend when green
Downtrend when red
Sideways when orange
Trending when green or red
Basically the indicator works like a double moving average, but the algorithm reacts faster on movements and it tolerates "noisy"/volatile markets better which makes it more effective on crypto markets.
It can be applied to strategies or other indicators as a trend direction or market mode filter.
Simple Moving ModeIntroduction
While this indicator is the first of it's type and has never been built before, it is as fundamental as a moving average!
The code complexity was very high which is the primary reason this has not been done before.
The indicator operates in real-time and does not change after it has been plotted as it has been coded in the latest Pinescript V3 meaning that it is fully functional for trading!
Understanding the Simple Moving Mode (SMMO)
By definition, the mode is the value within a set of data that occurs the most often. This makes it different to an average or median. In this context, the “Period” of the moving mode defines how many candlesticks should be used in the data set.
Once the period of data has been defined, the most commonly occurring price within that set must be determined. Unfortunately, the event of any high, low, or closing value of a time stamp being the same is infrequent as many securities trade to the precision of at least two decimal places. To overcome this, the middle value represents each candlestick in the data set and a user defined precision factor has been created labelled, Range .
Setting this value to zero will mean that each value within the period must be the same, while setting this value to “1” will allow for +/-0.5% between the values, making modal occurrences more common. If a mode does not occur within a set, the indicator will automatically plot the candle value.
Indicator Utility
The Simple Moving Mode has many different applications. While price action can be used as a point of reference when trading with the indicator, it is recommended to pair the SMM with other indicators to create points of interest.
Remember, the mode will only change when another more commonly occurring value presents itself. For this reason, the SMM appears as a Step-Line. This indicator works as a perfect representation of a Moving Mode with a defined period. Any indicator that is plotted as a smoothed or curved line is NOT MODAL.
Don't forget to give it a like!
Right now, the script only caters to a period length of 1 to 50. If there is enough interest, I will continue to finish up to a period length of 200 (this will probably be another 1000 lines of code).
Happy Trading!
Function Mean Median Mode V0EXPERIMENTAL:
Request for GLAZ
Functions to handle Mean, Median, Mode Calculation.
Empirical Mode Decomposition The related article is copyrighted material from Stocks & Commodities Mar 2010
You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...