Composite Indicator (Donchian + OBV)Composite Indicator (Donchian + OBV)
The Composite Indicator (Donchian + OBV) is a powerful tool designed to evaluate the strength of market breakouts and momentum trends , offering traders a comprehensive perspective on price action. This indicator combines the Donchian Channel with On-Balance Volume (OBV) to create a dynamic and easy-to-interpret metric scaled between -1 and 1 .
Key Features
Breakout Strength Analysis:
- The indicator assesses the strength of price breakouts relative to the upper and lower bounds of the Donchian Channel.
- Positive values close to 1 indicate a strong bullish breakout.
- Negative values close to -1 indicate a strong bearish breakout.
Momentum Detection with OBV:
- On-Balance Volume (OBV) tracks the cumulative buying and selling volume to gauge market momentum.
- The smoothed OBV trend ensures the momentum component aligns with price action, reducing noise.
Integrated Composite Value:
- Combines breakout strength and OBV momentum into a single metric for enhanced clarity.
- The final composite value highlights whether the market is bullish, bearish, or neutral.
Divergence Detection:
- Spot bullish divergences when the indicator rises while price falls, suggesting a potential upward reversal.
- Identify bearish divergences when the indicator falls while price rises, hinting at a potential downward reversal.
How It Works
Donchian Channel Analysis:
- Calculates the highest high and lowest low over a user-defined period to establish the upper and lower channels .
- Breakouts beyond these channels contribute to the breakout strength component.
OBV Momentum:
- Measures cumulative volume trends to validate price movements.
- Momentum is derived from the rate of change in smoothed OBV values.
Composite Calculation:
- Combines breakout strength and OBV momentum, normalized and scaled to -1 to 1 for clarity.
How to Use
Bullish Breakout:
- When the indicator value approaches 1 , it signals a strong upward breakout supported by positive OBV momentum.
- Example Action: Consider a Buy if price breaks the upper Donchian Channel with increasing OBV.
Bearish Breakout:
- When the indicator value approaches -1 , it indicates a strong downward breakout supported by negative OBV momentum.
- Example Action: Consider a Sell if price breaks the lower Donchian Channel with decreasing OBV.
Neutral Market:
- When the value is near 0 , the market is likely balanced with no significant breakout or momentum detected.
Divergence Opportunities:
- Bullish Divergence: Price makes lower lows, but the indicator trends upward → Potential upward reversal.
- Bearish Divergence: Price makes higher highs, but the indicator trends downward → Potential downward reversal.
Customization Options
Donchian Channel Length: Adjust the period for the upper and lower bounds.
OBV Smoothing Length: Modify the smoothing period for OBV to fine-tune momentum detection.
Scaling Adjustments: The composite value is automatically normalized for consistency across timeframes.
Ideal Use Cases
Breakout Trading: Identify and confirm strong breakouts in volatile markets.
Momentum Confirmation: Validate price movements with volume-based momentum.
Reversal Detection: Leverage divergences to spot potential market reversals.
Example Applications
Strong Bullish Signal:
- Price breaks the upper channel , and OBV shows increasing volume → Composite value near 1 .
- Action: Enter a Buy position and set a Stop Loss below the upper channel.
Strong Bearish Signal:
- Price breaks the lower channel , and OBV shows decreasing volume → Composite value near -1 .
- Action: Enter a Sell position and set a Stop Loss above the lower channel.
Neutral Market:
- Composite value near 0 suggests indecision or consolidation. Wait for a breakout.
Limitations
Best used alongside additional tools like RSI or MACD for filtering noise and improving decision-making.
Requires careful parameter tuning based on the asset and timeframe.
Final Thoughts
The Composite Indicator (Donchian + OBV) offers traders a versatile tool to navigate complex markets. By blending breakout analysis with volume-based momentum, this indicator provides an actionable edge for identifying high-probability opportunities and potential reversals.
Cari dalam skrip untuk "break"
PERFECT PIVOT RANGE DR ABIRAM SIVPRASAD (PPR)PERFECT PIVOT RANGE (PPR) by Dr. Abhiram Sivprasad
The Perfect Pivot Range (PPR) indicator is designed to provide traders with a comprehensive view of key support and resistance levels based on pivot points across different timeframes. This versatile tool allows users to visualize daily, weekly, and monthly pivots along with high and low levels from previous periods, helping traders identify potential areas of price reversals or breakouts.
Features:
Multi-Timeframe Pivots:
Daily, weekly, and monthly pivot levels (Pivot Point, Support 1 & 2, Resistance 1 & 2).
Helps traders understand price levels across various timeframes, from short-term (daily) to long-term (monthly).
Previous High-Low Levels:
Displays the previous week, month, and day high-low levels to highlight key zones of historical support and resistance.
Traders can easily see areas of price action from prior periods, giving context for future price movements.
Customizable Options:
Users can choose which pivot levels and high-lows to display, allowing for flexibility based on trading preferences.
Visual settings can be toggled on and off to suit different trading strategies and timeframes.
Real-Time Data:
All pivot points and levels are dynamically calculated based on real-time price data, ensuring accurate and up-to-date information for decision-making.
How to Use:
Pivot Points: Use daily, weekly, or monthly pivot points to find potential support or resistance levels. Prices above the pivot suggest bullish sentiment, while prices below indicate bearishness.
Previous High-Low: The high-low levels from previous days, weeks, or months can serve as critical zones where price may reverse or break through, indicating potential trade entries or exits.
Confluence: When pivot points or high-low levels overlap across multiple timeframes, they become even stronger levels of support or resistance.
This indicator is suitable for all types of traders (scalpers, swing traders, and long-term investors) looking to enhance their technical analysis and make more informed trading decisions.
Here are three detailed trading strategies for using the Perfect Pivot Range (PPR) indicator for options, stocks, and commodities:
1. Options Buying Strategy with PPR Indicator
Strategy: Buying Call and Put Options Based on Pivot Breakouts
Objective: To capitalize on sharp price movements when key pivot levels are breached, leading to high returns with limited risk in options trading.
Timeframe: 15-minute to 1-hour chart for intraday option trading.
Steps:
Identify the Key Levels:
Use weekly pivots for intraday trading, as they provide more significant levels for options.
Enable the "Previous Week High-Low" to gauge support and resistance from the previous week.
Call Option Setup (Bullish Breakout):
Condition: If the price breaks above the weekly pivot point (PP) with high momentum (indicated by a strong bullish candle), it signifies potential bullishness.
Action: Buy Call Options at the breakout of the weekly pivot.
Confirmation: Check if the price is sustaining above the pivot with a minimum of 1-2 candles (depending on timeframe) and the first resistance (R1) isn’t too far away.
Target: The first resistance (R1) or previous week’s high can be your target for exiting the trade.
Stop-Loss: Set a stop-loss just below the pivot point (PP) to limit risk.
Put Option Setup (Bearish Breakdown):
Condition: If the price breaks below the weekly pivot (PP) with strong bearish momentum, it’s a signal to expect a downward move.
Action: Buy Put Options on a breakdown below the weekly pivot.
Confirmation: Ensure that the price is closing below the pivot, and check for declining volumes or bearish candles.
Target: The first support (S1) or the previous week’s low.
Stop-Loss: Place the stop-loss just above the pivot point (PP).
Example:
Let’s say the weekly pivot point (PP) is at 1500, the price breaks above and sustains at 1510. You buy a Call Option with a strike price near 1500, and the target will be the first resistance (R1) at 1530.
2. Stock Trading Strategy with PPR Indicator
Strategy: Swing Trading Using Pivot Points and Previous High-Low Levels
Objective: To capture mid-term stock price movements using pivot points and historical high-low levels for better trade entries and exits.
Timeframe: 1-day or 4-hour chart for swing trading.
Steps:
Identify the Trend:
Start by determining the overall trend of the stock using the weekly pivots. If the price is consistently above the pivot point (PP), the trend is bullish; if below, the trend is bearish.
Buy Setup (Bullish Trend Reversal):
Condition: When the stock bounces off the weekly pivot point (PP) or previous week’s low, it signals a bullish reversal.
Action: Enter a long position near the pivot or previous week’s low.
Confirmation: Look for a bullish candle pattern or increasing volumes.
Target: Set your first target at the first resistance (R1) or the previous week’s high.
Stop-Loss: Place your stop-loss just below the previous week’s low or support (S1).
Sell Setup (Bearish Trend Reversal):
Condition: When the price hits the weekly resistance (R1) or previous week’s high and starts to reverse downwards, it’s an opportunity to short-sell the stock.
Action: Enter a short position near the resistance.
Confirmation: Watch for bearish candle patterns or decreasing volume at the resistance.
Target: Your first target would be the weekly pivot point (PP), with the second target as the previous week’s low.
Stop-Loss: Set a stop-loss just above the resistance (R1).
Use Previous High-Low Levels:
The previous week’s high and low are key levels where price reversals often occur, so use them as reference points for potential entry and exit.
Example:
Stock XYZ is trading at 200. The previous week’s low is 195, and it bounces off that level. You enter a long position with a target of 210 (previous week’s high) and place a stop-loss at 193.
3. Commodity Trading Strategy with PPR Indicator
Strategy: Trend Continuation and Reversal in Commodities
Objective: To capitalize on the strong trends in commodities by using pivot points as key support and resistance levels for trend continuation and reversal.
Timeframe: 1-hour to 4-hour charts for commodities like Gold, Crude Oil, Silver, etc.
Steps:
Identify the Trend:
Use monthly pivots for long-term commodities trading since commodities often follow macroeconomic trends.
The monthly pivot point (PP) will give an idea of the long-term trend direction.
Trend Continuation Setup (Bullish Commodity):
Condition: If the price is consistently trading above the monthly pivot and pulling back towards the pivot without breaking below it, it indicates a bullish continuation.
Action: Enter a long position when the price tests the monthly pivot (PP) and starts moving up again.
Confirmation: Look for a strong bullish candle or an increase in volume to confirm the continuation.
Target: The first resistance (R1) or previous month’s high.
Stop-Loss: Place the stop-loss below the monthly pivot (PP).
Trend Reversal Setup (Bearish Commodity):
Condition: When the price reverses from the monthly resistance (R1) or previous month’s high, it’s a signal for a bearish reversal.
Action: Enter a short position at the resistance level.
Confirmation: Watch for bearish candle patterns or decreasing volumes at the resistance.
Target: Set your first target as the monthly pivot (PP) or the first support (S1).
Stop-Loss: Stop-loss should be placed just above the resistance level.
Using Previous High-Low for Swing Trades:
The previous month’s high and low are important in commodities. They often act as barriers to price movement, so traders should look for breakouts or reversals near these levels.
Example:
Gold is trading at $1800, with a monthly pivot at $1780 and the previous month’s high at $1830. If the price pulls back to $1780 and starts moving up again, you enter a long trade with a target of $1830, placing your stop-loss below $1770.
Key Points Across All Strategies:
Multiple Timeframes: Always use a combination of timeframes for confirmation. For example, a daily chart may show a bullish setup, but the weekly pivot levels can provide a larger trend context.
Volume: Volume is key in confirming the strength of price movement. Always confirm breakouts or reversals with rising or declining volume.
Risk Management: Set tight stop-loss levels just below support or above resistance to minimize risk and lock in profits at pivot points.
Each of these strategies leverages the powerful pivot and high-low levels provided by the PPR indicator to give traders clear entry, exit, and risk management points across different markets
PowerZone Trading StrategyExplanation of the PowerZone Trading Strategy for Your Users
The PowerZone Trading Strategy is an automated trading strategy that detects strong price movements (called "PowerZones") and generates signals to enter a long (buy) or short (sell) position, complete with predefined take profit and stop loss levels. Here’s how it works, step by step:
1. What is a PowerZone?
A "PowerZone" (PZ) is a zone on the chart where the price has shown a significant and consistent movement over a specific number of candles (bars). There are two types:
Bullish PowerZone (Bullish PZ): Occurs when the price rises consistently over several candles after an initial bearish candle.
Bearish PowerZone (Bearish PZ): Occurs when the price falls consistently over several candles after an initial bullish candle.
The code analyzes:
A set number of candles (e.g., 5, adjustable via "Periods").
A minimum percentage move (adjustable via "Min % Move for PowerZone") to qualify as a strong zone.
Whether to use the full candle range (highs and lows) or just open/close prices (toggle with "Use Full Range ").
2. How Does It Detect PowerZones?
Bullish PowerZone:
Looks for an initial bearish candle (close below open).
Checks that the next candles (e.g., 5) are all bullish (close above open).
Ensures the total price movement exceeds the minimum percentage set.
Defines a range: from the high (or open) to the low of the initial candle.
Bearish PowerZone:
Looks for an initial bullish candle (close above open).
Checks that the next candles are all bearish (close below open).
Ensures the total price movement exceeds the minimum percentage.
Defines a range: from the high to the low (or close) of the initial candle.
These zones are drawn on the chart with lines: green or white for bullish, red or blue for bearish, depending on the color scheme ("DARK" or "BRIGHT").
3. When Does It Enter a Trade?
The strategy waits for a breakout from the PowerZone range to enter a trade:
Buy (Long): When the price breaks above the high of a Bullish PowerZone.
Sell (Short): When the price breaks below the low of a Bearish PowerZone.
The position size is set to 100% of available equity (adjustable in the code).
4. Take Profit and Stop Loss
Take Profit (TP): Calculated as a multiple (adjustable via "Take Profit Factor," default 1.5) of the PowerZone height. For example:
For a buy, TP = Entry price + (PZ height × 1.5).
For a sell, TP = Entry price - (PZ height × 1.5).
Stop Loss (SL): Calculated as a multiple (adjustable via "Stop Loss Factor," default 1.0) of the PZ height, placed below the range for buys or above for sells.
5. Visualization on the Chart
PowerZones are displayed with lines on the chart (you can hide them with "Show Bullish Channel" or "Show Bearish Channel").
An optional info panel ("Show Info Panel") displays key levels: PZ high and low, TP, and SL.
You can also enable brief documentation on the chart ("Show Documentation") explaining the basic rules.
6. Alerts
The code generates automatic alerts in TradingView:
For a bullish breakout: "Bullish PowerZone Breakout - LONG!"
For a bearish breakdown: "Bearish PowerZone Breakdown - SHORT!"
7. Customization
You can tweak:
The number of candles to detect a PZ ("Periods").
The minimum percentage move ("Min % Move").
Whether to use highs/lows or just open/close ("Use Full Range").
The TP and SL factors.
The color scheme and what elements to display on the chart.
Practical Example
Imagine you set "Periods = 5" and "Min % Move = 2%":
An initial bearish candle appears, followed by 5 consecutive bullish candles.
The total move exceeds 2%.
A Bullish PowerZone is drawn with a high and low.
If the price breaks above the high, you enter a long position with a TP 1.5 times the PZ height and an SL equal to the height below.
The system executes the trade and exits automatically at TP or SL.
Conclusion
This strategy is great for capturing strong price movements after consolidation or momentum zones. It’s automated, visual, and customizable, making it useful for both beginner and advanced traders. Try it out and adjust it to fit your trading style!
Wyckoff Range Detector [Beta] + Smart Money ElementsThis indicator detects the key phases of the Wyckoff market structure and integrates smart money elements, such as Order Blocks (OB), Fair Value Gaps (FVG), and Breaker Blocks. It also helps identify potential reversal zones (LPS, UTAD, Spring), breakout opportunities, and provides automatic Risk-Reward (R:R) calculations.
Key Features:
Wyckoff Phases Detection:
Automatically detects key phases of Wyckoff's market structure:
B (Range) – The initial range of accumulation.
C (Spring Phase) – Accumulation phase with a potential breakout.
C (UTAD Phase) – Upthrust After Distribution, indicating a potential reversal.
D (LPS Phase) – Last Point of Support, signaling accumulation before a breakout.
E (Breakout) – Phase marking breakout from range.
Re-Accumulation – Possible continuation in the range after a breakout.
Re-Distribution – Possible breakdown of a distribution phase.
Smart Money Elements:
Order Blocks (OB): Identifies Bullish and Bearish OBs to anticipate market entries.
Fair Value Gap (FVG): Highlights imbalance areas where price is likely to return.
Breaker Blocks: Marks areas where the price has previously broken a structure, indicating strong supply/demand zones.
Automatic Risk-Reward Calculation:
Smart RR: Automatically calculates Risk-Reward (R:R) ratios from LPS phases and Order Blocks. It draws lines to indicate target and stop levels with green for the target and red for the stop.
Visual representation of the entry signal with target and stop levels displayed.
Alerts:
Set alerts for phase changes, breakout, re-accumulation, or re-distribution to stay updated on the market’s movements.
Visual Tools:
Labels are used to indicate key zones such as AR, SC, LPS, and Spring Zones.
Draw boxes for the Spring and LPS phases to highlight areas where price action is likely to reverse.
Lines to represent potential breakouts, with customizable risk-reward indicators.
How to Use:
Apply the Indicator on any chart.
Identify Wyckoff phases to understand market trends.
Monitor Smart Money Elements (OB, FVG, Breaker) for entry and exit points.
Use automatic Risk-Reward levels for managing trades.
Set alerts for various Wyckoff phases and smart money signals to stay updated.
Market Structure Trend Targets [ChartPrime]The Market Structure Trend Targets indicator is designed to identify trend direction and continuation points by marking significant breaks in price levels. This approach helps traders track trend strength and potential reversal points. The indicator uses previous highs and lows as breakout triggers, providing a visual roadmap for trend continuation or mean reversion signals.
⯁ KEY FEATURES AND HOW TO USE
⯌ Breakout Points with Numbered Markers :
The indicator identifies key breakout points where price breaks above a previous high (for uptrends) or below a previous low (for downtrends). The initial breakout (zero break) is marked with the entry price and a triangle icon, while subsequent breakouts within the trend are numbered sequentially (1, 2, 3…) to indicate trend continuation.
Example of breakout markers for uptrend and downtrend:
⯌ Percentage Change Display Option :
Traders can toggle on a setting to display the percentage change from the initial breakout point to each subsequent break level, offering an easy way to gauge trend momentum over time. This is particularly helpful for identifying how far price has moved in the current trend.
Percentage change example between break points:
⯌ Dynamic Stop Loss Levels :
In uptrends, the stop loss level is placed below the price to protect against downside moves. In downtrends, it is positioned above the price. If the price breaches the stop loss level, the indicator resets, indicating a potential end or reversal of the trend.
Dynamic stop loss level illustration in uptrend and downtrend:
⯌ Mean Reversion Signals :
The indicator identifies potential mean reversion points with diamond icons. In an uptrend, if the price falls below the stop loss and then re-enters above it, a diamond is plotted, suggesting a possible mean reversion. Similarly, in a downtrend, if the price moves above the stop loss and then falls back below, it indicates a reversion possibility.
Mean reversion diamond signals on the chart:
⯌ Trend Visualization with Colored Zones :
The chart background is shaded to visually represent trend direction, with color changes corresponding to uptrends and downtrends. This makes it easier to see overall market conditions at a glance.
⯁ USER INPUTS
Length : Defines the number of bars used to identify pivot highs and lows for trend breakouts.
Display Percentage : Option to toggle between showing sequential breakout numbers or the percentage change from the initial breakout.
Colors for Uptrend and Downtrend : Allows customization of color zones for uptrends and downtrends to match individual chart preferences.
⯁ CONCLUSION
The Market Structure Trend Targets indicator offers a strategic way to monitor market trends, track breakouts, and manage risk through dynamic stop loss levels. Its clear visual representation of trend continuity, alongside mean reversion signals, provides traders with actionable insights for both trend-following and counter-trend strategies.
BRT Cluster VolumeTitle and Purpose
BRT Cluster Volume is a powerful market analysis tool designed to identify key support and resistance levels, cluster volumes, and breakout signals. This script is highly beneficial for traders who aim to gain deeper insights into market trends and pinpoint zones of interest for buyers and sellers.
Key Features
1. Support and Resistance Levels:
- The script automatically detects chart extremums by analyzing a specified number of bars on the left and right to form levels. This approach effectively identifies local highs and lows.
- The uniqueness of this implementation lies in its dynamic data processing. For each extremum, the "channel width" is calculated, allowing insignificant levels to be filtered out based on a user-defined minimum width. This method eliminates noise and ensures focus on critical levels.
- Extremum lines can be extended to the right (when enabled), allowing traders to track current price movements relative to historical levels.
2. Cluster Volume:
- The cluster analysis is based on lower timeframe data, providing precise identification of key zones of market participant activity. The script dynamically requests close prices and volumes from lower timeframes, calculates the average volume, and identifies levels where volumes exceed a defined threshold.
- The visualization of cluster volumes is unique: volumes exceeding the threshold are displayed as candles with customizable colors and markers. These indicators help traders identify zones of significant interest.
- Cluster volume is only displayed when it interacts with support or resistance levels, ensuring that the visualization remains precise and relevant for market analysis.
3. Breakout Signals:
- The script evaluates "breakout strength" for each breakout of support or resistance levels by comparing the current price with the level. This helps filter false breakouts and focus on significant price movements.
- Traders can select the source for breakout signals (close price or high/low), offering flexibility for various trading styles and strategies.
- By incorporating the concept of "maximum breakout strength," the script highlights only meaningful breakouts, ignoring minor fluctuations.
4. Integration of Trading Sessions:
- Extremum levels for major trading sessions (Asia, Europe, USA) are identified and labeled on the chart. This allows traders to see when significant price levels were formed during the day.
- The script uses timestamps to automatically detect session times, ensuring accuracy and minimizing manual adjustments.
5. Dynamic Data Updates:
- The script dynamically updates support and resistance levels in real time as new data becomes available. This feature is crucial for traders working in fast-moving markets.
- Outdated information (such as obsolete levels) is automatically removed to keep the chart clean and focused on relevant data.
6. Visualization of Activity Zones:
- Trend direction is visualized using color-coded candles based on cluster volumes. For instance, candles with volumes exceeding the average are highlighted with specific colors, helping traders quickly identify areas of heightened activity.
- The unique aspect of this visualization is that cluster volumes appear only in zones where they interact with breakout levels, providing an intuitive and streamlined presentation of critical data.
Usage
- Support and Resistance: Adjust the "Left Bars" and "Right Bars" settings to determine extremums. Use the "Channel Min Width" setting to filter out insignificant levels.
- Cluster Volume: Customize the analysis period and volume threshold to identify high-activity zones. Enable breakout clusters to see how volumes interact with breakouts.
- Session Extremums: Highlight significant levels for Asia, Europe, and US trading sessions to gain insights into market dynamics across different time zones.
- Breakout Signals: Configure the breakout strength and source (close or high/low) for precise signal detection.
Parameter Details
1. Support & Resistance:
- `Left Bars` / `Right Bars`: Number of bars to consider for determining extremums.
- `# of Lines`: Maximum number of support/resistance lines to display.
- `Channel Min Width`: Minimum channel width to filter insignificant levels.
2. Breakout:
- `Show Breakouts`: Toggle breakout signal display.
- `Max breakout strength`: Maximum strength for valid breakouts.
- `Breakout source`: Data source for breakouts (close or high/low).
3. Cluster Volume:
- `Lookback`: Number of bars to analyze for cluster volumes.
- `Threshold`: Volume threshold (percentage above the average).
- `Cluster Volume Timeframe`: Timeframe for cluster volume analysis.
- `Breakout Cluster`: Display cluster volumes only for breakout-related zones.
4. Visual Settings:
- `Extend extremum lines to the right`: Extend support/resistance lines to the right.
- `Show ASIA/EU/US Session Extremums`: Display extremums for trading sessions.
Features and Benefits
- The script provides flexible parameter customization, allowing it to adapt to different trading styles and timeframes.
- The visualization is designed to be clean and intuitive, ensuring users can easily interpret the data.
- Suitable for all timeframes, making it ideal for both intraday and long-term market analysis.
Limitations
- The script is not suitable for analysis on non-standard chart types (e.g., Heikin Ashi, Renko, Kagi).
- To ensure accurate performance, realistic data for commission and slippage should be used.
Warnings
- The script relies on historical data for calculations, which may cause discrepancies in real-time conditions.
- Users should fully understand the functionality of cluster analysis and breakout signals before using the script in live trading.
This script combines advanced data processing logic, dynamic level adjustments, and unique visualization approaches, making it an indispensable tool for market analysis and trading decision-making.
Trading IQ - ICT LibraryLibrary "ICTlibrary"
Used to calculate various ICT related price levels and strategies. An ongoing project.
Hello Coders!
This library is meant for sourcing ICT related concepts. While some functions might generate more output than you require, you can specify "Lite Mode" as "true" in applicable functions to slim down necessary inputs.
isLastBar(userTF)
Identifies the last bar on the chart before a timeframe change
Parameters:
userTF (simple int) : the timeframe you wish to calculate the last bar for, must be converted to integer using 'timeframe.in_seconds()'
Returns: bool true if bar on chart is last bar of higher TF, dalse if bar on chart is not last bar of higher TF
necessaryData(atrTF)
returns necessaryData UDT for historical data access
Parameters:
atrTF (float) : user-selected timeframe ATR value.
Returns: logZ. log return Z score, used for calculating order blocks.
method gradBoxes(gradientBoxes, idColor, timeStart, bottom, top, rightCoordinate)
creates neon like effect for box drawings
Namespace types: array
Parameters:
gradientBoxes (array) : an array.new() to store the gradient boxes
idColor (color)
timeStart (int) : left point of box
bottom (float) : bottom of box price point
top (float) : top of box price point
rightCoordinate (int) : right point of box
Returns: void
checkIfTraded(tradeName)
checks if recent trade is of specific name
Parameters:
tradeName (string)
Returns: bool true if recent trade id matches target name, false otherwise
checkIfClosed(tradeName)
checks if recent closed trade is of specific name
Parameters:
tradeName (string)
Returns: bool true if recent closed trade id matches target name, false otherwise
IQZZ(atrMult, finalTF)
custom ZZ to quickly determine market direction.
Parameters:
atrMult (float) : an atr multiplier used to determine the required price move for a ZZ direction change
finalTF (string) : the timeframe used for the atr calcuation
Returns: dir market direction. Up => 1, down => -1
method drawBos(id, startPoint, getKeyPointTime, getKeyPointPrice, col, showBOS, isUp)
calculates and draws Break Of Structure
Namespace types: array
Parameters:
id (array)
startPoint (chart.point)
getKeyPointTime (int) : the actual time of startPoint, simplystartPoint.time
getKeyPointPrice (float) : the actual time of startPoint, simplystartPoint.price
col (color) : color of the BoS line / label
showBOS (bool) : whether to show label/line. This function still calculates internally for other ICT related concepts even if not drawn.
isUp (bool) : whether BoS happened during price increase or price decrease.
Returns: void
method drawMSS(id, startPoint, getKeyPointTime, getKeyPointPrice, col, showMSS, isUp, upRejections, dnRejections, highArr, lowArr, timeArr, closeArr, openArr, atrTFarr, upRejectionsPrices, dnRejectionsPrices)
calculates and draws Market Structure Shift. This data is also used to calculate Rejection Blocks.
Namespace types: array
Parameters:
id (array)
startPoint (chart.point)
getKeyPointTime (int) : the actual time of startPoint, simplystartPoint.time
getKeyPointPrice (float) : the actual time of startPoint, simplystartPoint.price
col (color) : color of the MSS line / label
showMSS (bool) : whether to show label/line. This function still calculates internally for other ICT related concepts even if not drawn.
isUp (bool) : whether MSS happened during price increase or price decrease.
upRejections (array)
dnRejections (array)
highArr (array) : array containing historical highs, should be taken from the UDT "necessaryData" defined above
lowArr (array) : array containing historical lows, should be taken from the UDT "necessaryData" defined above
timeArr (array) : array containing historical times, should be taken from the UDT "necessaryData" defined above
closeArr (array) : array containing historical closes, should be taken from the UDT "necessaryData" defined above
openArr (array) : array containing historical opens, should be taken from the UDT "necessaryData" defined above
atrTFarr (array) : array containing historical atr values (of user-selected TF), should be taken from the UDT "necessaryData" defined above
upRejectionsPrices (array) : array containing up rejections prices. Is sorted and used to determine selective looping for invalidations.
dnRejectionsPrices (array) : array containing down rejections prices. Is sorted and used to determine selective looping for invalidations.
Returns: void
method getTime(id, compare, timeArr)
gets time of inputted price (compare) in an array of data
this is useful when the user-selected timeframe for ICT concepts is greater than the chart's timeframe
Namespace types: array
Parameters:
id (array) : the array of data to search through, to find which index has the same value as "compare"
compare (float) : the target data point to find in the array
timeArr (array) : array of historical times
Returns: the time that the data point in the array was recorded
method OB(id, highArr, signArr, lowArr, timeArr, sign)
store bullish orderblock data
Namespace types: array
Parameters:
id (array)
highArr (array) : array of historical highs
signArr (array) : array of historical price direction "math.sign(close - open)"
lowArr (array) : array of historical lows
timeArr (array) : array of historical times
sign (int) : orderblock direction, -1 => bullish, 1 => bearish
Returns: void
OTEstrat(OTEstart, future, closeArr, highArr, lowArr, timeArr, longOTEPT, longOTESL, longOTElevel, shortOTEPT, shortOTESL, shortOTElevel, structureDirection, oteLongs, atrTF, oteShorts)
executes the OTE strategy
Parameters:
OTEstart (chart.point)
future (int) : future time point for drawings
closeArr (array) : array of historical closes
highArr (array) : array of historical highs
lowArr (array) : array of historical lows
timeArr (array) : array of historical times
longOTEPT (string) : user-selected long OTE profit target, please create an input.string() for this using the example below
longOTESL (int) : user-selected long OTE stop loss, please create an input.string() for this using the example below
longOTElevel (float) : long entry price of selected retracement ratio for OTE
shortOTEPT (string) : user-selected short OTE profit target, please create an input.string() for this using the example below
shortOTESL (int) : user-selected short OTE stop loss, please create an input.string() for this using the example below
shortOTElevel (float) : short entry price of selected retracement ratio for OTE
structureDirection (string) : current market structure direction, this should be "Up" or "Down". This is used to cancel pending orders if market structure changes
oteLongs (bool) : input.bool() for whether OTE longs can be executed
atrTF (float) : atr of the user-seleceted TF
oteShorts (bool) : input.bool() for whether OTE shorts can be executed
@exampleInputs
oteLongs = input.bool(defval = false, title = "OTE Longs", group = "Optimal Trade Entry")
longOTElevel = input.float(defval = 0.79, title = "Long Entry Retracement Level", options = , group = "Optimal Trade Entry")
longOTEPT = input.string(defval = "-0.5", title = "Long TP", options = , group = "Optimal Trade Entry")
longOTESL = input.int(defval = 0, title = "How Many Ticks Below Swing Low For Stop Loss", group = "Optimal Trade Entry")
oteShorts = input.bool(defval = false, title = "OTE Shorts", group = "Optimal Trade Entry")
shortOTElevel = input.float(defval = 0.79, title = "Short Entry Retracement Level", options = , group = "Optimal Trade Entry")
shortOTEPT = input.string(defval = "-0.5", title = "Short TP", options = , group = "Optimal Trade Entry")
shortOTESL = input.int(defval = 0, title = "How Many Ticks Above Swing Low For Stop Loss", group = "Optimal Trade Entry")
Returns: void (0)
displacement(logZ, atrTFreg, highArr, timeArr, lowArr, upDispShow, dnDispShow, masterCoords, labelLevels, dispUpcol, rightCoordinate, dispDncol, noBorders)
calculates and draws dispacements
Parameters:
logZ (float) : log return of current price, used to determine a "significant price move" for a displacement
atrTFreg (float) : atr of user-seleceted timeframe
highArr (array) : array of historical highs
timeArr (array) : array of historical times
lowArr (array) : array of historical lows
upDispShow (int) : amount of historical upside displacements to show
dnDispShow (int) : amount of historical downside displacements to show
masterCoords (map) : a map to push the most recent displacement prices into, useful for having key levels in one data structure
labelLevels (string) : used to determine label placement for the displacement, can be inside box, outside box, or none, example below
dispUpcol (color) : upside displacement color
rightCoordinate (int) : future time for displacement drawing, best is "last_bar_time"
dispDncol (color) : downside displacement color
noBorders (bool) : input.bool() to remove box borders, example below
@exampleInputs
labelLevels = input.string(defval = "Inside" , title = "Box Label Placement", options = )
noBorders = input.bool(defval = false, title = "No Borders On Levels")
Returns: void
method getStrongLow(id, startIndex, timeArr, lowArr, strongLowPoints)
unshift strong low data to array id
Namespace types: array
Parameters:
id (array)
startIndex (int) : the starting index for the timeArr array of the UDT "necessaryData".
this point should start from at least 1 pivot prior to find the low before an upside BoS
timeArr (array) : array of historical times
lowArr (array) : array of historical lows
strongLowPoints (array) : array of strong low prices. Used to retrieve highest strong low price and see if need for
removal of invalidated strong lows
Returns: void
method getStrongHigh(id, startIndex, timeArr, highArr, strongHighPoints)
unshift strong high data to array id
Namespace types: array
Parameters:
id (array)
startIndex (int) : the starting index for the timeArr array of the UDT "necessaryData".
this point should start from at least 1 pivot prior to find the high before a downside BoS
timeArr (array) : array of historical times
highArr (array) : array of historical highs
strongHighPoints (array)
Returns: void
equalLevels(highArr, lowArr, timeArr, rightCoordinate, equalHighsCol, equalLowsCol, liteMode)
used to calculate recent equal highs or equal lows
Parameters:
highArr (array) : array of historical highs
lowArr (array) : array of historical lows
timeArr (array) : array of historical times
rightCoordinate (int) : a future time (right for boxes, x2 for lines)
equalHighsCol (color) : user-selected color for equal highs drawings
equalLowsCol (color) : user-selected color for equal lows drawings
liteMode (bool) : optional for a lite mode version of an ICT strategy. For more control over drawings leave as "True", "False" will apply neon effects
Returns: void
quickTime(timeString)
used to quickly determine if a user-inputted time range is currently active in NYT time
Parameters:
timeString (string) : a time range
Returns: true if session is active, false if session is inactive
macros(showMacros, noBorders)
used to calculate and draw session macros
Parameters:
showMacros (bool) : an input.bool() or simple bool to determine whether to activate the function
noBorders (bool) : an input.bool() to determine whether the box anchored to the session should have borders
Returns: void
po3(tf, left, right, show)
use to calculate HTF po3 candle
@tip only call this function on "barstate.islast"
Parameters:
tf (simple string)
left (int) : the left point of the candle, calculated as bar_index + left,
right (int) : :the right point of the candle, calculated as bar_index + right,
show (bool) : input.bool() whether to show the po3 candle or not
Returns: void
silverBullet(silverBulletStratLong, silverBulletStratShort, future, userTF, H, L, H2, L2, noBorders, silverBulletLongTP, historicalPoints, historicalData, silverBulletLongSL, silverBulletShortTP, silverBulletShortSL)
used to execute the Silver Bullet Strategy
Parameters:
silverBulletStratLong (simple bool)
silverBulletStratShort (simple bool)
future (int) : a future time, used for drawings, example "last_bar_time"
userTF (simple int)
H (float) : the high price of the user-selected TF
L (float) : the low price of the user-selected TF
H2 (float) : the high price of the user-selected TF
L2 (float) : the low price of the user-selected TF
noBorders (bool) : an input.bool() used to remove the borders from box drawings
silverBulletLongTP (series silverBulletLevels)
historicalPoints (array)
historicalData (necessaryData)
silverBulletLongSL (series silverBulletLevels)
silverBulletShortTP (series silverBulletLevels)
silverBulletShortSL (series silverBulletLevels)
Returns: void
method invalidFVGcheck(FVGarr, upFVGpricesSorted, dnFVGpricesSorted)
check if existing FVGs are still valid
Namespace types: array
Parameters:
FVGarr (array)
upFVGpricesSorted (array) : an array of bullish FVG prices, used to selective search through FVG array to remove invalidated levels
dnFVGpricesSorted (array) : an array of bearish FVG prices, used to selective search through FVG array to remove invalidated levels
Returns: void (0)
method drawFVG(counter, FVGshow, FVGname, FVGcol, data, masterCoords, labelLevels, borderTransp, liteMode, rightCoordinate)
draws FVGs on last bar
Namespace types: map
Parameters:
counter (map) : a counter, as map, keeping count of the number of FVGs drawn, makes sure that there aren't more FVGs drawn
than int FVGshow
FVGshow (int) : the number of FVGs to show. There should be a bullish FVG show and bearish FVG show. This function "drawFVG" is used separately
for bearish FVG and bullish FVG.
FVGname (string) : the name of the FVG, "FVG Up" or "FVG Down"
FVGcol (color) : desired FVG color
data (FVG)
masterCoords (map) : a map containing the names and price points of key levels. Used to define price ranges.
labelLevels (string) : an input.string with options "Inside", "Outside", "Remove". Determines whether FVG labels should be inside box, outside,
or na.
borderTransp (int)
liteMode (bool)
rightCoordinate (int) : the right coordinate of any drawings. Must be a time point.
Returns: void
invalidBlockCheck(bullishOBbox, bearishOBbox, userTF)
check if existing order blocks are still valid
Parameters:
bullishOBbox (array) : an array declared using the UDT orderBlock that contains bullish order block related data
bearishOBbox (array) : an array declared using the UDT orderBlock that contains bearish order block related data
userTF (simple int)
Returns: void (0)
method lastBarRejections(id, rejectionColor, idShow, rejectionString, labelLevels, borderTransp, liteMode, rightCoordinate, masterCoords)
draws rejectionBlocks on last bar
Namespace types: array
Parameters:
id (array) : the array, an array of rejection block data declared using the UDT rejection block
rejectionColor (color) : the desired color of the rejection box
idShow (int)
rejectionString (string) : the desired name of the rejection blocks
labelLevels (string) : an input.string() to determine if labels for the block should be inside the box, outside, or none.
borderTransp (int)
liteMode (bool) : an input.bool(). True = neon effect, false = no neon.
rightCoordinate (int) : atime for the right coordinate of the box
masterCoords (map) : a map that stores the price of key levels and assigns them a name, used to determine price ranges
Returns: void
method OBdraw(id, OBshow, BBshow, OBcol, BBcol, bullishString, bearishString, isBullish, labelLevels, borderTransp, liteMode, rightCoordinate, masterCoords)
draws orderblocks and breaker blocks for data stored in UDT array()
Namespace types: array
Parameters:
id (array) : the array, an array of order block data declared using the UDT orderblock
OBshow (int) : the number of order blocks to show
BBshow (int) : the number of breaker blocks to show
OBcol (color) : color of order blocks
BBcol (color) : color of breaker blocks
bullishString (string) : the title of bullish blocks, which is a regular bullish orderblock or a bearish orderblock that's converted to breakerblock
bearishString (string) : the title of bearish blocks, which is a regular bearish orderblock or a bullish orderblock that's converted to breakerblock
isBullish (bool) : whether the array contains bullish orderblocks or bearish orderblocks. If bullish orderblocks,
the array will naturally contain bearish BB, and if bearish OB, the array will naturally contain bullish BB
labelLevels (string) : an input.string() to determine if labels for the block should be inside the box, outside, or none.
borderTransp (int)
liteMode (bool) : an input.bool(). True = neon effect, false = no neon.
rightCoordinate (int) : atime for the right coordinate of the box
masterCoords (map) : a map that stores the price of key levels and assigns them a name, used to determine price ranges
Returns: void
FVG
UDT for FVG calcualtions
Fields:
H (series float) : high price of user-selected timeframe
L (series float) : low price of user-selected timeframe
direction (series string) : FVG direction => "Up" or "Down"
T (series int) : => time of bar on user-selected timeframe where FVG was created
fvgLabel (series label) : optional label for FVG
fvgLineTop (series line) : optional line for top of FVG
fvgLineBot (series line) : optional line for bottom of FVG
fvgBox (series box) : optional box for FVG
labelLine
quickly pair a line and label together as UDT
Fields:
lin (series line) : Line you wish to pair with label
lab (series label) : Label you wish to pair with line
orderBlock
UDT for order block calculations
Fields:
orderBlockData (array) : array containing order block x and y points
orderBlockBox (series box) : optional order block box
vioCount (series int) : = 0 violation count of the order block. 0 = Order Block, 1 = Breaker Block
traded (series bool)
status (series string) : = "OB" status == "OB" => Level is order block. status == "BB" => Level is breaker block.
orderBlockLab (series label) : options label for the order block / breaker block.
strongPoints
UDT for strong highs and strong lows
Fields:
price (series float) : price of the strong high or strong low
timeAtprice (series int) : time of the strong high or strong low
strongPointLabel (series label) : optional label for strong point
strongPointLine (series line) : optional line for strong point
overlayLine (series line) : optional lines for strong point to enhance visibility
overlayLine2 (series line) : optional lines for strong point to enhance visibility
displacement
UDT for dispacements
Fields:
highPrice (series float) : high price of displacement
lowPrice (series float) : low price of displacement
timeAtPrice (series int) : time of bar where displacement occurred
displacementBox (series box) : optional box to draw displacement
displacementLab (series label) : optional label for displacement
po3data
UDT for po3 calculations
Fields:
dHigh (series float) : higher timeframe high price
dLow (series float) : higher timeframe low price
dOpen (series float) : higher timeframe open price
dClose (series float) : higher timeframe close price
po3box (series box) : box to draw po3 candle body
po3line (array) : line array to draw po3 wicks
po3Labels (array) : label array to label price points of po3 candle
macros
UDT for session macros
Fields:
sessions (array) : Array of sessions, you can populate this array using the "quickTime" function located above "export macros".
prices (matrix) : Matrix of session data -> open, high, low, close, time
sessionTimes (array) : Array of session names. Pairs with array sessions.
sessionLines (matrix) : Optional array for sesion drawings.
OTEtimes
UDT for data storage and drawings associated with OTE strategy
Fields:
upTimes (array) : time of highest point before trade is taken
dnTimes (array) : time of lowest point before trade is taken
tpLineLong (series line) : line to mark tp level long
tpLabelLong (series label) : label to mark tp level long
slLineLong (series line) : line to mark sl level long
slLabelLong (series label) : label to mark sl level long
tpLineShort (series line) : line to mark tp level short
tpLabelShort (series label) : label to mark tp level short
slLineShort (series line) : line to mark sl level short
slLabelShort (series label) : label to mark sl level short
sweeps
UDT for data storage and drawings associated with liquidity sweeps
Fields:
upSweeps (matrix) : matrix containing liquidity sweep price points and time points for up sweeps
dnSweeps (matrix) : matrix containing liquidity sweep price points and time points for down sweeps
upSweepDrawings (array) : optional up sweep box array. Pair the size of this array with the rows or columns,
dnSweepDrawings (array) : optional up sweep box array. Pair the size of this array with the rows or columns,
raidExitDrawings
UDT for drawings associated with the Liquidity Raid Strategy
Fields:
tpLine (series line) : tp line for the liquidity raid entry
tpLabel (series label) : tp label for the liquidity raid entry
slLine (series line) : sl line for the liquidity raid entry
slLabel (series label) : sl label for the liquidity raid entry
m2022
UDT for data storage and drawings associated with the Model 2022 Strategy
Fields:
mTime (series int) : time of the FVG where entry limit order is placed
mIndex (series int) : array index of FVG where entry limit order is placed. This requires an array of FVG data, which is defined above.
mEntryDistance (series float) : the distance of the FVG to the 50% range. M2022 looks for the fvg closest to 50% mark of range.
mEntry (series float) : the entry price for the most eligible fvg
fvgHigh (series float) : the high point of the eligible fvg
fvgLow (series float) : the low point of the eligible fvg
longFVGentryBox (series box) : long FVG box, used to draw the eligible FVG
shortFVGentryBox (series box) : short FVG box, used to draw the eligible FVG
line50P (series line) : line used to mark 50% of the range
line100P (series line) : line used to mark 100% (top) of the range
line0P (series line) : line used to mark 0% (bottom) of the range
label50P (series label) : label used to mark 50% of the range
label100P (series label) : label used to mark 100% (top) of the range
label0P (series label) : label used to mark 0% (bottom) of the range
sweepData (array)
silverBullet
UDT for data storage and drawings associated with the Silver Bullet Strategy
Fields:
session (series bool)
sessionStr (series string) : name of the session for silver bullet
sessionBias (series string)
sessionHigh (series float) : = high high of session // use math.max(silverBullet.sessionHigh, high)
sessionLow (series float) : = low low of session // use math.min(silverBullet.sessionLow, low)
sessionFVG (series float) : if applicable, the FVG created during the session
sessionFVGdraw (series box) : if applicable, draw the FVG created during the session
traded (series bool)
tp (series float) : tp of trade entered at the session FVG
sl (series float) : sl of trade entered at the session FVG
sessionDraw (series box) : optional draw session with box
sessionDrawLabel (series label) : optional label session with label
silverBulletDrawings
UDT for trade exit drawings associated with the Silver Bullet Strategy
Fields:
tpLine (series line) : tp line drawing for strategy
tpLabel (series label) : tp label drawing for strategy
slLine (series line) : sl line drawing for strategy
slLabel (series label) : sl label drawing for strategy
unicornModel
UDT for data storage and drawings associated with the Unicorn Model Strategy
Fields:
hPoint (chart.point)
hPoint2 (chart.point)
hPoint3 (chart.point)
breakerBlock (series box) : used to draw the breaker block required for the Unicorn Model
FVG (series box) : used to draw the FVG required for the Unicorn model
topBlock (series float) : price of top of breaker block, can be used to detail trade entry
botBlock (series float) : price of bottom of breaker block, can be used to detail trade entry
startBlock (series int) : start time of the breaker block, used to set the "left = " param for the box
includes (array) : used to store the time of the breaker block, or FVG, or the chart point sequence that setup the Unicorn Model.
entry (series float) : // eligible entry price, for longs"math.max(topBlock, FVG.get_top())",
tpLine (series line) : optional line to mark PT
tpLabel (series label) : optional label to mark PT
slLine (series line) : optional line to mark SL
slLabel (series label) : optional label to mark SL
rejectionBlocks
UDT for data storage and drawings associated with rejection blocks
Fields:
rejectionPoint (chart.point)
bodyPrice (series float) : candle body price closest to the rejection point, for "Up" rejections => math.max(open, close),
rejectionBox (series box) : optional box drawing of the rejection block
rejectionLabel (series label) : optional label for the rejection block
equalLevelsDraw
UDT for data storage and drawings associated with equal highs / equal lows
Fields:
connector (series line) : single line placed at the first high or low, y = avgerage of distinguished equal highs/lows
connectorLab (series label) : optional label to be placed at the highs or lows
levels (array) : array containing the equal highs or lows prices
times (array) : array containing the equal highs or lows individual times
startTime (series int) : the time of the first high or low that forms a sequence of equal highs or lows
radiate (array) : options label to "radiate" the label in connector lab. Can be used for anything
necessaryData
UDT for data storage of historical price points.
Fields:
highArr (array) : array containing historical high points
lowArr (array) : array containing historical low points
timeArr (array) : array containing historical time points
logArr (array) : array containing historical log returns
signArr (array) : array containing historical price directions
closeArr (array) : array containing historical close points
binaryTimeArr (array) : array containing historical time points, uses "push" instead of "unshift" to allow for binary search
binaryCloseArr (array) : array containing historical close points, uses "push" instead of "unshift" to allow the correct
binaryOpenArr (array) : array containing historical optn points, uses "push" instead of "unshift" to allow the correct
atrTFarr (array) : array containing historical user-selected TF atr points
openArr (array) : array containing historical open points
Opening Range and Market BoundariesOpening Range and Market Boundaries
This versatile and insightful indicator combines two powerful concepts frequently used by professional traders: Opening Range Analysis and Market Boundaries derived from previous high/low levels. It is specifically designed to support intraday trading strategies and helps you identify key price zones for entries, exits, and breakout confirmations.
🔍 Features & Utility
1. Opening Range Box
What it does:
Highlights the high and low of the first candle after market open (9:15 AM IST) with a shaded box. This box spans the full trading session, from 9:15 AM to 3:30 PM, representing the key price range where the initial balance is formed.
Timeframe Compatibility:
The Opening Range box is optimized for 1-minute to 1-hour charts. It is most effective on lower timeframes (1m, 5m, 15m, 30m) where intraday price movements and breakout patterns can be clearly observed.
Usage Tips:
Breakouts above or below the Opening Range box can signal potential directional bias for the rest of the trading day.
Price consolidating within the range may indicate a choppy or range-bound session.
Works well with volume and momentum indicators for confirmation.
2. Market Boundaries
What it does:
Plots horizontal lines at:
Previous Day High/Low
Previous Week High/Low
Previous Month High/Low
Why it matters:
These levels act as natural support and resistance zones, and are commonly watched by institutional traders, making them crucial for:
Spotting reversals or breakouts
Planning stop-loss and target zones
Avoiding trades around high-rejection areas
Customization Options:
Toggle ON/OFF for Daily, Weekly, and Monthly levels.
Independent colors and line thickness for each level, enabling you to distinguish between different timeframes easily.
🛠️ How to Use Effectively
Use during market open:
Switch to a 5-minute or 15-minute chart during the first few candles of the session. Observe the Opening Range box formation and plan trades based on breakout direction.
Confluence Trading:
Look for price action near previous session highs/lows in confluence with the Opening Range box edges. These intersections often become high-probability zones for breakouts or reversals.
Session Preparation:
Before the market opens, analyze where the price is relative to past high/low boundaries. If it's near a weekly/monthly level, be cautious — those areas can cause whipsaws or false breakouts.
Avoid low-volume breakouts:
Use this indicator in conjunction with volume tools or price action confirmation to validate the strength of a move outside the Opening Range or Market Boundaries.
📌 Summary
This indicator is designed for intraday traders, scalpers, and swing traders who want a reliable structure to guide their decisions. It visually marks the opening balance of the market and essential higher timeframe boundaries, helping you trade with discipline and precision.
BK AK-9I am incredibly proud to introduce my fourth indicator to the TradingView community:
BK AK-9 — a next-level momentum-volatility hybrid, built for traders who demand precision.
🔥 Why “AK-9”? The Meaning Behind the Name
This indicator is deeply personal to me.
The “AK” in the name represents the initials of my mentor — the man whose guidance shaped my journey in trading, discipline, and strategy.
His wisdom is woven into every line of code, every design choice, and every purpose behind this tool.
The “9” holds its own powerful meaning:
9 is the number of completion and breakthrough — the moment where preparation meets opportunity.
The AK-9 weapon itself is a suppressed variant of the legendary AK platform, built for stealth, precision, and maximum impact in close-quarters combat.
It’s quiet, adaptive, and deadly effective — just like this indicator cuts through market noise, adapts to volatility, and pinpoints moments of maximum opportunity.
✨ About the BK AK-9 Indicator
The BK AK-9 is not just an oscillator.
It’s a multi-layered trading weapon combining:
✅ RSI → Stochastic → Bollinger Bands on Stoch RSI → momentum measured inside volatility.
✅ Dynamic or Static Background Flash → when extremes hit, you get instant visual alerts.
✅ Color-coded %K zones →
🔴 Red: oversold
🟢 Green: overbought
🔵 Blue: neutral
✅ Volatility-adaptive bands → instead of relying on static levels, the bands expand and contract dynamically using standard deviation.
🛡️ Why This Indicator Matters
Pinpoints exhaustion zones statistically, not emotionally.
Confirms breakouts with volatility evidence, not just price action.
Filters noise and helps you wait for high-probability setups.
Gives you visual edge with color-coded momentum and background flash.
Perfect for:
🔹 Breakout traders confirming momentum surges.
🔹 Mean-reversion traders catching exhaustion pivots.
🔹 Swing traders using multi-layered momentum analysis.
🔹 Momentum traders hunting volatility-backed entries.
💥 How to Use BK AK-9
Breakout Confirmation → when Stoch RSI breaks above upper Bollinger Band (green zone, flash ON), ride the trend.
Mean Reversion Trades → when Stoch RSI drops below lower Bollinger Band (red zone, flash ON), look for reversals.
Noise Filtering → stay patient inside the blue zone, wait for extremes.
Advanced Sync → align it with Gann levels, harmonic patterns, Fibonacci clusters, or Elliott waves for maximum edge.
🙏 Final Thoughts
This isn’t just another tool — it’s a weapon in your trading arsenal.
🔹 Dedicated to my mentor, A.K., whose wisdom and legacy guide my work.
🔹 Designed around the number 9, the number of completion, transition, and breakthrough.
🔹 Built to help traders act with precision, discipline, and clarity.
But above all, I give praise and glory to Gd — the true source of wisdom, insight, and success.
Markets will test your patience and your skill, but faith tests your soul. Through every challenge, every victory, and every setback, Gd remains the constant.
This tool is simply another way to use the gifts He has given — to help others rise.
⚡ Stay Ready, Stay Sharp
The markets are a battlefield. But with the right tools, the right strategy, and the right mindset — you will always stay 10 steps ahead.
🔥 Stay locked. Stay loaded. Trade with precision. 🔥
Gd bless, and may He guide us all to wisdom and success. 🙏
Multiple (12) Strong Buy/Sell Signals + Momentum
Indicator Manual: "Multiple (12) Strong Buy/Sell Signals + Momentum"
This indicator is designed to identify strong buy and sell signals based on 12 configurable conditions, which include a variety of technical analysis methods such as trend-following indicators, pattern recognition, volume analysis, and momentum oscillators. It allows for customizable alerts and visual cues on the chart. The indicator helps traders spot potential entry and exit points by displaying buy and sell signals based on the selected conditions.
Key Observations:
• The script integrates multiple indicators and pattern recognition methods to provide comprehensive buy/sell signals.
• Trend-based indicators like EMAs and MACD are combined with pattern recognition (flags, triangles) and momentum-based signals (RSI, ADX, and volume analysis).
• User customization is a core feature, allowing adjustments to the conditions and thresholds for more tailored signals.
• The script is designed to be responsive to market conditions, with multiple conditions filtering out noise to generate reliable signals.
________________________________________
Key Features:
1. 12 Combined Buy/Sell Signal Conditions: This indicator incorporates a diverse set of conditions based on trend analysis, momentum, and price patterns.
2. Minimum Conditions Input: You can adjust the threshold of conditions that need to be met for the buy/sell signals to appear.
3. Alert Customization: Set alert thresholds for both buy and sell signals.
4. Dynamic Visualization: Buy and sell signals are shown as triangles on the chart, with momentum signals highlighted as circles.
________________________________________
Detailed Description of the 12 Conditions:
1. Exponential Moving Averages (EMA):
o Conditions: The indicator uses EMAs with periods 3, 8, and 13 for quick trend-following signals.
o Bullish Signal: EMA3 > EMA8 > EMA13 (Bullish stack).
o Bearish Signal: EMA3 < EMA8 < EMA13 (Bearish stack).
o Reversal Signal: The crossing over or under of these EMAs can signify trend reversals.
2. MACD (Moving Average Convergence Divergence):
o Fast MACD (2, 7, 3) is used to confirm trends quickly.
o Bullish Signal: When the MACD line crosses above the signal line.
o Bearish Signal: When the MACD line crosses below the signal line.
3. Donchian Channel:
o Tracks the highest high and lowest low over a given period (default 20).
o Breakout Signal: Price breaking above the upper band is bullish; breaking below the lower band is bearish.
4. VWAP (Volume-Weighted Average Price):
o Above VWAP: Bullish condition (price above VWAP).
o Below VWAP: Bearish condition (price below VWAP).
5. EMA Stacking & Reversal:
o Tracks the order of EMAs (3, 8, 13) to confirm strong trends and reversals.
o Bullish Reversal: EMA3 < EMA8 < EMA13 followed by a crossing to bullish.
o Bearish Reversal: EMA3 > EMA8 > EMA13 followed by a crossing to bearish.
6. Bull/Bear Flags:
o Bull Flag: Characterized by a strong price movement (flagpole) followed by a pullback and breakout.
o Bear Flag: Similar to Bull Flag but in the opposite direction.
7. Triangle Patterns (Ascending and Descending):
o Detects ascending and descending triangles using pivot highs and lows.
o Ascending Triangle: Higher lows and flat resistance.
o Descending Triangle: Lower highs and flat support.
8. Volume Sensitivity:
o Identifies price moves with significant volume increases.
o High Volume: When current volume is significantly above the moving average volume (set to 1.2x of the average).
9. Momentum Indicators:
o RSI (Relative Strength Index): Confirms overbought and oversold levels with thresholds set at 65 (overbought) and 35 (oversold).
o ADX (Average Directional Index): Confirms strong trends when ADX > 28.
o Momentum Up: Momentum is upward with strong volume and bullish RSI/ADX conditions.
o Momentum Down: Momentum is downward with strong volume and bearish RSI/ADX conditions.
10. Bollinger & Keltner Squeeze:
o Squeeze Condition: A contraction in both Bollinger Bands and Keltner Channels indicates low volatility, signaling a potential breakout.
o Squeeze Breakout: Price breaking above or below the squeeze bands.
11. 3 Consecutive Candles Condition:
o Bullish: Price rises for three consecutive candles with higher highs and lows.
o Bearish: Price falls for three consecutive candles with lower highs and lows.
12. Williams %R and Stochastic RSI:
o Williams %R: A momentum oscillator with signals when the line crosses certain levels.
o Stochastic RSI: Provides overbought/oversold levels with smoother signals.
o Combined Signals: You can choose whether to require both WPR and StochRSI to signal a buy/sell.
________________________________________
User Inputs (Inputs Tab):
1. Minimum Conditions for Buy/Sell:
o min_conditions: Number of conditions required to trigger a buy/sell signal on the chart (1 to 12).
o Alert_min_conditions: User-defined alert threshold (how many conditions must be met before an alert is triggered).
2. Donchian Channel Settings:
o Show Donchian: Toggle visibility of the Donchian channel.
o Donchian Length: The length of the Donchian Channel (default 20).
3. Bull/Bear Flag Settings:
o Bull Flag Flagpole Strength: ATR multiplier to define the strength of the flagpole.
o Bull Flag Pullback Length: Length of pullback for the bull flag pattern.
o Bull Flag EMA Length: EMA length used to confirm trend during bull flag pattern.
Similar settings exist for Bear Flag patterns.
4. Momentum Indicators:
o RSI Length: Period for calculating the RSI (default 9).
o RSI Overbought: Overbought threshold for the RSI (default 65).
o RSI Oversold: Oversold threshold for the RSI (default 35).
5. Bollinger/Keltner Squeeze Settings:
o Squeeze Width Threshold: The maximum width of the Bollinger and Keltner Bands for squeeze conditions.
6. Stochastic RSI Settings:
o Stochastic RSI Length: The period for calculating the Stochastic RSI.
7. WPR Settings:
o WPR Length: Period for calculating Williams %R (default 14).
________________________________________
User Inputs (Style Tab):
1. Signal Plotting:
o Control the display and colors of the buy/sell signals, momentum indicators, and pattern signals on the chart.
o Buy/Sell Signals: Can be customized with different colors and shapes (triangle up for buys, triangle down for sells).
o Momentum Signals: Custom circle placement for momentum-up or momentum-down signals.
2. Donchian Channel:
o Show Donchian: Toggle visibility of the Donchian upper, lower, and middle bands.
o Band Colors: Choose the color for each band (upper, lower, middle).
________________________________________
How to Use the Indicator:
1. Adjust Minimum Conditions: Set the minimum number of conditions that must be met for a signal to appear. For example, set it to 5 if you want only stronger signals.
2. Set Alert Threshold: Define the number of conditions needed to trigger an alert. This can be different from the minimum conditions for visual signals.
3. Customize Appearance: Modify the colors and styles of the signals to match your preferences.
________________________________________
Conclusion:
This comprehensive trading indicator uses a combination of trend-following, pattern recognition, and momentum-based conditions to help you spot potential buy and sell opportunities. By adjusting the input settings, you can fine-tune it to match your specific trading strategy, making it a versatile tool for different market conditions.
Signal Reliability Based on Condition Count
The reliability of the buy/sell signals increases as more conditions are met. Here's a breakdown of the probabilities:
1. 1-3 Conditions Met: Lower Probability
o Signals that meet only 1-3 conditions tend to have lower reliability and are considered less probable. These signals may represent false positives or weaker market movements, and traders should approach them with caution.
2. 4 Conditions Met: More Reliable Signal
o When 4 conditions are met, the signal becomes more reliable. This indicates that multiple indicators or market patterns are aligning, increasing the likelihood of a valid buy/sell opportunity. While not foolproof, it's a stronger indication that the market may be moving in a particular direction.
3. 5-6 Conditions Met: Strong Signal
o A signal meeting 5-6 conditions is considered a strong signal. This indicates a well-confirmed move, with several technical indicators and market factors aligning to suggest a higher probability of success. These are the signals that traders often prioritize.
4. 7+ Conditions Met: Rare and High-Confidence Signal
o Signals that meet 7 or more conditions are rare and should be considered high-confidence signals. These represent a significant alignment of multiple factors, and while they are less frequent, they are highly reliable when they do occur. Traders can be more confident in acting on these signals, but they should still monitor market conditions for confirmation.
________________________________________
You can adjust the number of conditions as needed, but this breakdown should give a clear structure on how the signal strength correlates with the number of conditions met!
Williams Fractals Dynamic Horizontal LinesWilliams Fractals with Dynamic Horizontal Lines
Overview
This script identifies Williams Fractals (support and resistance points) on any chart and automatically draws horizontal lines at those fractal levels.
The lines extend right and disappear when price breaks them — giving a clean and real-time view of key support and resistance levels.
Features
Detects upward fractals (potential resistances).
Detects downward fractals (potential supports).
Draws horizontal lines at each fractal point.
Automatically deletes a line when:
Price closes above a resistance.
Price closes below a support.
Clean and lightweight — minimal performance impact.
Inputs
Setting Description Default
Periods (n) Number of candles on each side required to confirm a fractal (minimum 2). 2
How It Works
Fractal Detection:
An up fractal is confirmed when a candle has the highest high compared to its neighbors.
A down fractal is confirmed when a candle has the lowest low compared to its neighbors.
Custom logic supports different "ties" — not just strict greater-than or less-than comparisons.
Drawing Lines:
When an up fractal is detected → a red horizontal resistance line is drawn.
When a down fractal is detected → a green horizontal support line is drawn.
Lines are drawn starting at the fractal candle and extend right across the chart.
Dynamic Line Deletion:
Every new candle is checked:
If high > resistance line → delete that resistance line.
If low < support line → delete that support line.
Only unbroken lines are kept on the chart, providing live, updated support/resistance zones.
Visual Elements
Up Fractal: 🡅 Triangular marker (teal color) above the fractal candle.
Down Fractal: 🡇 Triangular marker (red color) below the fractal candle.
Resistance Line: Red horizontal line.
Support Line: Green horizontal line.
Technical Details
Version: Pine Script v6
Arrays Used:
To store and manage active lines (line arrays).
To track the price associated with each line (float arrays).
Error Handling:
Backward iteration is handled using a while loop instead of a for loop to comply with Pine Script restrictions.
Offset Handling:
Fractal markers are plotted with an offset of -n bars for visual alignment.
Possible Enhancements (Future Ideas)
Sensitivity Settings: Allow a small margin (buffer) to define breakouts.
Extend Options: Let users choose between extending "infinite" or "limited" bars.
Custom Alerts: Generate alerts when fractal levels are broken.
Multi-timeframe Support: Detect fractals from higher timeframes on lower timeframe charts.
Example Usage
Swing Trading:
Use the fractal lines to identify and react to key breakouts or breakdowns dynamically.
Intraday Trading:
Spot live support/resistance on smaller timeframes for quick trades.
Trend Reversal Spotting:
Notice when a major fractal level is broken, possibly indicating trend changes.
Example Visual — Williams Fractals Dynamic Lines
Price Chart View:
What This Diagram Shows:
▲ Up Fractals:
Form resistance lines.
Line extends until price breaks above it.
▼ Down Fractals:
Form support lines.
Line extends until price breaks below it.
Lines are removed from the chart as soon as broken.
📈 Real Chart Example
Here's a rough idea how it will look live on your TradingView chart:
Feature Visual
Up Fractal 🔺 Green triangle above bar
Resistance Line ➖ Horizontal red line across the chart
Down Fractal 🔻 Red triangle below bar
Support Line ➖ Horizontal green line across the chart
Line Break 🚫 Line disappears when price crosses
Key Levels (4H and Daily)Key Levels (4H and Daily)
This indicator highlights important key price levels derived from the 4-hour (4H) and daily (D) timeframes, providing traders with critical support and resistance areas. The levels are calculated using the highest highs and lowest lows over a customizable lookback period, offering a dynamic view of significant price points that could influence market movement.
Key Features:
Key Levels for 4H and Daily Timeframes:
The indicator calculates and displays the highest high and lowest low over a user-defined period for both the 4-hour and daily timeframes. This helps traders identify key support and resistance levels that could dictate the market's behavior.
Customizable Lookback Period:
Traders can adjust the lookback period (in days) for both the 4-hour and daily timeframes to reflect different market conditions. This flexibility ensures the levels are tailored to your preferred trading style and market conditions.
Horizontal Lines:
The indicator plots horizontal lines at the high and low levels for both timeframes. These levels serve as dynamic support and resistance areas and help traders monitor price action near these critical points.
Real-Time Updates:
The lines adjust automatically with each new bar, providing up-to-date key levels based on the most recent price action and trading session.
Alert Conditions:
Alerts are built-in to notify traders when the price breaks above or below these key levels. Traders can set up notifications to stay informed when significant market moves occur.
How to Use:
Support and Resistance: Use the levels as potential support and resistance areas where price could reverse. Price often reacts at these levels, providing potential trading opportunities.
Breakouts: Pay attention to breakouts above the high or below the low of these levels. A break above the 4H or daily high could indicate bullish momentum, while a break below could signal bearish trends.
Trend Confirmation: Combine these levels with other technical analysis tools to confirm the overall market trend and enhance your trading strategy.
Perfect for:
Day Traders: Use the 4-hour levels for intraday trading setups, such as potential reversals or breakouts.
Swing Traders: The daily levels provide longer-term insights, helping to identify key zones where price might pause, reverse, or break out.
Market Context: Ideal for those who want to contextualize their trades within broader timeframes, helping to understand the market’s structure at multiple time scales.
This description conveys the utility and functionality of the indicator, focusing on how it helps traders identify and monitor key levels that influence market action.
Money Flow Pulse💸 In markets where volatility is cheap and structure is noisy, what matters most isn’t just the move — it’s the effort behind it. Money Flow Pulse (MFP) offers a compact, color-coded readout of real-time conviction by scoring volume-weighted price action on a five-tier scale. It doesn’t try to predict reversals or validate trends. Instead, it reveals the quality of the move in progress: is it fading , driving , exhausting , or hollow ?
🎨 MFP draws from the traditional Money Flow Index (MFI), a volume-enhanced momentum oscillator, but transforms it into a modular “pressure readout” that fits seamlessly into any structural overlay. Rather than oscillating between extremes with little interpretive guidance, MFP discretizes the flow into clean, color-coded regimes ranging from strong inflow (+2) to strong outflow (–2). The result is a responsive diagnostic layer that complements, rather than competes with, tools like ATR and/or On-Balance Volume.
5️⃣ MFP uses a normalized MFI value smoothed over 13 periods and classified into a 5-tier readout of Volume-Driven Conviction :
🍆 Exhaustion Inflow — usually a top or blowoff; not strength, but overdrive (+2)
🥝 Active Inflow — supportive of trend continuation (+1)
🍋 Neutral — chop, coil, or fakeouts (0)
🍑 Selling Intent — weakening structure, possible fade setups (-1)
🍆 Exhaustion Outflow — often signals forced selling or accumulation traps (-2)
🎭 These tiers are not arbitrary. Each one is tuned to reflect real capital behavior across timeframes. For instance, while +1 may support continuation, +2 often precedes exhaustion — especially on the lower timeframes. Similarly, a –1 reading during a pullback suggests sell-side pressure is building, but a shift to –2 may mean capitulation is already underway. The difference between the two can define whether a move is tradable continuation or strategic exhaustion .
🌊 The MFI ROC (Rate of Change) feature can be toggled to become a volatility-aware pulse monitor beneath the derived MFI tier. Instead of scoring direction or structure, ROC reveals how fast conviction is changing — not just where it’s headed, but how hard it's accelerating or decaying. It measures the raw Δ between the current and previous MFI values, exposing bursts of energy, fading pressure, or transitional churn .
🎢 Visually, ROC appears as a low-opacity area fill, anchored to a shared lemon-yellow zero line. When the green swell rises, buying pressure is accelerating; when the red drops, flow is actively deteriorating. A subtle bump may signal early interest — while a steep wave hints at an emotional overreaction. The ROC value itself provides numeric insight alongside the raw MFI score. A reading of +3.50 implies strong upside momentum in the flow — often supporting trend ignition. A score of –6.00 suggests rapid deceleration or full exhaustion — often preceding reversals or failed breakouts.
・ MFI shows you where the flow is
・ ROC tells you how it’s behaving
😎 This blend reveals not just structure or intent — but also urgency . And in flow-based trading, urgency often precedes outcome.
🧩 Divergence isn’t delay — it’s disagreement . One of the most revealing features of MFP is how it exposes momentum dissonance — situations where price and flow part ways. These divergences often front-run pivots , traps , or velocity stalls . Unlike RSI-style divergence, which whispers of exhaustion, MFI divergence signals a breakdown in conviction. The structure may extend — but the effort isn’t there.
・ Price ▲ MFI ▼ → Effortless Markup : Often signals distribution or a grind into liquidity. Without rising MFI, the rally lacks true flow participation — a warning of fragility.
・ Price ▼ MFI ▲ → Absorption or Early Accumulation : Price breaks down, but money keeps flowing in — a hidden bid. Watch for MFI tier shifts or ROC bursts to confirm a reversal.
🏄♂️ These moments don’t require signal overlays or setup hunting. MFP narrates the imbalance. When price breaks structure but flow does not — or vice versa — you’re not seeing trend, you’re seeing disagreement, and that's where edge begins.
💤 MFP is especially effective on intraday charts where volume dislocations matter most. On the 1H or 15m chart, it helps distinguish between breakouts with conviction versus those lacking flow. On higher timeframes, its resolution softens — it becomes more of a drift indicator than a trigger device. That’s by design: MFP prioritizes pulse, not position. It’s not the fire, it’s the heat.
📎 Use MFP in confluence with structural overlays to validate price behavior. A ribbon expansion with rising MFP is real. A compression breakout without +1 flow is "fishy". Watch how MFP behaves near key zones like anchored VWAP, MAs or accumulation pivots. When MFP rises into a +2 and fails to sustain, the reversal isn’t just technical — it’s flow-based.
🪟 MFP doesn’t speak loudly, but it never whispers without reason. It’s the pulse check before action — the breath of the move before the breakout. While it stays visually minimal on the chart, the true power is in the often overlooked Data Window, where traders can read and interpret the score in real time. Once internalized, these values give structure-aware traders a framework for conviction, continuation, or caution.
🛜 MFP doesn’t chase momentum — it confirms conviction. And in markets defined by noise, that signal isn’t just helpful — it’s foundational.
Market StructureMarket Structure Indicator
The Market Structure indicator for TradingView helps traders identify key price action patterns by detecting swing highs and lows, visualizing trend structures, and marking potential areas of interest. It works by analyzing market swings and breakouts based on user-defined settings, making it useful for traders who follow Smart Money Concepts (SMC), price action strategies, or structure-based trading approaches.
How It Works and features:
This indicator tracks market structure shifts by analyzing price swings and breakouts.
1. Swing Points & Market Structure Shifts
Swing Width: Defines how many candles must separate two swing points (default: 3).
Higher Timeframe Swing Width (HTF): If on a higher timeframe (15M+), the indicator uses a different swing width setting (default: 7).
Break Type (Wick vs. Body): Choose whether market structure breaks are based on wicks (more sensitive) or candle bodies (more conservative).
2. Structure Visualization
Labels & Colors for Extremes: Mark highest highs (H) and lowest lows (L) on the chart.
Custom Styles: Choose between triangles or circles to represent swing points.
Trend & Breaks Visualization
3. Session-Specific Analysis
Set Trading Sessions (EST time): The indicator allows users to analyze specific market sessions (default: 9:30-10:30 AM EST).
Session Background Highlighting: Highlights the session timeframe on the chart for better visibility.
Apply Body Breaks to Session Only: Limits structure shifts based on candle bodies only during a chosen session (useful for session-based scalping strategies).
4. Points of Interest (POI) & Order Flow Shifts (OFS)
Extreme POI Zones: Highlights key structure breaks where strong price action occurred.
Order Flow Shifts (OFS) Lines: Identifies supply/demand changes with customizable styles and colors.
POI Box Customization: Allows traders to visualize liquidity zones where price reacted strongly.
Who Is This For?
✅ Smart Money Concept (SMC) Traders – Helps track liquidity grabs and structural shifts.
✅ Price Action Traders – Makes it easier to spot swing points and trend shifts.
✅ Breakout & Reversal Traders – Highlights market structure breaks for entry confirmation.
✅ Scalpers & Session-Based Traders – Allows session-specific market structure analysis.
How to Use It?
1️⃣ Adjust Swing Width: Set a number of candles between swing points.
2️⃣ Choose Break Type: Select Wick (aggressive) or Body (conservative) break confirmation.
3️⃣ Enable Sub-Structure & OFS: Visualize minor trends and order flow shifts.
4️⃣ Set Session Filters: Highlight market structure only during key trading hours.
5️⃣ Monitor POI & Trend Labels: Look for breakouts and retests at major swing points.
Conclusion:
The Market Structure Indicator provides a clear visual representation of market trends, breakouts, and liquidity areas, making it a powerful tool for traders who rely on structure-based trading. With extensive customization options, it adapts to various trading styles and strategies. 🚀📈
Dynamic Support and Resistance ### Indicator: Dynamic Support and Resistance
#### Overview:
The *Dynamic Support and Resistance* indicator is a powerful tool designed to help traders identify key price levels on a chart. It dynamically calculates support and resistance levels based on pivot points and the Average True Range (ATR). The indicator also highlights broken support and resistance zones, providing visual cues for potential trend reversals or continuations.
---
### Key Features:
1. *Dynamic Support and Resistance Levels*:
- The indicator identifies support and resistance levels using pivot highs and lows within a user-defined range.
- These levels are adjusted using the ATR to account for market volatility, making them more responsive to changing market conditions.
2. *Support and Resistance Zones*:
- The indicator draws boxes around the support and resistance levels, with customizable colors and widths.
- The width of the zones is determined by the ATR and a user-defined multiplier, allowing traders to adjust the sensitivity of the zones.
3. *Broken Zones*:
- When price breaks through a support or resistance zone, the zone is highlighted with a distinct color to indicate a potential shift in market sentiment.
- Traders can limit the number of broken zones displayed on the chart to avoid clutter.
4. *Customizable Inputs*:
- *Range Candle Count*: Defines the number of candles analyzed to determine pivot points. Increasing this value will result in fewer but more significant levels, while decreasing it will produce more levels that are sensitive to shorter-term price movements.
- *ATR Period*: Controls the sensitivity of the ATR calculation. A shorter period makes the ATR more responsive to recent price changes, while a longer period smooths it out.
- *Box Width Multiplier*: Adjusts the width of the support and resistance zones. A higher multiplier creates wider zones, which may be useful in more volatile markets.
- *Max Broken Zones*: Limits the number of broken zones displayed on the chart. This helps keep the chart clean and focused on the most recent breaks.
---
### How It Works:
1. *Pivot Points*:
- The indicator identifies pivot highs and lows within the specified range. These pivots serve as the basis for calculating support and resistance levels.
2. *ATR Adjustment*:
- The ATR is used to adjust the support and resistance levels, making them more dynamic and responsive to market volatility.
3. *Zone Creation*:
- Support and resistance zones are drawn as boxes around the pivot levels. The width of these zones is determined by the ATR and the box width multiplier.
4. *Zone Breaks*:
- When price breaks through a zone, the zone is highlighted with a distinct color, and the broken zone is added to an array. If the number of broken zones exceeds the user-defined limit, the oldest broken zone is removed from the chart.
---
### How to Use:
1. *Trend Identification*:
- Use the support and resistance levels to identify key price levels where the market may reverse or consolidate.
- Broken zones can signal potential trend reversals or continuations.
2. *Entry and Exit Points*:
- Traders can use the support and resistance zones as potential entry or exit points. For example, buying near support or selling near resistance.
- Broken zones can be used as confirmation for breakout strategies.
3. *Risk Management*:
- The width of the zones can help traders set stop-loss levels. For example, placing a stop-loss just outside a support or resistance zone.
4. *Customization*:
- Adjust the input parameters to suit your trading style and the specific market conditions. For example, increase the range candle count for longer-term analysis or decrease it for shorter-term trading.
---
### Who Should Use This Indicator?
- *Swing Traders*: Can use the indicator to identify key levels for potential reversals or breakouts.
- *Day Traders*: Can benefit from the dynamic levels and zones, especially in volatile markets.
- *Position Traders*: Can use the indicator to identify long-term support and resistance levels.
- *Breakout Traders*: Can use the broken zones to confirm breakouts and plan their trades accordingly.
---
### Input Parameters and Their Effects:
1. *Range Candle Count*:
- *Increase*: Produces fewer but more significant levels, suitable for longer-term analysis.
- *Decrease*: Produces more levels, sensitive to shorter-term price movements.
2. *ATR Period*:
- *Increase*: Smoothens the ATR, making the levels less sensitive to recent price changes.
- *Decrease*: Makes the ATR more responsive to recent price changes, resulting in more dynamic levels.
3. *Box Width Multiplier*:
- *Increase*: Creates wider zones, suitable for more volatile markets.
- *Decrease*: Creates narrower zones, suitable for less volatile markets.
4. *Max Broken Zones*:
- *Increase*: Displays more broken zones on the chart, providing more historical context.
- *Decrease*: Keeps the chart clean by displaying only the most recent broken zones.
---
### Conclusion:
The *Dynamic Support and Resistance* indicator is a versatile tool that can be adapted to various trading styles and market conditions. By dynamically adjusting to market volatility and highlighting key price levels, it provides traders with valuable insights into potential support and resistance areas. Whether you're a swing trader, day trader, or position trader, this indicator can help you make more informed trading decisions.
---
### Publishing on TradingView:
- *Title*: Dynamic Support and Resistance
- *Description*: A dynamic support and resistance indicator that uses pivot points and ATR to identify key price levels. Includes customizable support/resistance zones and highlights broken zones for breakout trading.
- *Tags*: support, resistance, ATR, pivot points, breakout, trading, indicator
- *Access*: Public or Invite-only, depending on your preference.
This indicator is ready to be published on TradingView, and the detailed description above will help users understand its functionality and how to use it effectively.
15-Minute ORB by @RhinoTradezOverview
Hey traders, ready to jump on the morning breakout train? The 15-Minute ORB by @RhinoTradez
is your go-to pal for rocking the Opening Range Breakout (ORB) scene, zeroing in on the first 15 minutes of the U.S. market day—9:30 to 9:45 AM Eastern Time. Picture this: sleek orange lines mark the high and low of that opening rush, but they only hang out during regular trading hours (9:30 AM-4:00 PM ET) and reset fresh each day—no old baggage here! Built in Pine Script v6 for that cutting-edge feel, it’s loaded with breakout signals and alerts to keep your trading game strong—ideal for SPY, QQQ, or any ticker you love.
Crafted by @RhinoTradez
to fuel your daily grind—let’s hit those breakouts running!
What It Does
The ORB strategy is all about that early market spark: the 9:30-9:45 AM range sets the battlefield, and breakouts signal the charge. Here’s the rundown:
Captures the Range : Snags the high and low from the 9:30-9:45 AM ET candle—U.S. market kickoff, locked in.
Daily Refresh : Wipes yesterday’s lines at 9:30 AM ET each day—today’s all that matters.
Regular Hours Focus : Orange lines shine from 9:45 AM to 4:00 PM ET, vanishing outside those hours.
Breakout Signals : Green triangles for upside breaks, red for downside, all within regular hours.
Alerts You : Chimes in with “Price broke above 15-min ORB High: 597” (or below the low) when the move hits.
It’s your morning breakout blueprint—simple, focused, and trader-ready.
Functionality Breakdown:
15-Minute ORB Snap:
Locks the high and low of the 9:30-9:45 AM ET candle on a 15-minute chart (EST/EDT auto-adjusted).
Resets daily at 9:30 AM ET—yesterday’s range is outta here.
Regular Hours Only:
Lines glow from 9:45 AM to 4:00 PM ET, keeping pre-market and after-hours clean.
Breakout Flags:
Marks price busting above the ORB high (green triangle below bar) or below the low (red triangle above), only during 9:30 AM-4:00 PM.
Alert Action:
Drops a custom alert with the breakout price (e.g., “Price broke below 15-min ORB Low: 594”)—stay in the know, hands-free.
Customization Options
Keep it chill with one slick tweak:
ORB Line Color : Starts at orange—vibrant and trader-cool! Flip it to blue, purple, or any shade you dig in the settings. Make it yours.
How to Use It
Pop It On: Add it to a 15-minute chart—SPY, QQQ, or your hot pick works like a dream.
Time It Right: Set your chart to “America/New_York” time (Chart Settings > Time Zone) to sync with 9:30 AM ET.
Choose Your Color: Dive into the indicator settings and pick your ORB line color—orange kicks it off, but you’re in charge.
Set Alerts: Right-click the indicator, add an alert with “Any alert() function call,” and catch breakouts live.
Ride the Wave: Green triangle? Upward vibe. Red? Downside alert. Mix with volume or candles for extra punch.
Pro Tips
15-Minute Only : Tailored for that 9:30-9:45 AM ET candle—other timeframes won’t sync up.
Daily Reset : Lines refresh at 9:30 AM ET—always today’s play.
Breakout Boost : High volume or RSI can seal the deal on those triangle signals.
No Clutter : Lines stick to 9:30 AM-4:00 PM ET—your chart stays tidy.
Brought to you by @RhinoTradez
in Pine Script v6, this ORB script’s your morning breakout wingman. Slap it on, pick a color, and let’s chase those moves together! Happy trading!
Dual Keltner ChannelsDual Keltner Channels (DKC) Indicator 📊
🔹 About This Indicator
This indicator is an enhanced version of the original Keltner Channel available in TradingView. The Keltner Channel was initially designed as a volatility-based envelope around a moving average, helping traders identify trends, breakouts, and potential reversal zones.
💡 Original Creator: The Keltner Channel concept is based on the work of Chester W. Keltner and was later implemented in various trading platforms, including TradingView’s built-in Keltner Channel indicator.
This script builds upon the TradingView version of the Keltner Channel, adding:
✅ Dual Keltner Bands (Inner & Outer) for better trend and volatility analysis.
✅ Customizable Moving Averages (EMA/SMA) for flexibility.
✅ Multiple Band Calculation Methods (ATR, True Range, Range) for improved accuracy.
✅ Shaded Zones Between the Bands for enhanced visual clarity.
⚡ Credit: This indicator is an enhancement of the original Keltner Channel Indicator in TradingView. All improvements and modifications are made to provide deeper market insights while maintaining the core principles of the original Keltner concept.
🔹 Overview
The Dual Keltner Channels (DKC) indicator overlays two Keltner Channels on the price chart, helping traders spot trends, breakouts, and reversals with greater precision.
Inner Keltner Band (Multiplier 1): Captures normal price movements.
Outer Keltner Band (Multiplier 2): Highlights extreme price movements and potential breakouts.
🔹 Features & Inputs
📌 Main Inputs:
Keltner Channel Length: Defines the lookback period for the moving average calculation.
Source Price: Selects the price type (close, open, high, low) to calculate the bands.
Exponential Moving Average (EMA) Option: Choose between Exponential (EMA) or Simple (SMA) as the basis for calculations.
Bands Style: Selects how the volatility is measured:
Average True Range (ATR) (default)
True Range (TR)
Range (High - Low)
ATR Length: Determines the length of ATR calculations.
Enable Multiplier 1 & 2: Toggle to display/hide inner (multiplier 1) and outer (multiplier 2) bands.
📌 Keltner Channels Calculation:
Moving Average (MA): Uses either EMA or SMA for the midline.
Volatility Band Calculation:
Upper Band 1 (Inner Band): MA + (Multiplier 1 × Volatility Measure)
Lower Band 1 (Inner Band): MA - (Multiplier 1 × Volatility Measure)
Upper Band 2 (Outer Band): MA + (Multiplier 2 × Volatility Measure)
Lower Band 2 (Outer Band): MA - (Multiplier 2 × Volatility Measure)
📌 Visuals & Plotting:
Inner Bands (Multiplier 1): Blue upper & lower lines.
Outer Bands (Multiplier 2): Darker blue upper & lower lines.
Basis Line: White moving average.
Shaded Areas:
Between Upper 1 & Upper 2 (Light Brown Area): Identifies the upper Keltner region.
Between Lower 1 & Lower 2 (Light Brown Area): Identifies the lower Keltner region.
🔹 How to Use the Dual Keltner Channels Indicator
✅ 1. Trend Identification
Price above the upper outer band (Multiplier 2): Strong uptrend – potential continuation.
Price below the lower outer band (Multiplier 2): Strong downtrend – potential continuation.
Price within the inner bands (Multiplier 1): Sideways market – possible consolidation.
✅ 2. Breakout Trading
Break above outer upper band: Indicates a bullish breakout – consider long trades.
Break below outer lower band: Indicates a bearish breakdown – consider short trades.
✅ 3. Overbought & Oversold Conditions
Price touching/exceeding outer bands (Multiplier 2): Potential reversal zones.
Reversal confirmation: Look for candlestick patterns (e.g., Doji, Engulfing) or divergence signals.
✅ 4. Pullback & Entry Zones
Price bouncing from inner bands (Multiplier 1): Good re-entry point in trend direction.
Inner band as support/resistance: Helps in setting stop-loss and profit targets.
🔹 Effective Trading Strategies Using DKC
📌 1. Trend Following Strategy (Using Moving Average & Bands)
✅ Look for price staying above/below the basis line (MA) within the outer bands.
✅ Use pullbacks to the inner bands as re-entry points for trend continuation.
✅ Confirm trend strength with momentum indicators like RSI, MACD.
📌 2. Breakout Trading Strategy
✅ Identify a tight consolidation phase within the inner Keltner bands.
✅ Wait for a strong breakout beyond the outer bands.
✅ Enter long/short trades based on breakout direction.
✅ Place stop-loss at the previous inner band to manage risk.
📌 3. Reversal Strategy (Mean Reversion)
✅ When price extends beyond the outer band (Multiplier 2), look for reversal signals (candlestick patterns, RSI divergence).
✅ Enter counter-trend trades with tight stop-loss beyond the band.
✅ Target the moving average (basis line) as take-profit.
🔹 Final Thoughts 💡
The Dual Keltner Channels (DKC) is a powerful upgrade to the standard Keltner Channel, providing:
✅ Greater clarity on trend strength
✅ More precise breakout & reversal signals
✅ Better visual insights for dynamic market conditions
📌 Best Used With: RSI, MACD, Volume Profile, Price Action Signals.
📌 Works on: Stocks, Forex, Crypto, Commodities, Indices.
[TehThomas] - ICT Liquidity sweepsThe ICT Liquidity Sweeps Indicator is designed to track liquidity zones in the market areas where stop-losses and pending orders are typically clustered. This indicator marks buyside liquidity (resistance) and sellside liquidity (support), helping traders identify areas where price is likely to manipulate liquidity before making a significant move.
This tool is based on Inner Circle Trader (ICT) Smart Money Concepts, which emphasize how institutional traders, or “Smart Money,” manipulate liquidity to fuel price movements. By identifying these zones, traders can anticipate liquidity sweeps and position themselves accordingly.
⚙️ How It Works
1️⃣ Detects Key Liquidity Zones
The script automatically identifies significant swing highs and swing lows in price action using a pivot-based method.
A swing high (buyside liquidity) is a peak where price struggles to break higher, forming a resistance level.
A swing low (sellside liquidity) is a valley where price struggles to go lower, creating a support level.
These liquidity points are prime targets for liquidity sweeps before a true trend direction is confirmed.
2️⃣ Draws Liquidity Lines
Once a swing high or low is identified, a horizontal line is drawn at that level.
The lines extend to the right, serving as future liquidity targets until they are broken.
The indicator allows customization in terms of color, line width, and maximum number of liquidity lines displayed at once.
3️⃣ Handles Liquidity Sweeps
When price breaks a liquidity level, the indicator reacts based on the chosen action setting:
Dotted/Dashed: The line remains visible but changes style to indicate a sweep.
Delete: The line is completely removed once price has interacted with it.
This feature ensures that traders can easily spot where liquidity has been taken and determine whether a reversal or continuation is likely.
4️⃣ Prevents Chart Clutter
To maintain a clean chart, the script limits the number of liquidity lines displayed at any given time.
When new liquidity zones are formed, the oldest lines are automatically removed, keeping the focus on the most relevant liquidity zones.
🎯 How to Use the ICT Liquidity Sweeps Indicator
🔍 Identifying Liquidity Grabs
This indicator helps you identify areas where Smart Money is targeting liquidity before making a move.
Buyside Liquidity (BSL) Sweeps:
Occur when price spikes above a resistance level before reversing downward.
Indicate that Smart Money has hunted stop-losses and buy stops before driving price lower.
Sellside Liquidity (SSL) Sweeps:
Occur when price drops below a support level before reversing upward.
Indicate that Smart Money has collected liquidity from stop-losses and sell stops before pushing price higher.
📈 Combining with Market Structure Shifts (MSS)
One of the best ways to use this indicator is in conjunction with our Market Structure Shifts Indicator.
Liquidity sweeps + MSS Confirmation give strong high-probability trade setups:
Wait for a liquidity sweep (price takes out a liquidity level).
Look for an MSS in the opposite direction (e.g., price sweeps a high, then breaks a recent low).
Enter the trade in the new direction with stop-loss above/below the liquidity sweep.
📊 Entry & Exit Strategies
Long Trade Example:
Price sweeps a key sellside liquidity level (SSL) → creates a false breakdown.
MSS confirms a reversal (price breaks structure upwards).
Enter long position after confirmation.
Stop-loss below the liquidity grab to minimize risk.
Short Trade Example:
Price sweeps a key buyside liquidity level (BSL) → takes liquidity above resistance.
MSS confirms a bearish move (price breaks a key support level).
Enter short position after confirmation.
Stop-loss above the liquidity grab.
🚀 Why This Indicator is a Game-Changer
✅ Helps Identify Smart Money Manipulation – Understand where institutions are likely to grab liquidity before the real move happens.
✅ Enhances Market Structure Analysis – When paired with MSS, liquidity sweeps become powerful signals for trend reversals.
✅ Filters Out False Breakouts – Many traders get caught in liquidity grabs. This indicator helps avoid bad entries.
✅ Keeps Your Chart Clean – The auto-limiting feature ensures that only the most relevant liquidity levels remain visible.
✅ Works on Any Timeframe – Whether you’re a scalper, day trader, or swing trader, liquidity concepts apply universally.
📌 Final Thoughts
The ICT Liquidity Sweeps Indicator is a must-have tool for traders who follow Smart Money Concepts. By tracking liquidity levels and highlighting sweeps, it allows traders to enter trades with precision while avoiding false breakouts.
When combined with Market Structure Shifts (MSS), this strategy becomes even more powerful, offering traders an edge in spotting reversals and timing entries effectively.
__________________________________________
Thanks for your support!
If you found this idea helpful or learned something new, drop a like 👍 and leave a comment—I’d love to hear your thoughts! 🚀
Make sure to follow me for more price action insights, free indicators, and trading strategies. Let’s grow and trade smarter together! 📈✨
ORB with 100 EMAORB Trading Strategy for FX Pairs on the 30-Minute Time Frame
Overview
This Opening Range Breakout (ORB) strategy is designed for trading FX pairs on the 30-minute time frame. The strategy is structured to take advantage of price momentum while aligning trades with the overall trend using the 100-period Exponential Moving Average (100EMA). The primary objective is to enter trades when price breaks and closes above or below the Opening Range (OR), with additional confirmation from a retest of the OR level if the initial entry is missed.
Strategy Rules
1. Defining the Opening Range (OR)
- The OR is determined by the high and low of the first 30-minute candle after market open.
- This range acts as the key level for breakout trading.
2. Trend Confirmation Using the 100EMA
- The 100EMA serves as a filter to determine trade direction:
- Buy Setup: Only take buy trades when the OR is above the 100EMA.
- Sell Setup: Only take sell trades when the OR is below the 100EMA.
3. Entry Criteria
- Buy Trade: Enter a long position when a candle breaks and closes above the OR high, confirming the breakout.
- Sell Trade: Enter a short position when a candle breaks and closes below the OR low, confirming the breakout.
- Retest Entry: If the initial entry is missed, wait for a price retest of the OR level for a secondary entry opportunity.
4. Risk-to-Reward Ratio (R2R)
- The goal is to target a 1:1 Risk-to-Reward (R2R) ratio.
- Stop-loss placement:
- Buy Trade: Place stop-loss just below the OR low.
- Sell Trade: Place stop-loss just above the OR high.
- Take profit at a distance equal to the stop-loss for a 1:1 R2R.
5. Risk Management
- Risk per trade should be based on personal risk tolerance.
- Adjust lot sizes accordingly to maintain a controlled risk percentage of account balance.
- Avoid over-leveraging, and consider moving stop-loss to breakeven if the price moves favourably.
Additional Considerations
- Avoid trading during major news events that may cause high volatility and unpredictable price movements.
- Monitor market conditions to ensure breakout confirmation with strong momentum rather than false breakouts.
- Use additional confluences such as candlestick patterns, support/resistance zones, or volume analysis for stronger trade validation.
This ORB strategy is designed to provide structured trade opportunities by combining breakout momentum with trend confirmation via the 100EMA. The strategy is straightforward, allowing traders to capitalise on clear breakout movements while implementing effective risk management practices. While the 1:1 R2R target provides a balanced approach, traders should always adapt their risk tolerance and market conditions to optimise trade performance.
By following these rules and maintaining discipline, traders can use this strategy effectively across various FX pairs on the 30-minute time frame.
Simple Decesion Matrix Classification Algorithm [SS]Hello everyone,
It has been a while since I posted an indicator, so thought I would share this project I did for fun.
This indicator is an attempt to develop a pseudo Random Forest classification decision matrix model for Pinescript.
This is not a full, robust Random Forest model by any stretch of the imagination, but it is a good way to showcase how decision matrices can be applied to trading and within Pinescript.
As to not market this as something it is not, I am simply calling it the "Simple Decision Matrix Classification Algorithm". However, I have stolen most of the aspects of this machine learning algo from concepts of Random Forest modelling.
How it works:
With models like Support Vector Machines (SVM), Random Forest (RF) and Gradient Boosted Machine Learning (GBM), which are commonly used in Machine Learning Classification Tasks (MLCTs), this model operates similarity to the basic concepts shared amongst those modelling types. While it is not very similar to SVM, it is very similar to RF and GBM, in that it uses a "voting" system.
What do I mean by voting system?
How most classification MLAs work is by feeding an input dataset to an algorithm. The algorithm sorts this data, categorizes it, then introduces something called a confusion matrix (essentially sorting the data in no apparently order as to prevent over-fitting and introduce "confusion" to the algorithm to ensure that it is not just following a trend).
From there, the data is called upon based on current data inputs (so say we are using RSI and Z-Score, the current RSI and Z-Score is compared against other RSI's and Z-Scores that the model has saved). The model will process this information and each "tree" or "node" will vote. Then a cumulative overall vote is casted.
How does this MLA work?
This model accepts 2 independent variables. In order to keep things simple, this model was kept as a three node model. This means that there are 3 separate votes that go in to get the result. A vote is casted for each of the two independent variables and then a cumulative vote is casted for the overall verdict (the result of the model's prediction).
The model actually displays this system diagrammatically and it will likely be easier to understand if we look at the diagram to ground the example:
In the diagram, at the very top we have the classification variable that we are trying to predict. In this case, we are trying to predict whether there will be a breakout/breakdown outside of the normal ATR range (this is either yes or no question, hence a classification task).
So the question forms the basis of the input. The model will track at which points the ATR range is exceeded to the upside or downside, as well as the other variables that we wish to use to predict these exceedences. The ATR range forms the basis of all the data flowing into the model.
Then, at the second level, you will see we are using Z-Score and RSI to predict these breaks. The circle will change colour according to "feature importance". Feature importance basically just means that the indicator has a strong impact on the outcome. The stronger the importance, the more green it will be, the weaker, the more red it will be.
We can see both RSI and Z-Score are green and thus we can say they are strong options for predicting a breakout/breakdown.
So then we move down to the actual voting mechanisms. You will see the 2 pink boxes. These are the first lines of voting. What is happening here is the model is identifying the instances that are most similar and whether the classification task we have assigned (remember out ATR exceedance classifier) was either true or false based on RSI and Z-Score.
These are our 2 nodes. They both cast an individual vote. You will see in this case, both cast a vote of 1. The options are either 1 or 0. A vote of 1 means "Yes" or "Breakout likely".
However, this is not the only voting the model does. The model does one final vote based on the 2 votes. This is shown in the purple box. We can see the final vote and result at the end with the orange circle. It is 1 which means a range exceedance is anticipated and the most likely outcome.
The Data Table Component
The model has many moving parts. I have tried to represent the pivotal functions diagrammatically, but some other important aspects and background information must be obtained from the companion data table.
If we bring back our diagram from above:
We can see the data table to the left.
The data table contains 2 sections, one for each independent variable. In this case, our independent variables are RSI and Z-Score.
The data table will provide you with specifics about the independent variables, as well as about the model accuracy and outcome.
If we take a look at the first row, it simply indicates which independent variable it is looking at. If we go down to the next row where it reads "Weighted Impact", we can see a corresponding percent. The "weighted impact" is the amount of representation each independent variable has within the voting scheme. So in this case, we can see its pretty equal, 45% and 55%, This tells us that there is a slight higher representation of z-score than RSI but nothing to worry about.
If there was a major over-respresentation of greater than 30 or 40%, then the model would risk being skewed and voting too heavily in favour of 1 variable over the other.
If we move down from there we will see the next row reads "independent accuracy". The voting of each independent variable's accuracy is considered separately. This is one way we can determine feature importance, by seeing how well one feature augments the accuracy. In this case, we can see that RSI has the greatest importance, with an accuracy of around 87% at predicting breakouts. That makes sense as RSI is a momentum based oscillator.
Then if we move down one more, we will see what each independent feature (node) has voted for. In this case, both RSI and Z-Score voted for 1 (Breakout in our case).
You can weigh these in collaboration, but its always important to look at the final verdict of the model, which if we move down, we can see the "Model prediction" which is "Bullish".
If you are using the ATR breakout, the model cannot distinguish between "Bullish" or "Bearish", must that a "Breakout" is likely, either bearish or bullish. However, for the other classification tasks this model can do, the results are either Bullish or Bearish.
Using the Function:
Okay so now that all that technical stuff is out of the way, let's get into using the function. First of all this function innately provides you with 3 possible classification tasks. These include:
1. Predicting Red or Green Candle
2. Predicting Bullish / Bearish ATR
3. Predicting a Breakout from the ATR range
The possible independent variables include:
1. Stochastics,
2. MFI,
3. RSI,
4. Z-Score,
5. EMAs,
6. SMAs,
7. Volume
The model can only accept 2 independent variables, to operate within the computation time limits for pine execution.
Let's quickly go over what the numbers in the diagram mean:
The numbers being pointed at with the yellow arrows represent the cases the model is sorting and voting on. These are the most identical cases and are serving as the voting foundation for the model.
The numbers being pointed at with the pink candle is the voting results.
Extrapolating the functions (For Pine Developers:
So this is more of a feature application, so feel free to customize it to your liking and add additional inputs. But here are some key important considerations if you wish to apply this within your own code:
1. This is a BINARY classification task. The prediction must either be 0 or 1.
2. The function consists of 3 separate functions, the 2 first functions serve to build the confusion matrix and then the final "random_forest" function serves to perform the computations. You will need all 3 functions for implementation.
3. The model can only accept 2 independent variables.
I believe that is the function. Hopefully this wasn't too confusing, it is very statsy, but its a fun function for me! I use Random Forest excessively in R and always like to try to convert R things to Pinescript.
Hope you enjoy!
Safe trades everyone!
Eze Profit Range Detection FilterThe Range Detection Filter is a technical analysis tool designed to help traders identify range-bound market conditions and focus on breakout opportunities. It combines the ATR (Average True Range) for volatility analysis and the ADX (Average Directional Index) for trend strength evaluation to highlight consolidation phases and alert traders when the market is ready to break out.
This indicator provides visual cues and customizable alerts, making it suitable for traders looking to avoid false signals during choppy markets and capitalize on trending moves following a breakout.
What Makes It Unique?
ATR for Volatility:
Measures market volatility by comparing ATR with its moving average.
Consolidation phases are flagged when ATR remains below its moving average for a sustained period.
ADX for Trend Strength:
Monitors trend strength, confirming range-bound conditions when ADX falls below a user-defined threshold (default: 20).
Combines with ATR to ensure accurate detection of trendless periods.
Breakout Alerts:
Notifies traders of breakout opportunities when the price moves outside the highest high or lowest low of the range.
How It Works:
Range Detection:
The market is considered "in range" when:
ATR is below its moving average, indicating low volatility.
ADX is below the threshold, confirming a lack of trend strength.
Visual Indication:
A yellow background highlights range-bound conditions, allowing traders to avoid low-probability trades.
Breakout Detection:
Alerts are triggered for breakouts above or below the range to help traders identify potential opportunities.
Features:
Range Highlighting:
Automatically detects and highlights range-bound markets using a yellow background.
Breakout Alerts:
Sends alerts for breakouts above or below the range once the market exits consolidation.
Customizable Inputs:
ATR length, moving average length, and ADX parameters are fully adjustable to adapt to various trading styles and asset classes.
Multi-Timeframe Compatibility:
Suitable for all markets and timeframes, including stocks, forex, and cryptocurrencies.
How to Use:
Identify Ranges:
Avoid trading when the yellow background appears, signaling a range-bound market.
Focus on Breakouts:
Look for alerts indicating breakouts above or below the range for potential trending opportunities.
Combine with Other Indicators:
Use volume analysis, momentum oscillators, or candlestick patterns to confirm breakout signals.
Credits:
This script utilizes widely accepted methodologies for ATR and ADX calculations. ADX is calculated manually using directional movement (+DI and -DI) for precise trend detection. The concept has been adapted and enhanced to create this comprehensive range-detection tool.
Notes:
This indicator is intended for educational purposes and should not be used as standalone financial advice.
Always incorporate this tool into a broader trading strategy for optimal results.
Relative Measured Volatility (RMV) – Spot Tight Entry ZonesTitle: Relative Measured Volatility (RMV) – Spot Tight Entry Zones
Introduction
The Relative Measured Volatility (RMV) indicator is designed to highlight tight price consolidation zones , making it an ideal tool for traders seeking optimal entry points before potential breakouts. By focusing on tightness rather than general volatility, RMV offers traders a practical way to detect consolidation phases that often precede significant market moves.
How RMV Works
The RMV calculates short-term tightness by averaging three ATR (Average True Range) values over different lookback periods and then normalizing them within a specified lookback window. The result is a percentage-based scale from 0 to 100, indicating how tight the current price range is compared to recent history.
Here’s the breakdown:
Three ATR values are computed using user-defined short lookback periods to represent short-term price movements. An average of the ATRs provides a smoothed measure of current tightness. The RMV normalizes this average against the highest and lowest values over the defined lookback period, scaling it from 0 to 100.
This approach helps traders identify consolidation zones that are more likely to lead to breakouts.
Key Features of RMV
Multi-Period ATR Calculation : Uses three ATR values to effectively capture market tightness over the short term. Normalization : Converts the tightness measure to a 0-100 scale for easy interpretation. Dynamic Histogram and Background Colors : The RMV indicator uses a color-coded system for clarity.
How to Use the RMV Indicator
Identify Tight Consolidation Zones:
a - RMV values between 0-10 indicate very tight price ranges, making this the most optimal zone for potential entries before breakouts.
b - RMV values between 11-20 suggest moderate tightness, still favorable for entries.
Monitor Potential Breakout Areas:
As RMV moves from 21-30 , tightness reduces, signaling expanding volatility that may require wider stops or more flexible entry strategies.
Adjust Trading Strategies:
Use RMV values to identify tight zones for entering trades, especially in trending markets or at key support/resistance levels.
Customize the Indicator:
a - Adjust the short-term ATR lookback periods to control sensitivity.
b - Modify the lookback period to match your trading horizon, whether short-term or long-term.
Color-Coding Guide for RMV
ibb.co
How to Add RMV to Your Chart
Open your chart on TradingView.
Go to the “Indicators” section.
Search for "Relative Measured Volatility (RMV)" in the Community Scripts section.
Click on the indicator to add it to your chart.
Customize the input parameters to fit your trading strategy.
Input Parameters
Lookback Period : Defines the period over which tightness is measured and normalized.
Short-term ATR Lookbacks (1, 2, 3) : Control sensitivity to short-term tightness.
Histogram Threshold : Sets the threshold for differentiating between bright (tight) and dim (less tight) histogram colors.
Conclusion
The Relative Measured Volatility (RMV) is a versatile tool designed to help traders identify tight entry zones by focusing on market consolidation. By highlighting narrow price ranges, the RMV guides traders toward potential breakout setups while providing clear visual cues for better decision-making. Add RMV to your trading toolkit today and enhance your ability to identify optimal entry points!
ICT Master Suite [Trading IQ]Hello Traders!
We’re excited to introduce the ICT Master Suite by TradingIQ, a new tool designed to bring together several ICT concepts and strategies in one place.
The Purpose Behind the ICT Master Suite
There are a few challenges traders often face when using ICT-related indicators:
Many available indicators focus on one or two ICT methods, which can limit traders who apply a broader range of ICT related techniques on their charts.
There aren't many indicators for ICT strategy models, and we couldn't find ICT indicators that allow for testing the strategy models and setting alerts.
Many ICT related concepts exist in the public domain as indicators, not strategies! This makes it difficult to verify that the ICT concept has some utility in the market you're trading and if it's worth trading - it's difficult to know if it's working!
Some users might not have enough chart space to apply numerous ICT related indicators, which can be restrictive for those wanting to use multiple ICT techniques simultaneously.
The ICT Master Suite is designed to offer a comprehensive option for traders who want to apply a variety of ICT methods. By combining several ICT techniques and strategy models into one indicator, it helps users maximize their chart space while accessing multiple tools in a single slot.
Additionally, the ICT Master Suite was developed as a strategy . This means users can backtest various ICT strategy models - including deep backtesting. A primary goal of this indicator is to let traders decide for themselves what markets to trade ICT concepts in and give them the capability to figure out if the strategy models are worth trading!
What Makes the ICT Master Suite Different
There are many ICT-related indicators available on TradingView, each offering valuable insights. What the ICT Master Suite aims to do is bring together a wider selection of these techniques into one tool. This includes both key ICT methods and strategy models, allowing traders to test and activate strategies all within one indicator.
Features
The ICT Master Suite offers:
Multiple ICT strategy models, including the 2022 Strategy Model and Unicorn Model, which can be built, tested, and used for live trading.
Calculation and display of key price areas like Breaker Blocks, Rejection Blocks, Order Blocks, Fair Value Gaps, Equal Levels, and more.
The ability to set alerts based on these ICT strategies and key price areas.
A comprehensive, yet practical, all-inclusive ICT indicator for traders.
Customizable Timeframe - Calculate ICT concepts on off-chart timeframes
Unicorn Strategy Model
2022 Strategy Model
Liquidity Raid Strategy Model
OTE (Optimal Trade Entry) Strategy Model
Silver Bullet Strategy Model
Order blocks
Breaker blocks
Rejection blocks
FVG
Strong highs and lows
Displacements
Liquidity sweeps
Power of 3
ICT Macros
HTF previous bar high and low
Break of Structure indications
Market Structure Shift indications
Equal highs and lows
Swings highs and swing lows
Fibonacci TPs and SLs
Swing level TPs and SLs
Previous day high and low TPs and SLs
And much more! An ongoing project!
How To Use
Many traders will already be familiar with the ICT related concepts listed above, and will find using the ICT Master Suite quite intuitive!
Despite this, let's go over the features of the tool in-depth and how to use the tool!
The image above shows the ICT Master Suite with almost all techniques activated.
ICT 2022 Strategy Model
The ICT Master suite provides the ability to test, set alerts for, and live trade the ICT 2022 Strategy Model.
The image above shows an example of a long position being entered following a complete setup for the 2022 ICT model.
A liquidity sweep occurs prior to an upside breakout. During the upside breakout the model looks for the FVG that is nearest 50% of the setup range. A limit order is placed at this FVG for entry.
The target entry percentage for the range is customizable in the settings. For instance, you can select to enter at an FVG nearest 33% of the range, 20%, 66%, etc.
The profit target for the model generally uses the highest high of the range (100%) for longs and the lowest low of the range (100%) for shorts. Stop losses are generally set at 0% of the range.
The image above shows the short model in action!
Whether you decide to follow the 2022 model diligently or not, you can still set alerts when the entry condition is met.
ICT Unicorn Model
The image above shows an example of a long position being entered following a complete setup for the ICT Unicorn model.
A lower swing low followed by a higher swing high precedes the overlap of an FVG and breaker block formed during the sequence.
During the upside breakout the model looks for an FVG and breaker block that formed during the sequence and overlap each other. A limit order is placed at the nearest overlap point to current price.
The profit target for this example trade is set at the swing high and the stop loss at the swing low. However, both the profit target and stop loss for this model are configurable in the settings.
For Longs, the selectable profit targets are:
Swing High
Fib -0.5
Fib -1
Fib -2
For Longs, the selectable stop losses are:
Swing Low
Bottom of FVG or breaker block
The image above shows the short version of the Unicorn Model in action!
For Shorts, the selectable profit targets are:
Swing Low
Fib -0.5
Fib -1
Fib -2
For Shorts, the selectable stop losses are:
Swing High
Top of FVG or breaker block
The image above shows the profit target and stop loss options in the settings for the Unicorn Model.
Optimal Trade Entry (OTE) Model
The image above shows an example of a long position being entered following a complete setup for the OTE model.
Price retraces either 0.62, 0.705, or 0.79 of an upside move and a trade is entered.
The profit target for this example trade is set at the -0.5 fib level. This is also adjustable in the settings.
For Longs, the selectable profit targets are:
Swing High
Fib -0.5
Fib -1
Fib -2
The image above shows the short version of the OTE Model in action!
For Shorts, the selectable profit targets are:
Swing Low
Fib -0.5
Fib -1
Fib -2
Liquidity Raid Model
The image above shows an example of a long position being entered following a complete setup for the Liquidity Raid Modell.
The user must define the session in the settings (for this example it is 13:30-16:00 NY time).
During the session, the indicator will calculate the session high and session low. Following a “raid” of either the session high or session low (after the session has completed) the script will look for an entry at a recently formed breaker block.
If the session high is raided the script will look for short entries at a bearish breaker block. If the session low is raided the script will look for long entries at a bullish breaker block.
For Longs, the profit target options are:
Swing high
User inputted Lib level
For Longs, the stop loss options are:
Swing low
User inputted Lib level
Breaker block bottom
The image above shows the short version of the Liquidity Raid Model in action!
For Shorts, the profit target options are:
Swing Low
User inputted Lib level
For Shorts, the stop loss options are:
Swing High
User inputted Lib level
Breaker block top
Silver Bullet Model
The image above shows an example of a long position being entered following a complete setup for the Silver Bullet Modell.
During the session, the indicator will determine the higher timeframe bias. If the higher timeframe bias is bullish the strategy will look to enter long at an FVG that forms during the session. If the higher timeframe bias is bearish the indicator will look to enter short at an FVG that forms during the session.
For Longs, the profit target options are:
Nearest Swing High Above Entry
Previous Day High
For Longs, the stop loss options are:
Nearest Swing Low
Previous Day Low
The image above shows the short version of the Silver Bullet Model in action!
For Shorts, the profit target options are:
Nearest Swing Low Below Entry
Previous Day Low
For Shorts, the stop loss options are:
Nearest Swing High
Previous Day High
Order blocks
The image above shows indicator identifying and labeling order blocks.
The color of the order blocks, and how many should be shown, are configurable in the settings!
Breaker Blocks
The image above shows indicator identifying and labeling order blocks.
The color of the breaker blocks, and how many should be shown, are configurable in the settings!
Rejection Blocks
The image above shows indicator identifying and labeling rejection blocks.
The color of the rejection blocks, and how many should be shown, are configurable in the settings!
Fair Value Gaps
The image above shows indicator identifying and labeling fair value gaps.
The color of the fair value gaps, and how many should be shown, are configurable in the settings!
Additionally, you can select to only show fair values gaps that form after a liquidity sweep. Doing so reduces "noisy" FVGs and focuses on identifying FVGs that form after a significant trading event.
The image above shows the feature enabled. A fair value gap that occurred after a liquidity sweep is shown.
Market Structure
The image above shows the ICT Master Suite calculating market structure shots and break of structures!
The color of MSS and BoS, and whether they should be displayed, are configurable in the settings.
Displacements
The images above show indicator identifying and labeling displacements.
The color of the displacements, and how many should be shown, are configurable in the settings!
Equal Price Points
The image above shows the indicator identifying and labeling equal highs and equal lows.
The color of the equal levels, and how many should be shown, are configurable in the settings!
Previous Custom TF High/Low
The image above shows the ICT Master Suite calculating the high and low price for a user-defined timeframe. In this case the previous day’s high and low are calculated.
To illustrate the customizable timeframe function, the image above shows the indicator calculating the previous 4 hour high and low.
Liquidity Sweeps
The image above shows the indicator identifying a liquidity sweep prior to an upside breakout.
The image above shows the indicator identifying a liquidity sweep prior to a downside breakout.
The color and aggressiveness of liquidity sweep identification are adjustable in the settings!
Power Of Three
The image above shows the indicator calculating Po3 for two user-defined higher timeframes!
Macros
The image above shows the ICT Master Suite identifying the ICT macros!
ICT Macros are only displayable on the 5 minute timeframe or less.
Strategy Performance Table
In addition to a full-fledged TradingView backtest for any of the ICT strategy models the indicator offers, a quick-and-easy strategy table exists for the indicator!
The image above shows the strategy performance table in action.
Keep in mind that, because the ICT Master Suite is a strategy script, you can perform fully automatic backtests, deep backtests, easily add commission and portfolio balance and look at pertinent metrics for the ICT strategies you are testing!
Lite Mode
Traders who want the cleanest chart possible can toggle on “Lite Mode”!
In Lite Mode, any neon or “glow” like effects are removed and key levels are marked as strict border boxes. You can also select to remove box borders if that’s what you prefer!
Settings Used For Backtest
For the displayed backtest, a starting balance of $1000 USD was used. A commission of 0.02%, slippage of 2 ticks, a verify price for limit orders of 2 ticks, and 5% of capital investment per order.
A commission of 0.02% was used due to the backtested asset being a perpetual future contract for a crypto currency. The highest commission (lowest-tier VIP) for maker orders on many exchanges is 0.02%. All entered positions take place as maker orders and so do profit target exits. Stop orders exist as stop-market orders.
A slippage of 2 ticks was used to simulate more realistic stop-market orders. A verify limit order settings of 2 ticks was also used. Even though BTCUSDT.P on Binance is liquid, we just want the backtest to be on the safe side. Additionally, the backtest traded 100+ trades over the period. The higher the sample size the better; however, this example test can serve as a starting point for traders interested in ICT concepts.
Community Assistance And Feedback
Given the complexity and idiosyncratic applications of ICT concepts amongst its proponents, the ICT Master Suite’s built-in strategies and level identification methods might not align with everyone's interpretation.
That said, the best we can do is precisely define ICT strategy rules and concepts to a repeatable process, test, and apply them! Whether or not an ICT strategy is trading precisely how you would trade it, seeing the model in action, taking trades, and with performance statistics is immensely helpful in assessing predictive utility.
If you think we missed something, you notice a bug, have an idea for strategy model improvement, please let us know! The ICT Master Suite is an ongoing project that will, ideally, be shaped by the community.
A big thank you to the @PineCoders for their Time Library!
Thank you!