Moving Average CandlesInspired by Ricardo Santos's " Multiple Moving Average Candle System V0" ()
This script plots 6 moving averages using the plotcandle function rather than the normal plot function. Result is a stylish indicator that shows moving average crossovers in a more visual way. Moving average type options available are , or Simple, Exponential, Hull, Relative, Volume Weighted, and Arnaud Legoux Moving Averages, Linear Regression Curve, and Median. Lengths for each can be set in settings along with selection specific parameters. Good for plotting/visualizing potential entry/exit points based on your preferred moving averages crossing over, or just as some eye candy.
Macandles
customcandlesLibrary "customcandles"
customcandles: Contains methods which can send custom candlesticks based on the input
macandles(maType, length, o, h, l, c) macandles: Provides OHLC of moving average candles
Parameters:
maType : - Moving average Type. Can be sma, ema, hma, rma, wma, vwma, swma, linreg, median
length : - Defaulted to 20. Can chose custom length
o : - Optional different open source. By default is set to open
h : - Optional different high source. By default is set to high
l : - Optional different low source. By default is set to low
c : - Optional different close source. By default is set to close
Returns: : Custom Moving Average based OHLC values
hacandles() hacandles: Provides Heikin Ashi OHLC values
Returns: : Custom Heikin Ashi OHLC values
ocandles(type, length, shortLength, longLength, method, highlowLength, sticky, percentCandles) macandles: Provides OHLC of moving average candles
Parameters:
type : - Oscillator Type. Can be cci, cmo, cog, mfi, roc, rsi, tsi, mfi
length : - Defaulted to 14. Can chose custom length
shortLength : - Used only for TSI. Default is 13
longLength : - Used only for TSI. Default is 25
method : - Valid values for method are : sma, ema, hma, rma, wma, vwma, swma, highlow, linreg, median
highlowLength : - length on which highlow of the oscillator is calculated
sticky : - overbought, oversold levels won't change unless crossed
percentCandles : - candles are generated based on percent with respect to high/low instead of actual oscillator values
Returns: : Custom Moving Average based OHLC values