Editors' picks
OPEN-SOURCE SCRIPT

Moving Average Entanglement

Updated
This script uses the gap in moving averages standardized to the average true range to determine entry and exit points.
The red line represents the current percentage of ATR that is deemed "The Dead Zone" - a move that is too small to be reliable.
The histogram represents the gap between moving averages. When the histogram is above the red line, it confirms a breakout move.
The dashed line an be used as a secondary filter and is a moving average of the histogram.
When Standard Deviation mode is on, a third line is displayed, which represents how many standard Deviations the current histogram bar represents, and can be also used as a filter.
Release Notes
added option to color histogram based on bullish/bearish Gap of MAs
Release Notes
Added Alerts
Release Notes
bug fix for alert conditions to only fire on crossovers
Release Notes
Added alerts when the histogram changes color (goes bullish from bearish or vice-versa) after two or more previous bars of the opposite color
Release Notes
added price source as an input parameter
Release Notes
Added alert conditions for Std Deviation/MA crossovers and crossunders
Average True Range (ATR)Moving Average Convergence / Divergence (MACD)Volatility

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Software Engineer and FX, Options, Crypto Trader. Previously worked at large options market maker. If you like my scripts and would like to donate:
Bitcoin: 179ETrGo3FCVcnBV8i1uc4J8YHFRknYytz
Eth: 0x73d59A8214FD70053aF37E9700692e25de441245

Disclaimer