Heikin-Ashi Smoothed with option to change MA types CryptoJoncisPine Script version=3
Author CryptoJoncis
Heikin-Ashi Smoothed
The Heikin-Ashi Smoothed study is based upon the standard Heikin-Ashi study with additional moving average calculations. The following is the calculation formula for the bars:
1. The current bar Open, High, Low, Close values are smoothed individually by using the moving average type specified by the Moving Average Type 1 Input with a length/period specified by the Moving Average Period 1 Input.
2. The Heikin-Ashi bar Open, High, Low, Close values are set using the smoothed values from step 1. This is performed using the standard Heikin-Ashi formula.
3. The final Heikin-Ashi Open, High, Low, Close values are calculated by doing a second smoothing of the bar values from step 2 by using the moving average type specified by the Moving Average Type 2 Input with a length/period specified by the Moving Average Period 2 Input.
If you choose to tick the box where it offers to use only one smoothed HA then it skips the third/final step and you do not need to choose the second MA type for it to work.
Remember, using FRAMA, always make sure you use even number for length.
For simple Heikin-Ashi, please tick single smoothed and DEFAULT (Not smoothed as there are no MA used)
Heikin-Ashi bars are calculated:
1. Close = (Open + High + Low + Close) / 4
This is the average price of the current bar.
2. Open = (Open of Previous Bar + Close of Previous Bar) / 2
This is the midpoint of the previous bar.
3. High = Max of (High, Open, Close)
Highest value of the three.
4. Low = Min of (Low, Open, Close)
Lowest value of the three.
Any questions/suggestions/errors or spelling mistakes? Please leave a comment and let me know. I will try to fix it.
This took me few days to finish, so I hope you will find it useful.
Would you like to have more MA type choices? Please comment down with any other which aren't included in this indicator and I will research them and add.
MA included in this script:
Tillson Moving Average (T3)
Double Exponential Moving Average (DEMA)
Arnaud Legoux Moving Average (ALMA)
Least Squares Moving Average (LSMA)
Simple Moving Average (SMA)
Exponential Moving Average (EMA)
Weighted Moving Average (WMA)
Smoothed Moving Average (SMMA)
Triple Exponential Moving Average (TEMA)
Hull Moving Average (HMA)
Adaptive moving average (AMA)
Fractal Adaptive Moving Average (FAMA)
Variable Index Dynamic Average (VIDYA)
Triangular Moving Average (TRIMA)
You can use,publish,modify this code in any way as you wish, but only if you reference me after.
You are not allowed to sell it as it is.
If this code is useful to you, then consider to buy me a coffee (or better a pint of beer) by donating Bitcoin or Etherium to:
BTC: 3FiBnveHo3YW6DSiPEmoCFCyCnsrWS3JBR
ETH: 0xac290B4A721f5ef75b0971F1102e01E1942A4578
References:
www.sierrachart.com
www.investopedia.com
www.binarytribune.com
www.investopedia.com
www.stockfetcher.com
www.mql5.com
www.incrediblecharts.com
help.cqg.com
www.blastchart.com
Double Exponential Moving Average (DEMA)
Ultimate 'Multi-Timeframe' Multi-AveragesPlots different kinds of averages (EMA, SMA, SMMA, WMA, VWMA) referred to a fixed timeframe/period indipendent from the one that you are watching (example: plot daily EMA on the 4h chart).
Highlights the crossing of averages.
CM_FastGuppy_DEMA'SThis script plots 12 different DEMA's for which you can set inputs yourself, similar to CM_Guppy_EMA but then for DEMA. Due to the nature of DEMA, I've called it the "fast Guppy".
Kozlod - Yet Another Moving Average Cross Strategy (9 MA types)You can choose one of these MA types in params:
Simple Moving Average (SMA)
Exponential Moving Average (EMA)
Weighted Moving Average (WMA)
Arnaud Legoux Moving Average (ALMA)
Hull Moving Average (HMA)
Volume-weighted Moving Average (VWMA)
Least Square Moving Average (LSMA)
Smoothed Moving Average (SMMA)
Double Exponential Moving Average (DEMA)
Also you can select SL/PT % levels.
Moving Average RibbonThis is an extension of the Madrid Moving Average Ribbon public script to allow for different kinds of moving averages (the original allows only exponential and simple). Possible entries in the MA Type argument field are:
sma (simple moving average)
ema (exponential moving average)
wma (weighted moving average)
trima (triangular moving average)
zlema (zero-lag exponential moving average)
dema (double exponential moving average)
tema (triple exponential moving average)
hma (hull moving average)
If the argument given by the user does not match anything from the above list, it will default to ema.
Volume (D)EMAA simple yet configurable indicator that shows recent traffic volumes.
The time period is specified as weeks/days/hours/minutes, not as bars.
Set the volume period to non-zero if you want to use a generalized double EMA instead of plain.
The "ratio" option will show the size of the current volume compared to the average volume as computed for the specified time period; say hello to fat tails and goodby to "standard" and "normal" and "average". With the "together" option, it compares the current volume to the both sides together (buy+sell), otherwise it compares it to just its respective side.
Volume (D)EMAA simple yet configurable indicator that shows recent traffic volumes.
The time period is specified as weeks/days/hours/minutes, not as bars.
Set the volume period to non-zero if you want to use a generalized double EMA instead of plain.
The ratio option will show the size of the current volume compared to the volume in the specified time period (expect to see something very non-Gaussian, say goodby to trusting your ATR and stddev, and say hello to fat tails.) With the "together" option, it compares the current volume to the both sides together (buy+sell), otherwise it compares it to just its own.
Volume (D)EMAA simple yet configurable indicator that shows recent traffic volumes.
The time period is specified as weeks/days/hours/minutes, not as bars.
For using the generalized double EMA, set the velocity to something other than zero.
High-Low Difference Channels r2About:
I developed the original as an experiment to potentially replace or augment my BB and RSI based strategies. After some back-testing I could see some really interesting results but it wasn't quite where I wanted it, so after some tweaking and further back-testing, and adding in more MA options, here we are. Mostly tested on 1h and greater time-frames using default settings.
Description / Usage:
Adjust length and multiplier much the same way you would expect with Bollinger Bands.
Multiplier of 1 gives you a base channel consisting of one high, and one low sourced MA
The outer channels are increments of the base high-low channel width, away from the hl2 sourced MA
r2 Changes:
Increased amount of up/down channels to 5, and lowered multiplier default to 1 (previously 1.5)
Tweaked default colour scheme.
Pick your MA poison of choice! Added choices for all your common MA variants.
Issues:
VWMA bugs out and refuses to draw sometimes - no idea why.
Additional Notes:
All MA variants available in this script were derived directly from the sources of those available within the pine editor. I have been fairly diligent trying to ensure they all function correctly, but I can't 100% guarantee it, so if anyone gives the script a try, or dives into the code and see's something odd - don't hesitate to let me know!
It would also be fantastic to hear feedback from anyone who finds use for this, to augment an existing strategy/idea, or develop something new. :)