OPEN-SOURCE SCRIPT
تم تحديثه S/R Confluence Engine [AvantCoin]

S/R Confluence Engine
─────────────────────────────────────────────────────────────────────────────
This indicator takes a different mechanism:
Every level is scored across three independent factors, and only levels that pass a minimum confluence threshold are promoted as tradeable.
HOW THE SCORING WORKS?
─────────────────────────────────────────────────────────────────────────────
Each detected swing level starts with a base score of 1. Up to 3 additional
points are added based on the following conditions:
+1 The level falls inside a High Volume Node (HVN)
— meaning significant volume was traded at or near this price.
Price tends to slow down and react at levels where market participants
have a large amount of open positions anchored.
+1 The level originates from the Higher Timeframe (HTF)
— a daily swing high visible on a 5-minute chart carries more weight
than a local 5-minute pivot. HTF structure reflects institutional
positioning, not just retail order flow.
+1 The level is within a configurable tolerance of a psychological level
— round numbers and half-levels attract resting orders from both
discretionary and algorithmic participants. Confluence with a psych
level adds a fourth layer of confirmation.
Final score interpretation:
Score 1 → Plain swing (structural only, no confluence)
Score 2 → ★★ GOOD (one additional factor confirmed)
Score 3+ → ★★★ STRONG (two or more factors confirmed)
Labels are drawn directly on the chart at each qualifying level so you can
assess confluence at a glance without manually cross-referencing indicators.
DETECTION METHODS
─────────────────────────────────────────────────────────────────────────────
Swing Structure (Current TF)
Pivot highs and lows are detected using a configurable lookback length.
Resistance levels are drawn in red, support in teal.
Swing Structure (Higher TF)
The same pivot detection runs on a user-selected higher timeframe
(default: Daily). HTF lines are drawn thicker and solid to visually
separate them from current-TF swings. Their visibility is controlled
independently from the score filter.
Volume Profile Nodes
The lookback range is divided into price buckets and volume is accumulated
per bucket. Buckets exceeding the HVN threshold percentile are drawn as
gold highlight zones. Optionally, Low Volume Nodes (price gaps) can also
be displayed.
Psychological Levels
Round numbers are auto-detected based on the magnitude of the visible
price range — the indicator adapts whether you are trading a $0.001 token
or a $50,000 asset. Half-levels can be enabled optionally.
VISIBILITY CONTROLS
─────────────────────────────────────────────────────────────────────────────
All four level types have independent show/hide toggles:
☑ Show Higher Timeframe Swings — HTF structure lines
☑ Show Good Levels ★★ — score 2 levels only
☑ Show Strong Levels ★★★ — score 3+ levels only
☑ Show Psychological Levels — round / half numbers
Turning off Good and Strong levels leaves only raw unconfirmed swings
visible, which is useful for studying structure without score bias.
FULL SETTINGS REFERENCE
─────────────────────────────────────────────────────────────────────────────
⚙️ Swing Structure
Swing Lookback Length Bars required on each side to confirm a pivot (3–50)
Show Higher Timeframe Swings Toggle HTF lines independently
Show Good Levels ★★ Toggle score-2 levels
Show Strong Levels ★★★ Toggle score-3+ levels
HTF Resolution Timeframe for the higher-TF pivot scan
Swing Line Width Line thickness (1–4)
Resistance / Support Colors Individual color pickers for all four line types
Extend Lines to Right Project lines forward on the chart
Max Swing Levels to Show Cap on how many pivots are kept per type (1–20)
📊 Volume Nodes
Show Volume Nodes Toggle HVN highlight boxes
Volume Lookback (bars) How many bars back to analyze (20–500)
Price Buckets Number of buckets to divide the range into (5–40)
HVN Threshold Percentile cutoff for qualifying as an HVN (50–99%)
Show Low Volume Nodes Toggle LVN gap zones
Node Box Width Width of the drawn boxes in bars (1–10)
🎯 Confluence Scoring
Show Confluence Labels Toggle ★★ / ★★★ labels on chart
Confluence Zone Distance tolerance for psych level proximity (0.1–2%)
Label Size tiny / small / normal / large
🧠 Psychological Levels
Show Psychological Levels Toggle round/half number lines
Round Numbers Enable major round number detection
Half Numbers Enable 0.5 level detection
Line Style solid / dashed / dotted
🎨 Display
Show Legend Toggle the on-chart legend table
Swing Line Style solid / dashed / dotted for current-TF swings
NOTES
─────────────────────────────────────────────────────────────────────────────
- Volume Nodes and score labels are redrawn on the last bar only to keep
performance efficient on long histories.
- Swing candidates are collected on every bar into persistent arrays, so
no pivots are missed regardless of when the indicator is loaded.
- The scoring system is additive and transparent — each contributing factor
is visible in the label type prefix (R, S, HTF·R, HTF·S), so you always
know which timeframe and direction a level belongs to.
- HTF line visibility is intentionally decoupled from the score filter.
A daily swing high will always show when HTF display is enabled, even if
its score does not reach the GOOD or STRONG threshold.
─────────────────────────────────────────────────────────────────────────────
This indicator takes a different mechanism:
Every level is scored across three independent factors, and only levels that pass a minimum confluence threshold are promoted as tradeable.
HOW THE SCORING WORKS?
─────────────────────────────────────────────────────────────────────────────
Each detected swing level starts with a base score of 1. Up to 3 additional
points are added based on the following conditions:
+1 The level falls inside a High Volume Node (HVN)
— meaning significant volume was traded at or near this price.
Price tends to slow down and react at levels where market participants
have a large amount of open positions anchored.
+1 The level originates from the Higher Timeframe (HTF)
— a daily swing high visible on a 5-minute chart carries more weight
than a local 5-minute pivot. HTF structure reflects institutional
positioning, not just retail order flow.
+1 The level is within a configurable tolerance of a psychological level
— round numbers and half-levels attract resting orders from both
discretionary and algorithmic participants. Confluence with a psych
level adds a fourth layer of confirmation.
Final score interpretation:
Score 1 → Plain swing (structural only, no confluence)
Score 2 → ★★ GOOD (one additional factor confirmed)
Score 3+ → ★★★ STRONG (two or more factors confirmed)
Labels are drawn directly on the chart at each qualifying level so you can
assess confluence at a glance without manually cross-referencing indicators.
DETECTION METHODS
─────────────────────────────────────────────────────────────────────────────
Swing Structure (Current TF)
Pivot highs and lows are detected using a configurable lookback length.
Resistance levels are drawn in red, support in teal.
Swing Structure (Higher TF)
The same pivot detection runs on a user-selected higher timeframe
(default: Daily). HTF lines are drawn thicker and solid to visually
separate them from current-TF swings. Their visibility is controlled
independently from the score filter.
Volume Profile Nodes
The lookback range is divided into price buckets and volume is accumulated
per bucket. Buckets exceeding the HVN threshold percentile are drawn as
gold highlight zones. Optionally, Low Volume Nodes (price gaps) can also
be displayed.
Psychological Levels
Round numbers are auto-detected based on the magnitude of the visible
price range — the indicator adapts whether you are trading a $0.001 token
or a $50,000 asset. Half-levels can be enabled optionally.
VISIBILITY CONTROLS
─────────────────────────────────────────────────────────────────────────────
All four level types have independent show/hide toggles:
☑ Show Higher Timeframe Swings — HTF structure lines
☑ Show Good Levels ★★ — score 2 levels only
☑ Show Strong Levels ★★★ — score 3+ levels only
☑ Show Psychological Levels — round / half numbers
Turning off Good and Strong levels leaves only raw unconfirmed swings
visible, which is useful for studying structure without score bias.
FULL SETTINGS REFERENCE
─────────────────────────────────────────────────────────────────────────────
⚙️ Swing Structure
Swing Lookback Length Bars required on each side to confirm a pivot (3–50)
Show Higher Timeframe Swings Toggle HTF lines independently
Show Good Levels ★★ Toggle score-2 levels
Show Strong Levels ★★★ Toggle score-3+ levels
HTF Resolution Timeframe for the higher-TF pivot scan
Swing Line Width Line thickness (1–4)
Resistance / Support Colors Individual color pickers for all four line types
Extend Lines to Right Project lines forward on the chart
Max Swing Levels to Show Cap on how many pivots are kept per type (1–20)
📊 Volume Nodes
Show Volume Nodes Toggle HVN highlight boxes
Volume Lookback (bars) How many bars back to analyze (20–500)
Price Buckets Number of buckets to divide the range into (5–40)
HVN Threshold Percentile cutoff for qualifying as an HVN (50–99%)
Show Low Volume Nodes Toggle LVN gap zones
Node Box Width Width of the drawn boxes in bars (1–10)
🎯 Confluence Scoring
Show Confluence Labels Toggle ★★ / ★★★ labels on chart
Confluence Zone Distance tolerance for psych level proximity (0.1–2%)
Label Size tiny / small / normal / large
🧠 Psychological Levels
Show Psychological Levels Toggle round/half number lines
Round Numbers Enable major round number detection
Half Numbers Enable 0.5 level detection
Line Style solid / dashed / dotted
🎨 Display
Show Legend Toggle the on-chart legend table
Swing Line Style solid / dashed / dotted for current-TF swings
NOTES
─────────────────────────────────────────────────────────────────────────────
- Volume Nodes and score labels are redrawn on the last bar only to keep
performance efficient on long histories.
- Swing candidates are collected on every bar into persistent arrays, so
no pivots are missed regardless of when the indicator is loaded.
- The scoring system is additive and transparent — each contributing factor
is visible in the label type prefix (R, S, HTF·R, HTF·S), so you always
know which timeframe and direction a level belongs to.
- HTF line visibility is intentionally decoupled from the score filter.
A daily swing high will always show when HTF display is enabled, even if
its score does not reach the GOOD or STRONG threshold.
ملاحظات الأخبار
S/R Confluence Engine─────────────────────────────────────────────────────────────────────────────
This indicator takes a different mechanism:
Every level is scored across three independent factors, and only levels that pass a minimum confluence threshold are promoted as tradeable.
HOW THE SCORING WORKS?
─────────────────────────────────────────────────────────────────────────────
Each detected swing level starts with a base score of 1. Up to 3 additional
points are added based on the following conditions:
+1 The level falls inside a High Volume Node (HVN)
— meaning significant volume was traded at or near this price.
Price tends to slow down and react at levels where market participants
have a large amount of open positions anchored.
+1 The level originates from the Higher Timeframe (HTF)
— a daily swing high visible on a 5-minute chart carries more weight
than a local 5-minute pivot. HTF structure reflects institutional
positioning, not just retail order flow.
+1 The level is within a configurable tolerance of a psychological level
— round numbers and half-levels attract resting orders from both
discretionary and algorithmic participants. Confluence with a psych
level adds a fourth layer of confirmation.
Final score interpretation:
Score 1 → Plain swing (structural only, no confluence)
Score 2 → ★★ GOOD (one additional factor confirmed)
Score 3+ → ★★★ STRONG (two or more factors confirmed)
Labels are drawn directly on the chart at each qualifying level so you can
assess confluence at a glance without manually cross-referencing indicators.
DETECTION METHODS
─────────────────────────────────────────────────────────────────────────────
Swing Structure (Current TF)
Pivot highs and lows are detected using a configurable lookback length.
Resistance levels are drawn in red, support in teal.
Swing Structure (Higher TF)
The same pivot detection runs on a user-selected higher timeframe
(default: Daily). HTF lines are drawn thicker and solid to visually
separate them from current-TF swings. Their visibility is controlled
independently from the score filter.
Volume Profile Nodes
The lookback range is divided into price buckets and volume is accumulated
per bucket. Buckets exceeding the HVN threshold percentile are drawn as
gold highlight zones. Optionally, Low Volume Nodes (price gaps) can also
be displayed.
Psychological Levels
Round numbers are auto-detected based on the magnitude of the visible
price range — the indicator adapts whether you are trading a $0.001 token
or a $50,000 asset. Half-levels can be enabled optionally.
VISIBILITY CONTROLS
─────────────────────────────────────────────────────────────────────────────
All four level types have independent show/hide toggles:
☑ Show Higher Timeframe Swings — HTF structure lines
☑ Show Good Levels ★★ — score 2 levels only
☑ Show Strong Levels ★★★ — score 3+ levels only
☑ Show Psychological Levels — round / half numbers
Turning off Good and Strong levels leaves only raw unconfirmed swings
visible, which is useful for studying structure without score bias.
FULL SETTINGS REFERENCE
─────────────────────────────────────────────────────────────────────────────
⚙️ Swing Structure
Swing Lookback Length Bars required on each side to confirm a pivot (3–50)
Show Higher Timeframe Swings Toggle HTF lines independently
Show Good Levels ★★ Toggle score-2 levels
Show Strong Levels ★★★ Toggle score-3+ levels
HTF Resolution Timeframe for the higher-TF pivot scan
Swing Line Width Line thickness (1–4)
Resistance / Support Colors Individual color pickers for all four line types
Extend Lines to Right Project lines forward on the chart
Max Swing Levels to Show Cap on how many pivots are kept per type (1–20)
📊 Volume Nodes
Show Volume Nodes Toggle HVN highlight boxes
Volume Lookback (bars) How many bars back to analyze (20–500)
Price Buckets Number of buckets to divide the range into (5–40)
HVN Threshold Percentile cutoff for qualifying as an HVN (50–99%)
Show Low Volume Nodes Toggle LVN gap zones
Node Box Width Width of the drawn boxes in bars (1–10)
🎯 Confluence Scoring
Show Confluence Labels Toggle ★★ / ★★★ labels on chart
Confluence Zone Distance tolerance for psych level proximity (0.1–2%)
Label Size tiny / small / normal / large
🧠 Psychological Levels
Show Psychological Levels Toggle round/half number lines
Round Numbers Enable major round number detection
Half Numbers Enable 0.5 level detection
Line Style solid / dashed / dotted
🎨 Display
Show Legend Toggle the on-chart legend table
Swing Line Style solid / dashed / dotted for current-TF swings
NOTES
─────────────────────────────────────────────────────────────────────────────
- Volume Nodes and score labels are redrawn on the last bar only to keep
performance efficient on long histories.
- Swing candidates are collected on every bar into persistent arrays, so
no pivots are missed regardless of when the indicator is loaded.
- The scoring system is additive and transparent — each contributing factor
is visible in the label type prefix (R, S, HTF·R, HTF·S), so you always
know which timeframe and direction a level belongs to.
- HTF line visibility is intentionally decoupled from the score filter.
A daily swing high will always show when HTF display is enabled, even if
its score does not reach the GOOD or STRONG threshold.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.