High Probability FVG Detector (MTF)Utilizes the logic behind why Fair Value Gaps exist in the first place; momentum leaving orders partially filled, therefore leaving resting liquidity that still needs to be filled. The more orders remaining, the higher the likelihood of price revisiting. However, there are high quality fair value gaps and low quality fair value gaps. High quality FVG's (the one's most likely to act as support/resistance) would likely be formed during high liquidity. This creates a more volume saturated zone. Saturation meaning remaining orders at each tick level, or as close as possible. Low quality FVG's would be one's formed during low liquidity, which price movement range is more related to gaps in the order book (thin ladder) rather than volume based momentum. Due to the limitations of Pine Script I don't have access to DOM/Order Book functionality but this indicator will make use of volume. Here is the executive summary:
FVG Detection: It scans the price action for the specific three-candle pattern that defines a bullish or bearish FVG.
Multi-Timeframe (MTF) Capability: It allows you to detect FVGs on a timeframe different from the one currently displayed on your chart (e.g., find 1-hour FVGs while looking at a 5-minute chart).
Probability Filtering: It attempts to classify FVGs based on the conditions during their formation.
Volume Filter: Checks if the FVG was formed with volume significantly higher than average (indicating strong participation).
Candle Range Filter: Checks if the FVG was formed by a candle with a significantly larger range than average (using ATR, indicating strong momentum/volatility).
Differentiated Coloring: It visually distinguishes between different types of FVGs using different colors.
High Probability: FVGs that meet the enabled Volume and/or Range filter criteria.
Low Volume: FVGs that specifically fail the Volume filter (when enabled), potentially indicating weaker conviction.
Regular: FVGs that don't meet any specific filter criteria (if the option to show them is enabled).
Mitigation Tracking: It monitors if the price later trades back into the identified FVG zone (based on either the wick touching or the body closing within the zone, selectable by the user) and changes the color of the FVG box once this happens.
Visual Display: It draws colored boxes representing the price range of the FVGs, optionally extending unmitigated boxes into the future for easy visibility.
In essence, the indicator aims to automate the detection of these price inefficiencies, filter them based on volume and momentum characteristics, and track when they are revisited by price, providing traders with visual cues about potentially significant support/resistance zones and/or target zones for trading into.
Indicatori e strategie
Tango Rocket velas 1.5Tango Rocket Indicator:
Daily Volatility Range Projection
This indicator identifies the 3 largest-bodied candles from the last N daily bars and calculates a projected price range centered on the current day’s opening price. The projected channel is displayed for the current day and past days, helping visualize potential daily movement and historical volatility patterns.
Fibonacci BB EMA SetupThe Fibonacci-BB-EMA setup is a hybrid technical indicator that marries three classic tools into one dynamic
RSI + RSI MA + Choppiness IndexThe indicator is an extension of the Chopiness & RSI Index but takes it one step further by adding the RSI based MA .
Strong uptrend occurs when the RSI is at least 15% above the RSI based MA and the choppiness index value is below the RSI based MA.
Strong downtrend occurs when the Choppiness index line is at least 15% above the RSI based MA and the RSI is below the RSI based MA.
When both the RSI and Chopiness index are above the RSI based MA, this can mean either an uptrend or approaching downtrend.
When both the RSI and Chopiness index are below the RSI based MA, this can mean either an downtrend or approaching uptrend.
*Use at own risk.
ICT Killzones + Macros [TakingProphets]The "ICT Killzones + Macros" indicator is a comprehensive market structure and session visualizer built for day traders and ICT (Inner Circle Trader) method followers. It plots key session zones, previous highs/lows, and macro time blocks to help identify liquidity zones, entry windows, and price reactions.
Buy/Sell Signal - RSI + EMA + MACDSignal 'Buy' if all of the following three conditions are true
Rsi crosses above 55
Ema 9 crosses over ema 21
Macd histogram shows second green on
Signal 'Sell' if all of the following three conditions are true
Rsi crosses below 45
Ema 9 crosses below Ema 21
Macd histogram shows second red on
BTC Fair Value via Global Liquidity📈 BTC Fair Value via Global Liquidity
This indicator estimates Bitcoin's fair value based on a regression model using Global Liquidity (GLI) data from major central banks.
🔍 How it works:
Fair Value Line (orange): Calculated using a power-law model: Fair Value = e^b * (GLI)^a, where a and b are user-defined parameters based on historical regression.
Global Liquidity (GLI): Combines liquidity metrics from central banks (Fed, ECB, PBoC, BoJ, etc.), including adjustments for the RRP and TGA.
Deviation Bands (green/red dashed): Optional upper and lower bands showing % deviation from fair value (default ±25%). These help identify overbought/oversold conditions.
Delta Plot (gray dots): Displays the % deviation of BTC’s price from its modeled fair value.
⚙️ How to use:
Tune a and b for better model fitting (e.g., via log-log regression).
Use the deviation bands to identify potential entry/exit zones or periods of market inefficiency.
Ideal for macro-level BTC valuation and long-term strategic analysis.
Parsifal.Swing.CompositeThe Parsifal.Swing.Composite indicator is a module within the Parsifal Swing Suite, which includes a set of swing indicators such as:
• Parsifal Swing TrendScore
• Parsifal Swing Composite
• Parsifal Swing RSI
• Parsifal Swing Flow
Each module serves as an indicator facilitating judgment of the current swing state in the underlying market.
________________________________________
Background
Market movements typically follow a time-varying trend channel within which prices oscillate. These oscillations—or swings—within the trend are inherently tradable.
They can be approached:
• One-sidedly, aligning with the trend (generally safer), or
• Two-sidedly, aiming to profit from mean reversions as well.
Note: Mean reversions in strong trends often manifest as sideways consolidations, making one-sided trades more stable.
________________________________________
The Parsifal Swing Suite
The modules aim to provide additional insights into the swing state within a trend and offer various trigger points to assist with entry decisions.
All modules in the suite act as weak oscillators, meaning they fluctuate within a range but are not bounded like true oscillators (e.g., RSI, which is constrained between 0% and 100%).
________________________________________
The Parsifal.Swing.Composite – Specifics
This module consolidates multiple insights into price swing behavior, synthesizing them into an indicator reflecting the current swing state.
It employs layered bagging and smoothing operations based on standard price inputs (OHLC) and classical technical indicators. The module integrates several slightly different sub-modules.
Process overview:
1. Per candle/bin, sub-modules collect directional signals (up/down), with each signal casting a vote.
2. These votes are aggregated via majority counting (bagging) into a single bin vote.
3. Bin votes are then smoothed, typically with short-term EMAs, to create a sub-module vote.
4. These sub-module votes are aggregated and smoothed again to generate the final module vote.
The final vote is a score indicating the module’s assessment of the current swing state. While it fluctuates in a range, it's not a true oscillator, as most inputs are normalized via Z-scores (value divided by standard deviation over a period).
• Historically high or low values correspond to high or low quantiles, suggesting potential overbought or oversold conditions.
• The chart displays a fast (orange) and slow (white) curve against a solid background state.
• Extreme values followed by curve reversals may signal upcoming mean-reversions.
Background Value:
• Value > 0: shaded green → bullish mode
• Value < 0: shaded red → bearish mode
• The absolute value indicates confidence in the mode.
________________________________________
How to Use the Parsifal.Swing.Composite
Several change points in the indicator serve as potential entry triggers:
• Fast Trigger: change in slope of the fast curve
• Trigger: fast line crossing the slow line or change in the slow curve’s slope
• Slow Trigger: change in sign of the background value
These are illustrated in the introductory chart.
Additionally, market highs and lows aligned with swing values may act as pivot points, support, or resistance levels for evolving price processes.
________________________________________
As always, supplement this indicator with other tools and market information. While it provides valuable insights and potential entry points, it does not predict future prices. It reflects recent tendencies and should be used judiciously.
________________________________________
Extensions
All modules in the Parsifal Swing Suite are simple yet adaptable, whether used individually or in combination.
Customization options:
• Weights in EMAs for smoothing are adjustable
• Bin vote aggregation (currently via sum-of-experts) can be modified
• Alternative weighting schemes can be tested
Advanced options:
• Bagging weights may be historical, informational, or relevance-based
• Selection algorithms (e.g., ID3, C4.5, CAT) could replace the current bagging approach
• EMAs may be generalized into expectations relative to relevance-based probability
• Negative weights (akin to wavelet transforms) can be incorporated
Tolga's EMA Scalper – Buy / SellEMA line – Calculates a 20‑period Exponential Moving Average (EMA) of the chosen price series (close by default) and plots it in blue.
8‑bar range – Finds the highest and lowest closing prices over the last 8 bars and plots them as a red upper band and a green lower band, giving you a mini‑range reference.
Buy / Sell signals –
Sell: When price crosses the EMA and the current close is lower than the previous close, a red “Sell” arrow appears above the bar.
Buy: When price crosses the EMA and the current close is higher than the previous close, a green “Buy” arrow appears below the bar.
Alerts – Two alertcondition rules let TradingView fire alerts whenever a buy or sell signal is generated.
Directional Movement Index (DMI) + AlertsThis is a Study with associated visual indicators and Bullish/Bearish Alerts for Directional Movement (DMI). It consists of an Average Directional Index (ADX), Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI).
Published by J. Welles Wilder in 1978 for use with currencies and commodities which are typically more volatile than stocks and have stronger trends.
Development Notes
---------------------------
This indicator, and most of the descriptions below, were derived largely from the TradingView reference manual. Feedback and suggestions for improvement are more than welcome, as well are recommended Input settings and best practices for use.
tradingview.com/chart/?solution=43000502250
Strategy Description
---------------------------
ADX defines whether or not there is a trend present; +DI and -DI compliment the ADX by taking direction into account. An ADX above 25 indicates a strong trend, and a Bullish alert is subsequently triggered when +DI is above -DI and a Bearish alert when -DI is above +DI.
Note that the Bullish or Bearish crossover alert will only trigger if ADX is simultaneously above 25 during the crossover event. If ADX later rises to 25 and +DI is still greater than -DI, or -DI greater than +DI, then a delayed alert will not trigger by design.
Basic Use
---------------------------
Acceptable DMI values are up to the trader's interpretation and may change depending on the financial instrument being examined. Recommend not changing any default values without being first familiar with their purpose and impact on the indicator at large.
Confidence in price action and trend is higher when two or more indicators are in agreement -- therefore we recommend not using this indicator by itself to determine entry or exit trade opportunities.
Recommend also choosing 'Once Per Bar Close' when creating alerts.
Inputs
---------------------------
ADX Smoothing - the time period to be used in calculating the ADX which has a smoothing component (14 is the Default).
DI Length - the time period to be used in calculating the DI (14 is the Default).
Key Level - any trade with the ADX above the key level is a strong indicator that it is trending (23 to 25 is the suggested setting).
Sensitivity - an incremental variable to test whether the past n candles are in the same bullish or bearish state before triggering a delayed crossover alert (3 is the Default). Filter out some noise and reduces active alerts.
Show ADX Option - two visual styles are provided for user preference, a visible ADX line or a background overlay (green or red when ADX is above the key level, for bullish or bearish, and gray when below).
Color Candles - an option to transpose the bullish and bearish crossovers to the main candle bars. Can be turned off in the Style Tab by deselecting 'Bar Colors'. Dark blue is bullish, dark purple is bearish, and the black inner color is neutral. Note that the outer red and green border will still be distinguished by whether each individual candle is bearish or bullish during the specified timeframe.
Indicator Visuals
---------------------------
Bullish or Bearish plot based on DMI strategy (ADX and +/-DI values).
Visual cues are intended to improve analysis and decrease interpretation time during trading, as well as to aid in understanding the purpose of this study and how its inclusion can benefit a comprehensive trading strategy.
Trend Strength
---------------------------
To analyze trend strength, the focus should be on the ADX line and not the +DI or -DI lines. An ADX reading above 25 indicates a strong trend, while a reading below 20 indicates a weak or non-existent trend. A reading between those two values would be considered indeterminable. Though what is truly a strong trend or a weak trend depends on the financial instrument being examined; historical analysis can assist in determining appropriate values.
Bullish DI Cross
---------------------------
1. ADX must be over 25 (strong trend) (value is determined by the trader)
2. +DI cross above -DI
3. Set Stop Loss at the current day's low (any +DI cross-backs below -DI should be ignored)
4. Set trailing stop if ADX strengthens (i.e., signal rises)
Bearish DI Cross
---------------------------
1. ADX must be over 25 (strong trend) (value is determined by the trader)
2. -DI cross above +DI
3. Set Stop Loss at the current day's high (any -DI cross-backs below +DI should be ignored)
4. Set trailing stop if ADX strengthens (i.e., signal rises)
Disclaimer
---------------------------
This post and the script are not intended to provide any financial advice. Trade at your own risk.
No known repainting.
Version 1.1
-------------------------
- Added multi-timeframe resolution using PineCoders secure security function to eliminate repainting.
- Cleaned up option for selecting ADX view; and added a colored line as a choice, based on same bullish, bearish, or neutral colors as the background.
- Added exit crossover indicator to aid in an overall strategy development. This ability pairs better with my CHOP Zone Entry Strategy which relies on DMI Exits. Note that exit conditions don't employ the sensitivity variable. Green labels are for Bullish exits and red are for Bearish.
-- Exit condition is triggered if in an active Bullish or Bearish position and ADX drops below 25, Or if either the -DI crosses above +DI (for previously Bullish) or +DI crosses above -DI (for previously Bearish).
- Added reverse position determination. Triggers when a Bullish entry occurs on the same candle as a Bearish exit, or vice versa. Green labels are for Bullish reverses and red are for Bearish.
- Added selectable option to choose visible labels -- Bearish, Bullish, Both, Exits, Reverses, or All.
-- Note that a reverse label will only show if the opposing entry and exit labels are set to show, otherwise the reverse will revert to the appropriate entry or exit on the chart.
- Added alerts to account for new conditions.
-- Note that alerts for crossovers, exits, and reverses will only be triggered if the associated labels are selected to be shown (i.e., what you choose to see on the chart is what you will be alerted to).
Version 1.2
-------------------------
- Changed exit condition to be decided on by whether ADX is below 25 and on a +/-DI crossover. Versus being either or. The previous version had too many false triggers. This variety can now show multiple Bullish or Bearish alerts before an Exit condition too. I'm tempted to simply make this condition based on ADX, and not DI … thoughts? See lines 138 and 139.
- Updated the Background view to have deeper shades of colors dependent upon the ADX trend strength.
- Added an Oscillator view for the ADX and momentum computations to color the histogram by trend. DI lines are hidden.
-- If ADX is Bullish, then the oscillator is colored light green in an uptrend and dark green in a downtrend; if Bearish, then its light red in an uptrend and dark redin a downtrend; if adx is below key level, then it is light gray in a downtrend and dark grey in the uptrend.
- Added option to Hide ADX in case only the Directional lines are desired. This could be useful if you would like to have the ADX oscillator in one panel and +/-DI crossovers in another.
- Added a Columnar view for the ADX. DI lines are hidden. This view is really simple and compact, with the trend strength still easily understood. Colors are the same as for the oscillator -- the deeper the shade of green or red, then the higher the ADX trend strength level.
- Added a Trend Strength label.
ADX Trend Strength Trade (Y/N) Setup Types
0 to 10 = Barely Breathing N N/A
10 to 20 = Weak Trend Y Range/Pre-Breakout
20 to 30 = Potentially Starting to Trend Y Early Stage Trend
30 to 50 = Strong Trend Y Ride the Wave
50 to 75 = Very Strong Trend N Exhaustion
75 to 100 = Extremely Strong Trend N N/A
Version 1.3
-------------------------
Updated to Pine Script v5 to resolve errors from the deprecated v4 version.
This is a reissue of a previously published script that was hidden due to a v4 compatibility issue.
'https://www.tradingview.com/script/9OoEHrv5-Directional-Movement-Index-DMI-Alerts/'
Yosef26 - Hierarchical Decision Model//@version=5
indicator("Yosef26 - Hierarchical Decision Model", overlay=true)
// === Moving Averages ===
ema20 = ta.ema(close, 20)
ema50 = ta.ema(close, 50)
ema100 = ta.ema(close, 100)
// === Candle Components ===
priceRange = high - low
body = math.abs(close - open)
upperWick = high - math.max(close, open)
lowerWick = math.min(close, open) - low
volSMA = ta.sma(volume, 20)
// === Volume Momentum ===
volUp3 = (volume > volume ) and (volume > volume )
// === Candlestick Pattern Detection ===
bullishEngulfing = (close < open ) and (close > open) and (close > open ) and (open < close )
bearishEngulfing = (close > open ) and (close < open) and (close < open ) and (open > close )
doji = body < (priceRange * 0.1)
hammer = (lowerWick > body * 2) and (upperWick < body) and (close > open)
shootingStar = (upperWick > body * 2) and (lowerWick < body) and (close < open)
// === Multi-Timeframe Trend Detection ===
monthlyTrendUp = request.security(syminfo.tickerid, "M", close > ta.sma(close, 50))
weeklyTrendUp = request.security(syminfo.tickerid, "W", close > ta.sma(close, 50))
dailyTrendUp = close > ta.sma(close, 50)
// === Support/Resistance Zones ===
atSupport = low <= ta.lowest(low, 5)
atResistance = high >= ta.highest(high, 5)
// === Breakout Detection ===
breakoutAboveResistance = close > ta.highest(high , 5) and volume > volSMA and close > ema50
// === Confirming Candles ===
twoGreenCandles = (close > open) and (close > open )
twoRedCandles = (close < open) and (close < open )
// === Overextension Filter ===
overbought = close > ema20 * 1.05
// === Entry/Exit Conditions Tracking ===
var int lastEntryBar = na
var int lastExitBar = na
minBarsBetweenEntries = 10
canEnter = na(lastEntryBar) or (bar_index - lastEntryBar >= minBarsBetweenEntries and bar_index - lastExitBar >= minBarsBetweenEntries)
// === Continuation Filter (3 green candles with volume rise) ===
bullContinuation = (close > open) and (close > open ) and (close > open ) and (volume > volume ) and (volume > volume )
// === Entry Price Tracking ===
var float entryPrice = na
// === Weakness After Uptrend for Exit ===
recentGreenTrend = (close > open ) and (close > open ) and (close > open )
reversalCandle = shootingStar or bearishEngulfing or doji
reversalVolumeDrop = (volume < volume ) and (volume < volume )
signalWeakness = recentGreenTrend and reversalCandle and reversalVolumeDrop
// === Scoring System ===
entryScore = 0
entryScore := entryScore + (atSupport ? 3 : 0)
entryScore := entryScore + (bullishEngulfing ? 3 : 0)
entryScore := entryScore + (hammer ? 2 : 0)
entryScore := entryScore + (volUp3 ? 2 : 0)
entryScore := entryScore + ((volume > volSMA) ? 2 : 0)
entryScore := entryScore + ((close > ema20 or close > ema50) ? 1 : 0)
entryScore := entryScore + ((close > close ) ? 1 : 0)
entryScore := entryScore + (breakoutAboveResistance ? 2 : 0)
entryScore := entryScore + (twoGreenCandles ? 1 : 0)
entryScore := entryScore - (overbought ? 2 : 0)
entryScore := entryScore + ((monthlyTrendUp and weeklyTrendUp and dailyTrendUp) ? 2 : 0)
exitScore = 0
exitScore := exitScore + (atResistance ? 3 : 0)
exitScore := exitScore + (bearishEngulfing ? 3 : 0)
exitScore := exitScore + (shootingStar ? 2 : 0)
exitScore := exitScore + (doji ? 1 : 0)
exitScore := exitScore + ((volume < volSMA * 1.1) ? 1 : 0)
exitScore := exitScore + ((close < ema50) ? 1 : 0)
exitScore := exitScore + ((close < close ) ? 1 : 0)
exitScore := exitScore + (twoRedCandles ? 1 : 0)
exitScore := exitScore + ((not dailyTrendUp and not weeklyTrendUp) ? 2 : 0)
exitScore := exitScore + (signalWeakness ? 2 : 0)
// === Profit Target Exit Condition ===
profitTargetHit = not na(entryPrice) and close >= entryPrice * 1.09
profitZoneSignal = (atResistance or shootingStar or bearishEngulfing) and volume > volSMA
isNewHigh = high >= ta.highest(high, 50)
exitAtProfitTarget = profitTargetHit and profitZoneSignal and not isNewHigh
// === Final Decision Thresholds ===
entryCond1 = entryScore >= 8
entryCond2 = entryScore >= 6 and breakoutAboveResistance and volume > volSMA and close > ema50
entryCond3 = monthlyTrendUp and weeklyTrendUp and (close > ema50 or volume > volSMA or twoGreenCandles)
entryCond = (entryCond1 or entryCond2 or entryCond3) and canEnter
exitCondRaw = (exitScore >= 7)
exitCond = (exitCondRaw and not bullContinuation) or exitAtProfitTarget
// === Position Tracking ===
var bool inPosition = false
var int barsInPosition = 0
var label entryLabel = na
var label exitLabel = na
if entryCond and not inPosition
inPosition := true
barsInPosition := 0
lastEntryBar := bar_index
entryPrice := close
entryLabel := label.new(bar_index, close, "Entry @" + str.tostring(close), style=label.style_label_up, color=color.green, textcolor=color.white)
if inPosition
barsInPosition += 1
if exitCond and inPosition
inPosition := false
barsInPosition := 0
lastExitBar := bar_index
exitLabel := label.new(bar_index, close, "Exit @" + str.tostring(close), style=label.style_label_down, color=color.red, textcolor=color.white)
// === Alerts ===
alertcondition(entryCond, title="Entry Alert", message="Yosef26: Entry Signal (Hierarchical Model)")
alertcondition(exitCond, title="Exit Alert", message="Yosef26: Exit Signal (Hierarchical Model)")
EMA Channel + Kangaroo Tail + Volume This all-in-one indicator combines multiple proven trading concepts into one tool:
🔸 EMA-based Price Channel (with Standard Deviation): helps identify overbought/oversold zones and channel reversals.
🔸 Kangaroo Tail Patterns: a price action setup signaling potential reversals based on wick/close structure.
🔸 Volume Confirmation Filter: filters signals when volume exceeds the average by 20% (1.2×), reducing noise.
🔸 Unconfirmed KT Highlights: shows potential Kangaroo Tails even if volume is not confirmed, so no setup is missed.
🔸 Volume Info Labels: display current and average volume on chart (toggleable).
🧠 Built with ChatGPT based on real-world trader feedback, suitable for both the Moscow Exchange and crypto markets.
✅ Best suited for:
Futures, stocks, crypto.
Timeframes: 15m – 1h, though it works across all timeframes.
🔓 Free to use & modify. If you like it — give it a star or share feedback!
Hourly FVG/iFVG ZoneMacros Price Delivery
Note: Determine short time bias and enter for a 30 40 handles runs to the minor liquidity or FVG
Breakout Swing High LowThis open-source indicator identifies swing high and swing low breakouts, providing clear visual signals for potential trend entries. It is designed for traders who use price action to spot breakout opportunities in trending markets.
How It Works
Swing Detection: The indicator uses a user-defined lookback period (default: 4 candles) to identify swing highs (peaks) and swing lows (troughs). A swing high is confirmed when a candle's high is higher than the surrounding candles, and a swing low is confirmed when a candle's low is lower.
Breakout Signals: A green triangle below the candle signals a breakout above the most recent swing high, indicating a potential buy opportunity. A red triangle above the candle signals a breakout below the most recent swing low, indicating a potential sell opportunity. Each swing level triggers only one breakout signal to avoid clutter.
Visualization: Swing high levels are drawn as green dashed lines, and swing low levels as red dashed lines, extending 15 candles for clarity. Breakout signals are marked with small triangles.
How to Use
Apply the Indicator: Add the indicator to your TradingView chart.
Adjust Lookback: Set the "Lookback Candles" input (default: 4) to control the sensitivity of swing detection. Smaller values detect shorter-term swings, while larger values identify more significant levels.
Interpret Signals:
Green triangle (below candle): Consider a buy opportunity when price breaks above a swing high.
Red triangle (above candle): Consider a sell opportunity when price breaks below a swing low.
Combine with Other Tools: Use in conjunction with trend indicators (e.g., 50-period EMA) or support/resistance levels to filter signals in trending markets.
Timeframes: Works best on higher timeframes (e.g., 1H, 4H) in trending markets to avoid false breakouts in sideways conditions.
Model+ - Trendlines & S/R//@version=5
indicator("Model+ - Trendlines & S/R", overlay=true)
// === Parameters ===
length = input.int(20, title="Pivot Length")
lookback = input.int(252, title="Lookback Period (trading days ~ 1 year)", minval=1, maxval=5000)
minTouches = input.int(2, title="Minimum Touches for Valid S/R")
maxLines = input.int(15, title="Max Lines")
tolerance = input.float(1.5, title="Price Tolerance for S/R Match")
// === Arrays to Store Pivot Points ===
var line supportLines = array.new_line()
var line resistanceLines = array.new_line()
var float supportLevels = array.new_float()
var float resistanceLevels = array.new_float()
// === Function to Check Pivot High ===
isPivotHigh(src, len, idx) =>
idxValid = idx - len >= 0 and idx + len < bar_index and idx < 5000
result = true
if idxValid
for j = 1 to len
result := result and src > src and src > src
else
result := false
result
// === Function to Check Pivot Low ===
isPivotLow(src, len, idx) =>
idxValid = idx - len >= 0 and idx + len < bar_index and idx < 5000
result = true
if idxValid
for j = 1 to len
result := result and src < src and src < src
else
result := false
result
// === Helper Function: Count Nearby Pivots ===
countTouches(src, level, lookbackBars) =>
count = 0
maxBack = math.min(lookbackBars, bar_index)
for j = 0 to maxBack - 1
if math.abs(src - level) <= tolerance
count := count + 1
count
// === Loop Over Past Bars to Find S/R Levels ===
startIdx = math.max(length, bar_index - math.min(lookback, 4500))
endIdx = bar_index - length
if bar_index > startIdx + length
for i = startIdx to endIdx by 1
if isPivotHigh(high, length, i)
lvl = high
touches = countTouches(high, lvl, lookback)
if touches >= minTouches
l = line.new(x1=i, y1=lvl, x2=bar_index, y2=lvl, color=color.red, width=1)
array.push(resistanceLines, l)
array.push(resistanceLevels, lvl)
if isPivotLow(low, length, i)
lvl = low
touches = countTouches(low, lvl, lookback)
if touches >= minTouches
l = line.new(x1=i, y1=lvl, x2=bar_index, y2=lvl, color=color.green, width=1)
array.push(supportLines, l)
array.push(supportLevels, lvl)
// === Clean Up Old Lines ===
while array.size(resistanceLines) > maxLines
line.delete(array.shift(resistanceLines))
array.shift(resistanceLevels)
while array.size(supportLines) > maxLines
line.delete(array.shift(supportLines))
array.shift(supportLevels)
ETH to RTH Gap DetectorETH to RTH Gap Detector
What It Does
This indicator identifies and tracks custom-defined gaps that form between Extended Trading Hours (ETH) and Regular Trading Hours (RTH). Unlike traditional gap definitions, this indicator uses a specialized approach - defining up gaps as the space between previous session close high to current session initial balance low, and down gaps as the space from previous session close low to current session initial balance high. Each detected gap is monitored until it's touched by price.
Key Features
Detects custom-defined ETH-RTH gaps based on previous session close and current session initial balance
Automatically identifies both up gaps and down gaps
Visualizes gaps with color-coded boxes that extend until touched
Tracks when gaps are filled (when price touches the gap area)
Offers multiple display options for filled gaps (color change, border only, pattern, or delete)
Provides comprehensive statistics including total gaps, up/down ratio, and touched gap percentage
Includes customizable alert system for real-time gap filling notifications
Features toggle options for dashboard visibility and weekend sessions
Uses time-based box coordinates to avoid common TradingView drawing limitations
How To Use It
Configure Session Times : Set your preferred RTH hours and timezone (default 9:30-16:00 America/New York)
Set Initial Balance Period : Adjust the initial balance period (default 30 minutes) for gap detection sensitivity
Monitor Gap Formation : The indicator automatically detects gaps between the previous session close and current session IB
Watch For Gap Fills : Gaps change appearance or disappear when price touches them, based on your selected style
Check Statistics : View the dashboard to see total gaps, directional distribution, and touched percentage
Set Alerts : Enable alerts to receive notifications when gaps are filled
Settings Guide
RTH Settings : Configure the start/end times and timezone for Regular Trading Hours
Initial Balance Period : Controls how many minutes after market open to calculate the initial balance (1-240 minutes)
Display Settings : Toggle gap boxes, extension behavior, and dashboard visibility
Filled Box Style : Choose how filled gaps appear - Filled (color change), Border Only, Pattern, or Delete
Color Settings : Customize colors for up gaps, down gaps, and filled gaps
Alert Settings : Control when and how alerts are triggered for gap fills
Weekend Session Toggle : Option to include or exclude weekend trading sessions
Technical Details
The indicator uses time-based coordinates (xloc.bar_time) to prevent "bar index too far" errors
Gap boxes are intelligently limited to avoid TradingView's 500-bar drawing limitation
Box creation and fill detection use proper range intersection logic for accuracy
Session detection is handled using TradingView's session string format for reliability
Initial balance detection is precisely calculated based on time difference
Statistics calculations exclude zero-division scenarios for stability
This indicator works best on futures markets with extended and regular trading hours, especially indices (ES, NQ, RTY) and commodities. Performs well on timeframes from 1-minute to 1-hour.
What Makes It Different
Most gap indicators focus on traditional open-to-previous-close gaps, but this tool offers a specialized definition more relevant to ETH/RTH transitions. By using the initial balance period to define gap edges, it captures meaningful price discrepancies that often provide trading opportunities. The indicator combines sophisticated gap detection logic with clean visualization and comprehensive tracking statistics. The customizable fill styles and integrated alert system make it practical for both chart analysis and active trading scenarios.
Close Price - EMA Distance (10, 21, 50)this is script to show differnce between price and three moving average i.e 10, 21, and 50on closing basis
SMA + Heiken Ashi Signals with BB Width Filter (Toggle + Label)🎯 Purpose
This script gives Buy, Sell, Exit Buy, and Exit Sell signals based on:
SMA crossovers
Heiken Ashi candle trend reversal
Bollinger Band Width filter to avoid trades in sideways markets
It’s designed for clean signal-only trading, with no actual order execution — ideal for discretionary or alert-based traders.
🧠 Logic Explained
✅ 1. Entry Signals (Buy/Sell)
Based on a fast SMA crossing a slow SMA
→ Uses 1-minute data (via request.security) for faster signal generation even on higher timeframes.
Only triggers if:
✅ Price is trending in the direction of the trade (above or below a 50-period SMA)
✅ Bollinger Band width is wide enough, indicating a strong trend
✅ You're not already in that direction (prevents duplicate signals)
❌ 2. Exit Signals (Exit Buy / Exit Sell)
Based on 3-minute Heiken Ashi candles
Exit Buy when: Heiken Ashi candle turns red (bearish)
Exit Sell when: Heiken Ashi candle turns green (bullish)
This smooths out the exit and prevents premature exits from short-term noise.
📊 3. Bollinger Band Width Filter
Measures distance between BB upper & lower bands
Normalized by dividing by the midline (basis) → bbWidth
If bbWidth < minWidth, signals are blocked to avoid consolidating markets
You can toggle this filter on/off and adjust the minWidth input.
🔁 4. Trade State Tracking
Uses two var bool flags:
inLong: True if in a long position
inShort: True if in a short position
Prevents the script from repeating signals until an exit occurs
Livelli di Sconto da All Time HighInspired by the philosophy of the discount buy, this indicator give the discount levels from all time. In the last times, in which there's a massive amount money flowing in the market due to massive use of etf. Ther usual metrics to buy assets are difficult to use. In my opinion, after a strong correction, the prices usualy goes up again, except for some strong macro event.
So, I hope this indicator could hepl, for some trending growing market, to help to take decisions for extra buy in pac/dca plan.
BB2/2.5ハイライトIndicator Name: **BB2/2.5 Highlight**
1. **Introduction**
BB2/2.5 Highlight displays two Bollinger Bands—inner at ±2 σ and outer at ±2.5 σ—while hiding the middle band. The space between the two bands is shaded gray to help you spot strong momentum or unusually large price movements at a glance.
2. **Key Features**
* **Double-Band Display**: Plots inner band (±2 σ) and outer band (±2.5 σ) simultaneously.
* **Zone Highlight**: Shades the area between the two bands to emphasize high-momentum zones.
* **Full Customization**: Adjust period, deviations, line colors, line transparency, and shading color directly via inputs.
3. **Parameters**
* **Length** (Period)
– The number of bars used to calculate the moving average. Default: 20
* **Std Dev 1** (Inner Band Deviation)
– Multiplier for standard deviation of the inner band. Default: 2.0
* **Std Dev 2** (Outer Band Deviation)
– Multiplier for standard deviation of the outer band. Default: 2.5
* **Color Band 1** (Inner Band Color)
– Color of the ±Std Dev 1 lines. Default: Blue
* **Color Band 2** (Outer Band Color)
– Color of the ±Std Dev 2 lines. Default: Orange
* **Line Transparency**
– Transparency of both band lines, 0 (opaque) to 100 (invisible). Default: 30
* **Shading Color**
– Color and transparency of the shaded area between bands. Default: Gray at 85% opacity
4. **How to Use & Interpretation**
* **Break above inner band (±2 σ)**
Indicates accelerating trend strength or strong momentum.
* **Break above outer band (±2.5 σ)**
Signals an extreme move—potential overbought/oversold condition and possible reversal points.
* **Shaded Zone (±2 σ to ±2.5 σ)**
Visually marks the range where price is exhibiting particularly strong momentum.
5. **Customization Examples**
* **Change deviations to ±1.5 / ±3.0**
Set Std Dev 1 = 1.5, Std Dev 2 = 3.0
* **Use green/red band colors**
Set Color Band 1 = #00FF00, Color Band 2 = #FF0000
* **Increase transparency to 50%**
Set Line Transparency = 50
* **Light-blue shading**
Set Shading Color = #ADD8E6 at 85% opacity
6. **Notes & Warnings**
* Bollinger Bands are based on historical volatility; they do not predict future price action.
* Always combine with other technical tools or fundamental analysis for confirmation.
* Behavior may vary across timeframes and instruments—backtest and paper-trade before going live.
7. **Conclusion**
BB2/2.5 Highlight makes “strong momentum” zones immediately visible by combining a ±2 σ/±2.5 σ double‐band with a shaded area. All inputs are adjustable, so tailor the settings to fit your trading style and use the indicator to time entries and exits more effectively.
Happy Trading!
Asian Session Standard DeviationA configurable standard deviation indicator for showing the standard deviation from specific session times. Typically useful for measuring Asian session as setup for later sessions.
Money Flow based probabilityMoney Flow based probability
This indicator provides a comprehensive correlation and momentum analysis between your main asset and up to three selected correlated assets. It combines correlation, trend, momentum, and overbought/oversold signals into a single, easy-to-read table directly on your chart.
Correlated Asset Selection :
You can select up to three correlated assets (e.g., indices, currencies, bonds) to compare with your main chart symbol. Each asset can be toggled on or off.
Correlation Calculation :
The indicator uses the native Pine Script ta.correlation function to measure the statistical relationship between the closing prices of your asset and each selected pair over a user-defined period.
Technical Analysis Integration :
For each asset (including the main one), the indicator calculates:
Trend direction using EMA (Exponential Moving Average) – optional
Momentum using MACD – optional
Overbought/oversold status using RSI – optional
Probability Scoring :
A weighted scoring system combines correlation, trend, MACD, RSI, and trend exhaustion signals to produce buy and sell probabilities for the main asset.
Visual Table Output :
A customizable table is displayed on the chart, showing:
Asset name
Correlation (as a percentage, -100% to +100%)
Trend (Bullish/Bearish)
MACD status (Bullish/Bearish)
RSI value and status
Buy/Sell probability (with fixed-width formatting for stability)
User Customization :
You can adjust:
Table size, color, and position
Correlation period
EMA, MACD, and RSI parameters
Which assets to display
This indicator is ideal for traders who want to quickly assess the influence of major correlated markets and technical signals on their trading instrument, all in a single glance.
---
Example: Correlation Calculation
corrCurrentAsset1 = ta.correlation(close, asset1Data, correlationPeriod)
Example: Table Output (Buy/Sell %)
buyStr = f_formatPercent(buyProbability) + "%"
sellStr = f_formatPercent(sellProbability) + "%"
cellStr = buyStr + " / " + sellStr