Dynamic Gap Probability Tool is a price-chart indicator that plots a selectable moving average and measures how far the close sits from it as a rounded percentage.
1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
Dynamic Gap Probability Tool stores historical counts of bars above and below that average at each deviation size, then shows a table with the current deviation, how often that size appeared, and the historical share of following green candles. Users choose the average type and length, table placement and size, a candle counter, and a minimum occurrence filter. It does not place trades.
Seven moving average types plotted on price
Rounded percent deviation from the average
Historical occurrence counts by deviation size
Next green candle frequency table
Configurable table position, size, and minimum occurrences
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Moving Average
string
SMA
maType
averagePeriod
int
200
averagePeriod
maColor
color
color.blue
maColor
Display Table
bool
true
showTable
positionChoice
string
Top Right
positionChoice
tableSize
string
size.normal
tableSize
Show Candle Counter
bool
true
showCandleCounter
Minimum Occurrences
int
50
minOccurrences
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This overlay indicator plots a Supertrend from an ATR length and factor, four exponential moving averages, and a selectable VWAP or TWAP taken from a chosen timeframe on the price chart. It also shows MACD and stochastic with adjustable lengths, smoothing, ver
This indicator plots a 200-period weighted moving average (WMA) on the main chart and monitors price deviations across multiple timeframes. It retrieves daily, 15-minute, 5-minute, and 2-minute price data to track distance from the 200 WMA relative to key sess
TradersPost Trading Checklist is an overlay indicator that evaluates a suite of popular technical conditions for long and short trade setups. It checks session-anchored VWAP, fast and slow EMA alignments and crosses, 200 SMA, RSI overbought or oversold conditi
The 8zz Contrarian Indicator plots reverse sentiment trading signals directly on the price chart based on tracked retail post activity. It generates bullish signals during retail panic and bearish signals during market euphoria. The indicator features adjustab
This indicator plots five moving averages of a chosen source on the price chart, defaulting to EMA lengths 10, 20, 30, 40 and 50. The user can switch the average type to SMA, WMA or HMA and recolor each line. Wide translucent glows sit under the lines, and sof
This indicator builds a table of simple moving averages and places it on the price chart. It calculates a user-chosen number of SMAs whose periods start at a base length and increase by a fixed step. On the last bar it lists each period and its SMA value, colo