OPEN-SOURCE SCRIPT
Institutional Inducement Engine [algotim]

Overview
Institutional Inducement Engine is a market-structure analysis tool built around a specific sequence: identify a major swing level, locate a smaller swing positioned between current price and that major level, require structural confirmation, and then monitor the confirmed level for a subsequent liquidity interaction.
The purpose of this workflow is to distinguish a potentially meaningful internal liquidity level from an ordinary minor swing. Instead of treating every internal pivot as an inducement, the script maintains a candidate state and only promotes that candidate after the required structural condition has occurred.
The resulting chart shows the relationship between external liquidity, confirmed internal inducement levels, subsequent sweeps, and the opposing external liquidity level.
Problem Statement
A conventional swing-point indicator treats major and minor pivots largely as the same type of information. This can make it difficult to distinguish a meaningful internal level from ordinary market noise.
This script uses two different structural scales:
* External swings represent the larger liquidity reference.
* Internal swings represent smaller candidate levels.
* The distance between them is optionally evaluated relative to ATR.
* A candidate can remain pending until a subsequent structure break confirms it.
This creates a sequential workflow rather than simply plotting every detected pivot.
Methodology
1. External Structure
The script detects major swing highs and lows using a configurable external pivot length.
A confirmed external high becomes the current bearish-side liquidity reference, while a confirmed external low becomes the current bullish-side liquidity reference.
Only the most recently detected external levels are maintained as the active structural references.
2. Internal Candidate Detection
A separate, shorter pivot length is used to detect internal highs and lows.
For a bullish inducement candidate, the internal low must be above the most recent external low.
For a bearish inducement candidate, the internal high must be below the most recent external high.
The separation between the internal candidate and its corresponding external level can also be filtered using ATR. With the ATR filter enabled, the minimum separation is:
Distance >= ATR x Minimum Distance Multiplier
This prevents very small differences between internal and external pivots from automatically qualifying as separate structural levels.
3. Pending Candidate State
A qualifying internal pivot is not immediately treated as a confirmed inducement.
Instead, the script stores its price and bar position as a pending candidate.
This distinction is important because the indicator is evaluating a sequence rather than a single candle or pivot:
Internal swing -> candidate -> structural confirmation -> confirmed inducement.
4. Break of Structure Confirmation
When BOS confirmation is enabled, the script looks for an internal structure point formed after the candidate.
For a bullish candidate, a subsequent internal high is tracked and a close crossing above that level confirms the bullish inducement.
For a bearish candidate, a subsequent internal low is tracked and a close crossing below that level confirms the bearish inducement.
Once confirmed, the pending candidate is transferred into the confirmed inducement state.
This prevents the initial internal pivot from being presented as a completed signal before the required structural sequence has occurred.
5. Inducement Zone
After confirmation, the inducement price is converted into a chart zone.
The zone height is derived from ATR rather than using a fixed number of ticks, allowing its visual size to scale with the instrument's current volatility.
The zone is then extended for the user-defined number of bars.
6. Liquidity Sweep Tracking
The script separately monitors the active external levels and confirmed inducement levels for price sweeps.
An external low is considered swept when price trades below that level and subsequently closes back above it.
An external high is considered swept when price trades above that level and subsequently closes back below it.
Confirmed inducement levels are also monitored. Once price trades through a confirmed inducement level, its sweep state is recorded so the same level is not repeatedly reported as a new sweep.
7. Liquidity Path Projection
After an inducement is confirmed, the script can draw a visual path from that inducement toward the opposing external liquidity reference.
For a confirmed bullish inducement, the path is drawn toward the current external high.
For a confirmed bearish inducement, the path is drawn toward the current external low.
This line is a structural visualization of the relationship between the two detected liquidity references. It is not a forecast or guarantee that price will reach the projected level.
Signal Workflow
The complete workflow is:
1. Detect a major external swing high or low.
2. Store that swing as the current external liquidity reference.
3. Detect smaller internal swings.
4. Test whether the internal swing is positioned between price structure and the corresponding external level.
5. Apply the optional ATR separation filter.
6. Store a qualifying internal swing as a pending candidate.
7. Identify a subsequent internal structure point.
8. Wait for the required break of that structure.
9. Promote the pending candidate to a confirmed inducement.
10. Draw the inducement zone.
11. Monitor the confirmed inducement and external liquidity for sweeps.
12. Optionally project the structural path toward the opposing external liquidity level.
This sequence is the central analytical framework of the indicator.
Why This Indicator Is Different
A standard pivot indicator answers a relatively simple question: "Where are the recent swing highs and lows?"
This script attempts to answer a different question: "Which smaller swing has a defined structural relationship with a larger liquidity reference, and has that relationship subsequently received structural confirmation?"
The distinction comes from the interaction of the components rather than from simply placing several indicators on the same chart.
The external and internal pivot systems operate at different structural scales. The ATR filter controls the minimum separation between those scales. The pending-state mechanism then prevents a candidate from becoming a confirmed inducement until the required structural event occurs.
After confirmation, the same state is carried forward into the sweep-tracking and opposing-liquidity visualization stages.
Consequently, the output represents a sequence of structural conditions rather than an independent collection of pivot, ATR and sweep markers.
Inputs
Structure
**External Swing Length**
Controls the pivot length used for major external swing detection.
**Internal Swing Length**
Controls the shorter pivot length used for internal candidate detection.
Filters
**Enable ATR Noise Filter**
Enables or disables volatility-adjusted separation between internal and external swings.
**ATR Length**
Controls the ATR calculation used by the distance filter and inducement-zone sizing.
**Min Distance (x ATR)**
Sets the minimum separation between the internal candidate and corresponding external level when the ATR filter is enabled.
**Require BOS Confirmation**
When enabled, an internal candidate must receive the specified structural break before becoming a confirmed inducement.
Visuals
The visual settings control whether external liquidity, inducement zones, sweep markers, path projections and liquidity targets are displayed.
**Path Projection Length** controls how far the projected structural path is drawn.
Style
Colors can be customized independently for bullish-side liquidity, bearish-side liquidity, bullish inducement zones, bearish inducement zones and projected paths.
Alerts
The script can generate alerts for:
* New bullish inducement
* New bearish inducement
* Bullish liquidity sweep
* Bearish liquidity sweep
* BOS confirmation events
These alerts correspond to state transitions in the detection workflow rather than simply alerting whenever an ordinary pivot appears.
Practical Usage
Use the external liquidity levels as the larger structural references and the inducement zones as secondary internal levels.
A typical workflow is to first identify the active external liquidity on the chart, then observe whether an appropriately separated internal swing forms. With BOS confirmation enabled, wait for the subsequent structural break before treating the candidate as confirmed.
After confirmation, monitor the inducement and external liquidity levels for subsequent sweeps.
The projected liquidity path should be interpreted as a visual representation of the detected structural relationship, not as a prediction of future price movement.
The indicator can therefore be used as a framework for studying how internal and external swing structures interact across different instruments and timeframes.
Limitations
The script uses confirmed pivot calculations. A pivot is only known after the required bars to the right have formed, so newly detected structure is inherently delayed by the selected pivot lengths.
Increasing the external or internal swing lengths will generally reduce the number of detected swings while making the structural definitions more selective. Smaller values can produce more candidates and more noise.
ATR filtering adapts the minimum separation to recent volatility, but it does not determine whether a particular market-structure interpretation is correct.
Liquidity sweeps are identified from the price relationship with detected levels. A sweep does not guarantee a reversal or continuation.
Projected liquidity paths are visual aids based on the currently detected opposing external level. They should not be interpreted as future-price forecasts.
The indicator is an analytical tool and should not be treated as a standalone trading system or a guarantee of market behavior.
Notes
The terms "liquidity", "inducement", "sweep" and "break of structure" describe the structural definitions implemented by this script. Different traders and methodologies may define these concepts differently.
For reproducibility, the most important settings are the external swing length, internal swing length, ATR separation threshold and BOS confirmation setting.
Signals and structural markings should be evaluated together with the underlying price action and the characteristics of the instrument and timeframe being analyzed.
Institutional Inducement Engine is a market-structure analysis tool built around a specific sequence: identify a major swing level, locate a smaller swing positioned between current price and that major level, require structural confirmation, and then monitor the confirmed level for a subsequent liquidity interaction.
The purpose of this workflow is to distinguish a potentially meaningful internal liquidity level from an ordinary minor swing. Instead of treating every internal pivot as an inducement, the script maintains a candidate state and only promotes that candidate after the required structural condition has occurred.
The resulting chart shows the relationship between external liquidity, confirmed internal inducement levels, subsequent sweeps, and the opposing external liquidity level.
Problem Statement
A conventional swing-point indicator treats major and minor pivots largely as the same type of information. This can make it difficult to distinguish a meaningful internal level from ordinary market noise.
This script uses two different structural scales:
* External swings represent the larger liquidity reference.
* Internal swings represent smaller candidate levels.
* The distance between them is optionally evaluated relative to ATR.
* A candidate can remain pending until a subsequent structure break confirms it.
This creates a sequential workflow rather than simply plotting every detected pivot.
Methodology
1. External Structure
The script detects major swing highs and lows using a configurable external pivot length.
A confirmed external high becomes the current bearish-side liquidity reference, while a confirmed external low becomes the current bullish-side liquidity reference.
Only the most recently detected external levels are maintained as the active structural references.
2. Internal Candidate Detection
A separate, shorter pivot length is used to detect internal highs and lows.
For a bullish inducement candidate, the internal low must be above the most recent external low.
For a bearish inducement candidate, the internal high must be below the most recent external high.
The separation between the internal candidate and its corresponding external level can also be filtered using ATR. With the ATR filter enabled, the minimum separation is:
Distance >= ATR x Minimum Distance Multiplier
This prevents very small differences between internal and external pivots from automatically qualifying as separate structural levels.
3. Pending Candidate State
A qualifying internal pivot is not immediately treated as a confirmed inducement.
Instead, the script stores its price and bar position as a pending candidate.
This distinction is important because the indicator is evaluating a sequence rather than a single candle or pivot:
Internal swing -> candidate -> structural confirmation -> confirmed inducement.
4. Break of Structure Confirmation
When BOS confirmation is enabled, the script looks for an internal structure point formed after the candidate.
For a bullish candidate, a subsequent internal high is tracked and a close crossing above that level confirms the bullish inducement.
For a bearish candidate, a subsequent internal low is tracked and a close crossing below that level confirms the bearish inducement.
Once confirmed, the pending candidate is transferred into the confirmed inducement state.
This prevents the initial internal pivot from being presented as a completed signal before the required structural sequence has occurred.
5. Inducement Zone
After confirmation, the inducement price is converted into a chart zone.
The zone height is derived from ATR rather than using a fixed number of ticks, allowing its visual size to scale with the instrument's current volatility.
The zone is then extended for the user-defined number of bars.
6. Liquidity Sweep Tracking
The script separately monitors the active external levels and confirmed inducement levels for price sweeps.
An external low is considered swept when price trades below that level and subsequently closes back above it.
An external high is considered swept when price trades above that level and subsequently closes back below it.
Confirmed inducement levels are also monitored. Once price trades through a confirmed inducement level, its sweep state is recorded so the same level is not repeatedly reported as a new sweep.
7. Liquidity Path Projection
After an inducement is confirmed, the script can draw a visual path from that inducement toward the opposing external liquidity reference.
For a confirmed bullish inducement, the path is drawn toward the current external high.
For a confirmed bearish inducement, the path is drawn toward the current external low.
This line is a structural visualization of the relationship between the two detected liquidity references. It is not a forecast or guarantee that price will reach the projected level.
Signal Workflow
The complete workflow is:
1. Detect a major external swing high or low.
2. Store that swing as the current external liquidity reference.
3. Detect smaller internal swings.
4. Test whether the internal swing is positioned between price structure and the corresponding external level.
5. Apply the optional ATR separation filter.
6. Store a qualifying internal swing as a pending candidate.
7. Identify a subsequent internal structure point.
8. Wait for the required break of that structure.
9. Promote the pending candidate to a confirmed inducement.
10. Draw the inducement zone.
11. Monitor the confirmed inducement and external liquidity for sweeps.
12. Optionally project the structural path toward the opposing external liquidity level.
This sequence is the central analytical framework of the indicator.
Why This Indicator Is Different
A standard pivot indicator answers a relatively simple question: "Where are the recent swing highs and lows?"
This script attempts to answer a different question: "Which smaller swing has a defined structural relationship with a larger liquidity reference, and has that relationship subsequently received structural confirmation?"
The distinction comes from the interaction of the components rather than from simply placing several indicators on the same chart.
The external and internal pivot systems operate at different structural scales. The ATR filter controls the minimum separation between those scales. The pending-state mechanism then prevents a candidate from becoming a confirmed inducement until the required structural event occurs.
After confirmation, the same state is carried forward into the sweep-tracking and opposing-liquidity visualization stages.
Consequently, the output represents a sequence of structural conditions rather than an independent collection of pivot, ATR and sweep markers.
Inputs
Structure
**External Swing Length**
Controls the pivot length used for major external swing detection.
**Internal Swing Length**
Controls the shorter pivot length used for internal candidate detection.
Filters
**Enable ATR Noise Filter**
Enables or disables volatility-adjusted separation between internal and external swings.
**ATR Length**
Controls the ATR calculation used by the distance filter and inducement-zone sizing.
**Min Distance (x ATR)**
Sets the minimum separation between the internal candidate and corresponding external level when the ATR filter is enabled.
**Require BOS Confirmation**
When enabled, an internal candidate must receive the specified structural break before becoming a confirmed inducement.
Visuals
The visual settings control whether external liquidity, inducement zones, sweep markers, path projections and liquidity targets are displayed.
**Path Projection Length** controls how far the projected structural path is drawn.
Style
Colors can be customized independently for bullish-side liquidity, bearish-side liquidity, bullish inducement zones, bearish inducement zones and projected paths.
Alerts
The script can generate alerts for:
* New bullish inducement
* New bearish inducement
* Bullish liquidity sweep
* Bearish liquidity sweep
* BOS confirmation events
These alerts correspond to state transitions in the detection workflow rather than simply alerting whenever an ordinary pivot appears.
Practical Usage
Use the external liquidity levels as the larger structural references and the inducement zones as secondary internal levels.
A typical workflow is to first identify the active external liquidity on the chart, then observe whether an appropriately separated internal swing forms. With BOS confirmation enabled, wait for the subsequent structural break before treating the candidate as confirmed.
After confirmation, monitor the inducement and external liquidity levels for subsequent sweeps.
The projected liquidity path should be interpreted as a visual representation of the detected structural relationship, not as a prediction of future price movement.
The indicator can therefore be used as a framework for studying how internal and external swing structures interact across different instruments and timeframes.
Limitations
The script uses confirmed pivot calculations. A pivot is only known after the required bars to the right have formed, so newly detected structure is inherently delayed by the selected pivot lengths.
Increasing the external or internal swing lengths will generally reduce the number of detected swings while making the structural definitions more selective. Smaller values can produce more candidates and more noise.
ATR filtering adapts the minimum separation to recent volatility, but it does not determine whether a particular market-structure interpretation is correct.
Liquidity sweeps are identified from the price relationship with detected levels. A sweep does not guarantee a reversal or continuation.
Projected liquidity paths are visual aids based on the currently detected opposing external level. They should not be interpreted as future-price forecasts.
The indicator is an analytical tool and should not be treated as a standalone trading system or a guarantee of market behavior.
Notes
The terms "liquidity", "inducement", "sweep" and "break of structure" describe the structural definitions implemented by this script. Different traders and methodologies may define these concepts differently.
For reproducibility, the most important settings are the external swing length, internal swing length, ATR separation threshold and BOS confirmation setting.
Signals and structural markings should be evaluated together with the underlying price action and the characteristics of the instrument and timeframe being analyzed.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Build your trading tools with AI : algotim.com
All content provided by AlgoTim (algo_aakash) is for informational and educational purposes only. Trading involves risk, and past performance does not guarantee future results.
All content provided by AlgoTim (algo_aakash) is for informational and educational purposes only. Trading involves risk, and past performance does not guarantee future results.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Build your trading tools with AI : algotim.com
All content provided by AlgoTim (algo_aakash) is for informational and educational purposes only. Trading involves risk, and past performance does not guarantee future results.
All content provided by AlgoTim (algo_aakash) is for informational and educational purposes only. Trading involves risk, and past performance does not guarantee future results.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.