Triple Hull Moving AverageCalculates and plots 3 Hull Moving Averages. Color of plot changes to indicate positive or negative slope. Original Hull MA code written by mohamed982.
Hull
Hull SuiteHull is its extremely responsive and smooth moving average created by Alan Hull in 2005.
Minimal lag and smooth curves made HMA extremely popular TA tool.
alanhull.com
Script was made to regroup multiple hull variants in one indicator,maintaining flexible customization and intuitive visualization
Option to chose between 3 Hull variations
Option to chose between 2 visualization modes ( Bands or single line)
Option to Paint hull and/or candlesticks according to hulls trend
Shortcut for personalizing Line/band thickness,instead of changing every object manually ,there is global option in inputs
HMA
THMA ( 3HMA)
EHMA
HMA:
Alan Hull
EHMA:
Slower than hull by default.
Raudys, Aistis & Lenčiauskas, Vaidotas & Malčius, Edmundas. (2013). Moving Averages for Financial Data Smoothing ( 403. 34-45. 10.1007/978-3-642-41947-8_4.) Vilnius University, Faculty of Mathematics and Informatics
3HMA (THMA) :
Documentation on link below
alexgrover
Custom Profitable Moving Average CrossoverA custom version of Profitable Moving Average Crossover that shows the last estimations on profit for each crossover type and allows to set date range for analysis.
SnakeWhile moving averages are a good way to visualize price action, they are, in general, very poor indicators to trade against. Usually, the lowest prices occur before the cross over of multiple moving averages, while the best profits occur just before the crossunders of the moving averages.
This study captures the buy signals before the cross overs and sells just prior to the cross unders, when prices are lowest and highest respectively.
This is accomplished by treating the moving average as a "snake", specifically looking for the "head" of the snake to turn upwards when buying is most opportunistic. Note the the body must still be trending downward.
For selling, the "snake's head" must be turning down while the body is trending up.
This script uses blue arrows, pointing up, at the bottom, to indicate a buy signal, sending an alert of BUY ASSET.
Blue arrows, point down, at the top, represent sell signals with an alert of SELL ASSET.
The gray bar or strip is momentum. The snake's head must be above momentum for a sell, and below for a buy. This study does NOT work well with stable coins.
The longer the momentum, the more likely weak signals will be weeded out, but also presents less opportunities for buys.
The longer the length of the snake, the more likely cascading down turns will be ignored, but requires a longer trend to identify buy signals.
Multiple HMA - bgeraghtyTo save space on a chart's maximum indicator count, this single indicator includes:
- Three Hull Moving Averages, Defaulted to 13, 26, and 55 Periods.
- Customizable Time-Frame for Each HMA.
- Customizable Triple Weighted MA Smoothing for Jagged Lines from Higher Time-Frame
- Alert Conditions for Price Cross Over/Under the HMAs.
Double RSI StudyHere is the study version of our recent Double RSI strategy based on a Hull RSI and ALMA RSI.
The study version includes alerts for signals generated by both RSI's. It also includes an option to allow repeat signals, as well as tons of plotting options, etc.
If interested in a 3 day trial, feel free to send a message and check out our website ProfitProgrammers.com !
Hull RSI
This is an RSI that is smoothed with a faster Hull Moving Average. The upper pink and bottom teal lines represent the 95th and 5th percentiles of Hull RSI values over a window of user-defined length.
The two percentile bands function identically to the traditional upper and lower bounds used in the standard RSI setup. Buy signals are plotted as the vertical green background highlights and sell signals are the red highlights. Buy signal is generated when RSI is below the lower teal line and then crosses above it. Sell signals occur when Hull RSI was previously above the upper pink line and then crosses back under.
Hull Trend with KahlmanThis is an update to the idea of
The Kahlman smoother makes the signal more precise (by one candle).
Hull TrendHere we are using Hull Moving Average crossovers as an experiment in trend detection.
The Hull Moving Average (HMA) is an extremely fast and smooth moving average.
Credit to alexgrover & RicardoSantos:
Keltner Channels around Hull MAKeltner Channels around Hull Moving Average
Script shared upon request. No guarantees on accuracy.
Parabolic Hull MA [wm]
Based on Everget's Parabolic WMA and Mladen MT5 Hull MA.
Power = 1 behaves the same as a standard HMA , > 1 speeds it up, < 1 slows it down
HMA ColoredThis is a typical hull moving average that is colored based on if the average is increasing or decreasing.
Hull MAThis Hull MA uses the default settings of the built-in MA. The basic idea is that we are in a buy setup when hull is below price, and a sell setup when hull is above price. The indicator is extended with slightly change in contrast when moving average is declining and it plot the ma/price crossovers: green dot when a buy setup is appearing, and red dot when a sell setup is forming. It is possible to hide crossovers in the option panel.
Three alert conditions is added "Hull MA cross", "Hull MA sell" and "Hull MA buy". I use "Hull MA cross" on slow frames (2w, M) and "Hull MA buy/sell" on faster frames.
ATR smoothed by Hull MAThis is Average True Range indicator, but it is smoothed with Hull MA ( not WMA etc )
It is set to overlay the candles so looks different from normal ATR but i assure you it is ATR
Script open so you can see for yourself.
perhaps different settings are better,
Help me test it, and suggest improvements thankyou
Multi SMA EMA WMA HMA BB (5x8 MAs Bollinger Bands) MAX MTF - RRBMulti SMA EMA WMA HMA 4x7 Moving Averages with Bollinger Bands MAX MTF by RagingRocketBull 2019
Version 1.0
All available MAX MTF versions are listed below (They are very similar and I don't want to publish them as separate indicators):
ver 1.0: 4x7 = 28 MTF MAs + 28 Levels + 3 BB = 59 < 64
ver 2.0: 5x6 = 30 MTF MAs + 30 Levels + 3 BB = 63 < 64
ver 3.0: 3x10 = 30 MTF MAs + 30 Levels + 3 BB = 63 < 64
ver 4.0: 5(4+1)x8 = 8 CurTF MAs + 32 MTF MAs + 20 Levels + 3 BB = 63 < 64
ver 5.0: 6(5+1)x6 = 6 CurTF MAs + 30 MTF MAs + 24 Levels + 3 BB = 63 < 64
ver 6.0: 4(3+1)x10 = 10 CurTF MAs + 30 MTF MAs + 20 Levels + 3 BB = 63 < 64
Fib numbers: 8, 13, 21, 34, 55, 89, 144, 233, 377
This indicator shows multiple MAs of any type SMA EMA WMA HMA etc with BB and MTF support, can show MAs as dynamically moving levels.
There are 4 MA groups + 1 BB group, a total of 4 TFs * 7 MAs = 28 MAs. You can assign any type/timeframe combo to a group, for example:
- EMAs 9,12,26,50,100,200,400 x H1, H4, D1, W1 (4 TFs x 7 MAs x 1 type)
- EMAs 8,13,21,30,34,50,55,89,100,144,200,233,377,400 x M15, H1 (2 TFs x 14 MAs x 1 type)
- D1 EMAs and SMAs 8,13,21,30,34,50,55,89,100,144,200,233,377,400 (1 TF x 14 MAs x 2 types)
- H1 WMAs 13,21,34,55,89,144,233; H4 HMAs 9,12,26,50,100,200,400; D1 EMAs 12,26,89,144,169,233,377; W1 SMAs 9,12,26,50,100,200,400 (4 TFs x 7 MAs x 4 types)
- +1 extra MA type/timeframe for BB
There are several versions: Simple, MTF, Pro MTF, Advanced MTF, MAX MTF and Ultimate MTF. This is the MAX MTF version. The Differences are listed below. All versions have BB
- Simple: you have 2 groups of MAs that can be assigned any type (5+5)
- MTF: +2 custom Timeframes for each group (2x5 MTF) +1 TF for BB, TF XY smoothing
- Pro MTF: 4 custom Timeframes for each group (4x3 MTF), 1 TF for BB, MA levels and show max bars back options
- Advanced MTF: +4 extra MAs/group (4x7 MTF), custom Ticker/Symbols, Timeframe <>= filter, Remove Duplicates Option
- MAX MTF: +2 subtypes/group, packed to the limit with max possible MAs/TFs: 4x7, 5x6, 3x10, 4(3+1)x10, 5(4+1)x8, 6(5+1)x6
- Ultimate MTF: +individual settings for each MA, custom Ticker/Symbols
MAX MTF version tests the limits of Pinescript trying to squeeze as many MAs/TFs as possible into a single indicator.
It's basically a maxed out Advanced version with subtypes allowing for mixed types within a group (i.e. both emas and smas in a single group/TF)
Pinescript has the following limits:
- max 40 security calls (6 calls are reserved for dupe checks and smoothing, 2 are used for BB, so only 32 calls are available)
- max 64 plot outputs (BB uses 3 outputs, so only 61 plot outputs are available)
- max 50000 (50kb) size of the compiled code
Based on those limits, you can only have the following MAs/TFs combos in a single script:
1. 4x7, 5x6, 3x10 - total number of MTF MAs must always be <= 32, and you can still have BB and Num Levels = total MAs, without any compromises
2. 5(4+1)x8, 6(5+1)x6, 4(3+1)x10 - you can use the Current Symbol/Timeframe as an extra (+1) fixed TF with the same number of MTF MAs
- you don't need to call security to display MAs on the Current Symbol/Timeframe, so the total number of MTF MAs remains the same and is still <= 32
- to fit that many MAs into the max 64 plot outputs limit you need to reduce the number of levels (not every MA Group will have corresponding levels)
Features:
- 4x7 = 28 MAs of any type
- 4x MTF groups with XY step line smoothing
- +1 extra TF/type for BB MAs
- 2 MA subtypes within each group/TF
- 4x7 = 28 MA levels with adjustable group offsets, indents and shift
- supports any existing type of MA: SMA, EMA, WMA, Hull Moving Average (HMA)
- custom tickers/symbols for each group
- show max bars back option
- show/hide both groups of MAs/levels/BB and individual MAs
- timeframe filter: show only MAs/Levels with TFs <>= Current TF
- hide MAs/Levels with duplicate TFs
- support for custom TFs that are not available in free accounts: 2D, 3D etc
- support for timeframes in H: H, 2H, 4H etc
Notes:
- Uses timeframe textbox instead of input resolution dropdown to allow for 240 120 and other custom TFs
- Uses symbol textbox instead of input symbol to avoid establishing multiple dummy security connections to the current ticker - otherwise empty symbols will prevent script from running
- Possible reasons for missing MAs on a chart:
- there may not be enough bars in history to start plotting it. For example, W1 EMA200 needs at least 200 bars on a weekly chart.
- for charts with low/fractional prices i.e. 0.00002 << 0.001 (default Y smoothing step) decrease Y smoothing as needed (set Y = 0.0000001) or disable it completely (set X,Y to 0,0)
- for charts with high price values i.e. 20000 >> 0.001 increase Y smoothing as needed (set Y = 10-20). Higher values exceeding MAs point density will cause it to disappear as there will be no points to plot. Different TFs may require diff adjustments
- TradingView Replay Mode UI and Pinescript security calls are limited to TFs >= D (D,2D,W,MN...) for free accounts
- attempting to plot any TF < D1 in Replay Mode will only result in straight lines, but all TFs will work properly in history and real-time modes. This is not a bug.
- Max Bars Back (num_bars) is limited to 5000 for free accounts (10000 for paid), will show error when exceeded. To plot on all available history set to 0 (default)
- Slow load/redraw times. This indicator becomes slower, its UI less responsive when:
- Pinescript Node.js graphics library is too slow and inefficient at plotting bars/objects in a browser window. Code optimization doesn't help much - the graphics engine is the main reason for general slowness.
- the chart has a long history (10000+ bars) in a browser's cache (you have scrolled back a couple of screens in a max zoom mode).
- Reload the page/Load a fresh chart and then apply the indicator or
- Switch to another Timeframe (old TF history will still remain in cache and that TF will be slow)
- in max possible zoom mode around 4500 bars can fit on 1 screen - this also slows down responsiveness. Reset Zoom level
- initial load and redraw times after a param change in UI also depend on TF. For example: D1/W1 - 2 sec, H1/H4 - 5-6 sec, M30 - 10 sec, M15/M5 - 4 sec, M1 - 5 sec. M30 usually has the longest history (up to 16000 bars) and W1 - the shortest (1000 bars).
- when indicator uses more MAs (plots) and timeframes it will redraw slower. Seems that up to 5 Timeframes is acceptable, but 6+ Timeframes can become very slow.
- show_last=last_bars plot limit doesn't affect load/redraw times, so it was removed from MA plot
- Max Bars Back (num_bars) default/custom set UI value doesn't seem to affect load/redraw times
- In max zoom mode all dynamic levels disappear (they behave like text)
- Dupe check includes symbol: symbol, tf, both subtypes - all must match for a duplicate group
- For the dupe check to work correctly a custom symbol must always include an exchange prefix. BB is not checked for dupes
Good Luck! Feel free to learn from/reuse the code to build your own indicators.
Dickinson Moving Average (DMA)Implementation of the "Dickinson Moving Average" from the r/algotrading post by Nathan Dickinson
Quoted from the author of the Dickinson Moving Average:
"I was experimenting with the “zero lag” code from John Ehlers and the Hull Moving Average and noticed that they seemed to respond in complementary ways when properly set up. With the right starting values, they blend together to make a moving average which responds with one (or maybe even half a bar) of lag. To my eye, it looks to be almost as good as the Jurik Moving Average."
Optional parameter input available to use Exponential Hull Moving Average (EHMA) instead of WMA for the Hull MA is available.
Acknowledgements/Credits:
Nathan Dickinson, Dickinson Moving Average
@RicardoSantos, Function for Hull Moving Average
Exponential Hull Moving Average sourced from:
// Raudys, Aistis & Lenčiauskas, Vaidotas & Malčius, Edmundas. (2013). Moving Averages for Financial Data Smoothing.
// Communications in Computer and Information Science. 403. 34-45. 10.1007/978-3-642-41947-8_4.
@Everget, Jurik Moving Average
Exponential Hull Moving Average (EHMA)Source for Exponential Hull Moving Average (EHMA) formula:
Raudys, Aistis & Lenčiauskas, Vaidotas & Malčius, Edmundas. (2013). Moving Averages for Financial Data Smoothing. Communications in Computer and Information Science. 403. 34-45. 10.1007/978-3-642-41947-8_4.
The Exponential Hull Moving Average is nearly identical to the Hull MA, but EMA used instead of WMA.
Credit to @RicardoSantos for the existing implementation of the Hull Moving Average in pinescript:
TH_HMA+ HistogramHistogram version of HMA+. This Centered Oscillator show more accurately when trends are reversing thanks to the U-shape reversals and clouds switching Red/Green. Fast MA getting above/under the base implies a establish Bullish/Bearish bias.
There is a flagging circles that will be visible depending how price is under or above the Fast MA which can also provide early indication of trend direction.
Hull MA BarsThis indicator fill bars with color of HullMA + warning yellow bars, then trend reversing
Profitable Moving Average CrossoverHi everyone!
Introduction
A popular use for moving averages is to develop simple trading systems based on moving average crossovers. A trading system using two moving averages would give a buy signal when the shorter (faster) moving average advances above the longer (slower) moving average. A sell signal would be given when the shorter moving average crosses below the longer moving average. The speed of the systems and the number of signals generated will depend on the length of the moving averages.
There are many types of averages that are based on different techniques. Each type has its drawbacks and merits. And if we decide to choose a certain type of average for the trading system, then how do we know that our choice is optimal?
What is this tool?
This tool will help you to choose this type to create the most profitable trading system based on crossovers for the specified periods. It backtests pairs of each type throughout the whole instrument's history and shows Net Profit curves as a result. So, the type of the most profitable crossover system will be at the top of list of labels on the chart. (Click on the price scale, point to "Labels" and switch off "No Overlapping Labels" option).
Settings
The main settings are periods for each type pair of fast and slow moving averages.
Additionally, it allows to customize some multi-parametric moving averages such as JMA, ALMA, McGinley Dynamic, Adaptive Laguerre Filter etc.
1st Period (default: 14 )
2nd Period (default: 50 )
1st ALF Median Length (default: 5 )
2nd ALF Median Length (default: 5 )
1st ALMA Offset (default: 0.85 )
1st ALMA Sigma (default: 6 )
2nd ALMA Offset (default: 0.85 )
2nd ALMA Sigma (default: 6 )
1st HF Scaling Factor (default: 3 )
2nd HF Scaling Factor (default: 3 )
1st JMA Phase (default: 50 )
2nd JMA Phase (default: 50 )
1st MD Constant (default: 0.6 )
2nd MD Constant (default: 0.6 )
1st MHLMA Range (default: 10 )
2nd MHLMA Range (default: 10 )
1st PWMA Power (default: 2 )
2nd PWMA Power (default: 2 )
1st REMA Lambda (default: 0.5 )
2nd REMA Lambda (default: 0.5 )
1st RMF Median Length (default: 5 )
2nd RMF Median Length (default: 5 )
1st T3 Alpha (default: 0.7 )
2nd T3 Alpha (default: 0.7 )
MAMA & FAMA Fast Limit (default: 0.5 )
MAMA & FAMA Slow Limit (default: 0.05 )
Supported types of averages and filters (use short titles to match averages on the chart)
AHMA , Ahrens MA (by Richard D. Ahrens)
ALMA , Arnaud Legoux MA (by Arnaud Legoux and Dimitris Kouzis-Loukas)
ALF , Adaptive Laguerre Filter (by John F. Ehlers)
ARSI , Adaptive RSI
BF2 , Butterworth Filter with 2 poles
BF3 , Butterworth Filter with 3 poles
DEMA , Double Exponential MA (by Patrick G. Mulloy)
DWMA , Double Weighted (Linear) MA
EDCF , Ehlers Distance Coefficient Filter (by John F. Ehlers)
EHMA , Exponential Hull MA
EMA , Exponential MA
EVWMA , Elastic Volume Weighted MA (by Christian P. Fries)
FRAMA , Fractal Adaptive MA (by John F. Ehlers)
GF1 , Gaussian Filter with 1 pole
GF2 , Gaussian Filter with 2 poles
GF3 , Gaussian Filter with 3 poles
GF4 , Gaussian Filter with 4 poles
HFSMA , Hampel Filter on Simple Moving Average
HFEMA , Hampel Filter on Exponential Moving Average
HMA , Hull MA (by Alan Hull)
HWMA , Henderson Weighted MA (by Robert Henderson)
IDWMA , Inverse Distance Weighted MA
IIRF , Infinite Impulse Response Filter (by John F. Ehlers)
JMA , Jurik MA (by Mark Jurik, )
LF , Laguerre Filter (by John F. Ehlers)
LMA , Leo MA (by ProRealCode' user Leo)
LSMA , Least Squares MA (Moving Linear Regression)
MAMA & FAMA , (by John F. Ehlers, special case that used as a benchmark)
MD , McGinley Dynamic (by John R. McGinley)
MHLMA , Middle-High-Low MA (by Vitali Apirine)
PWMA , Parabolic Weighted MA
REMA , Regularized Exponential MA (by Chris Satchwell)
RMA , Running MA (by J. Welles Wilder)
RMF , Recursive Median Filter (by John F. Ehlers)
RMTA , Recursive Moving Trend Average (by Dennis Meyers)
SHMMA , Sharp Modified MA (by Joe Sharp)
SMA , Simple MA
SSF2 , Super Smoother Filter with 2 poles (by John F. Ehlers)
SSF3 , Super Smoother Filter with 3 poles (by John F. Ehlers)
SWMA , Sine Weighted MA
TEMA , Triple Exponential MA (by Patrick G. Mulloy)
TMA , Triangular MA (generalized by John F. Ehlers)
T3 , (by Tim Tillson)
VIDYA , Variable Index Dynamic Average (by Tushar S. Chande)
VWMA , Volume Weighted MA (by Buff P. Dormeier)
WMA , Weighted (Linear) MA
ZLEMA , Zero Lag Exponential MA (by John F. Ehlers and Ric Way)
NOTE : The results may vary on different tickers and timeframes.
If you see the preview result it doesn't mean that these crossovers will be profitable on other instruments and timeframes. This is a normal situation because time series and their characteristics differ.
I know that because I tested this tool before publishing.
NOTE 2 : You can use this tool by yourself and experiment with it, or you can order a study and I will share the spreadsheet that contains results with you.
Good luck!
HullMA Strategy--HULL 20 Hisse senedinin hull moving average gibi hızlı bir hareketli ortalamada 20 li paremetrege performansını göstermektedir. Kodu trdingwiewswn alınmıştır.