Moving Averages + BB & R.VWAP StDev (multi-tf)█ Moving Averages + Bollinger Bands and Rolling Volume Weighted Average Price with Standard Deviation Bands (Multi Timeframe)
Multiple moving averages can be independently applied.
The length , type and timeframe of each moving average are configurable .
The lines and colors are customizable too.
This script can display:
Moving Averages
Bollinger Bands
Rolling VWAP and Standard Deviation Bands
Types of Moving Averages:
Simple Moving Average (SMA)
Exponential Moving Average (EMA)
Smoothed Moving Average (SMMA)
Weighted Moving Average (WMA)
Volume Weighted Moving Average (VWMA)
Least Squares Moving Average (LSMA)
Hull Moving Average (HMA)
Arnaud Legoux Moving Average (ALMA)
█ Moving Average
Moving Averages are price based, lagging (or reactive) indicators that display the average price of a security over a set period of time.
A Moving Average is a good way to gauge momentum as well as to confirm trends, and define areas of support and resistance.
█ Bollinger Bands
Bollinger Bands consist of a band of three lines which are plotted in relation to security prices.
The line in the middle is usually a Simple Moving Average (SMA) set to a period of 20 days (the type of trend line and period can be changed by the trader, a 20 day moving average is by far the most popular).
The SMA then serves as a base for the Upper and Lower Bands which are used as a way to measure volatility by observing the relationship between the Bands and price.
█ Rolling VWAP
The typical VWAP is designed to be used on intraday charts, as it resets at the beginning of the day.
Such VWAPs cannot be used on daily, weekly or monthly charts. Instead, this rolling VWAP uses a time period that automatically adjusts to the chart's timeframe.
You can thus use the rolling VWAP on any chart that includes volume information in its data feed.
Because the rolling VWAP uses a moving window, it does not exhibit the jumpiness of VWAP plots that reset.
Based on the previous script :
Configurable
Awesome Oscillator and MACD HistogramThis is a quick script that combines two standard indicators, the Awesome Oscillator and MACD histogram, to highlight the beginnings of periods of fast price movement (divergence between the two). Since MACD's EMA responds more quickly than AO's SMA, look for periods of green over gold as a bullish signal, and red under blue as a bearish signal.
Of course both indicators are lagging in nature, but the presence of this divergence often leads larger, continued movement in the same direction.
Bullish Signals
Change from red to green below 0 with either blue or gold above 0 (strengthened on second green bar):
Rising green above 0 with gold below 0:
Bearish Signals
Change from green to red above 0 with either blue or gold below 0 (strengthened on second red bar):
Deepening red below 0 with blue above 0:
Automatic Support, Resistance, Fibonacci LevelsThis indicator plots absolute high and low values for up to five completely adjustable time periods (in months, weeks, days, hours, minutes) and optionally calculates the Fibonacci levels on the pair of absolutes of your choice, ascending or descending, and mimics the shading available in the built-in Fib charting tools (e.g. retracement).
Here are a few screenshots of the same chart with various options selected.
3-Month, 4-Week, and 5-Day absolutes with 3-Monthly Fib plotted:
The same chart with 4-Weekly Fib:
The same chart with 5-Daily Fib:
5-Day, 12-Hour, 90-Minute absolutes with 12-Hourly Fib:
Zoomed in, on a 30-minute interval, with 90-minute Fib:
With descending ("inverted") 90-minute Fib:
I started putting this together for Vazzyb, who was looking for a way to automate plotting horizontal support and resistance levels for monthly, weekly, and daily extremes, and then I added additional features as they occurred to me. Special thanks to Paaax, who suggested I add Fib levels.
I am leaving the code open, so you may feel free to grab snippets you like and use them for your own purposes. Of particular interest may be my custom "calc_fib()" function, which accepts any series pair, as well as a Boolean indicating whether to invert, and returns an array with each of the major Fibonacci levels: .
If anyone likes this enough to feel generous, please feel free:
BTC
3KmFchJ18QvMzAJKDcFQXvyK9p1EHWQdhP
BCH
qqtrw64ptuwprk5vtj3z8qwkvh3v0jawxq7khqng7x
ETH
0x9b51361A278910Ba3945C7519C9f0FA8a77df18d
LTC
MDeWWsP7XCG2zQuZ2dYALZXQ52u2qkc8fh
P.S. If you want the time lengths to be as close to accurate as possible, don't forget to change the number of days per week when using for cryptocurrency!
Reset Every (Indicator)Nearly identical to the price version , this configurable indicator retains the max and min value of a chart for the time duration you specify. The difference with this one is that it can be applied to any other indicator, not just price.
Applied to volume:
Reset Every (Price)Someone requested a high/low price indicator that would reset the "remembered" prices daily. I started out doing just that, and then decided to make it much more configurable.
Choose the units (minutes, hours, days, weeks, months) and the number of those units, and this will reset the highest/lowest value remembered to the current values on your chosen time interval.
This should work with any time interval you desire, within reason...asking for resets every 4000 hours on a monthly chart will probably not work.
GE, monthly, every 7 months:
Ford, weekly, every 18 months:
Dow Jones Industrial Average, weekly, every 90 days:
LTCBTC, daily, every 10 days:
ETHUSD, 30 minutes, every 10 days:
BTCUSD, 1 minute, every 10 hours:
EURUSD, 1 minute, every 50 minutes:
Also, I am about to publish another version of this with just one source input that can be applied to any indicator...stay tuned!
PVT OscillatorThis is the non-accumulating portion of the price-volume trend (PVT)--the amount by which PVT would change each bar--which I have turned into a zero-centered oscillator. The plot is a 9-day EMA of the PVT change, multiplied by 1000 for readability, with lime/red corresponding to whether the actual PVT increased or decreased for that bar.
As always, the length of this moving average is adjustable, as is the source of price(s) to use--open, close, high, low, HL2, HLC3, or OHLC4.
Fractal Breakout V2Version 2 of my fractal pattern aid ( Version 1 ).
I added a bouncing line between the high and low trend lines, connecting consecutive extreme points. I also chased down a pesky bug in the slope calculation...and for now I have disabled the ability to change resolution basis for extreme detection (e.g. 30m on a 1hr chart).
For fun, I added some shading to make it more apparent at a glance what is happening, but if you find it gimmicky, there's an option to turn that off.
I am inexperienced with pattern recognition, so please send feedback if you have any ideas that would make this more useful.
Thanks!
Lemrin
Fractal BreakoutFirst of all, huge credit to synapticEx , whose brilliant use of the security function inspired me to figure out a way to get quasi-shape boundaries automatically drawn on a chart.
This study draws upper and lower trend lines, based on configurable fractal*** reversal detection, calculates slope from the last two upper or lower reversal points, and then extends a dotted line along the same slope...until the next upper (or lower) reversal occurs. If the high (or low) breaks this extension, the dotted line becomes solid to aid visibility. Reversal detection is configurable to use any number of ticks, but probably four to eight will work best.
I made the inclusion of volume in the reversal logic optional (off by default) and left the existing SMA input found in synapticEx's code intact, albeit with a lower default. With the addition of trend lines, I found volume hindered identification of reversals, although I could try various other filters than the SMA included originally.
I have also left intact the very nice ability to change the period and use the requested period identify reversals, courtesy of synapticEx.
This could be used in a strategy, as the values plotted are actual values that are available to include in logic and do not include knowledge of the future. However , information is not available until the floor of half the number of ticks used in reversal detection (I then offset by that number to line things up visually). Having never heard of it until now, I just Googled the Bill Williams Alligator strategy, which looks interesting, so maybe I could see how this could be ported to that.
***As I typed this, I remembered that while making reversal detection configurable, I changed the detection logic simply to look for highest (or lowest) of the desired length of ticks. I don't know whether this is not strictly fractal anymore, but if desired, with a little work, I could make it require consecutive, consistent changes before and after each reversal again.
Here are a few screenshots from hourly ticks, using the "current" (hourly) period, with and without volume, and playing with the number of points used to identify reversals.
Not using volume
Using volume