A program written by a beginner# TXF Choppy Market Detector (Whipsaw Filter)
## Introduction
This project is a technical indicator developed in **Pine Script v5**, specifically optimized for **Taiwan Index Futures (TXF)** intraday trading.
The TXF market is known for its frequent periods of low-volatility consolidation following sharp moves, often resulting in "whipsaws" (double-loss scenarios for trend followers). This script utilizes **volatility analysis** and **trend efficiency metrics** to filter out noise and detect potential "Stop Hunting" or "Liquidity Sweep" setups within range-bound markets.
## Methodology & Algorithms
The strategy operates on the principle of **Mean Reversion**, combining two core components:
### 1. Market Regime Filter: Choppiness Index (CHOP)
We use the Choppiness Index (originally developed by E.W. Dreiss) to determine if the market is trending or consolidating based on **Fractal Dimension** theory.
* **Logic**:
The index ranges from 0 to 100. Higher values indicate low trend efficiency (consolidation), while lower values indicate strong directional trends.
* **Condition**: `CHOP > Threshold` (Default: 50).
* **Application**: When this condition is met, the background turns **gray**, signaling a "No-Trade Zone" for trend strategies and activating the Mean Reversion logic.
### 2. Whipsaw Detection: Bollinger Bands
Bollinger Bands are used to define the dynamic statistical extremities of price action.
* **Logic**:
We identify **Fakeouts** (False Breakouts) that occur specifically during the choppy regime identified above. This is often where institutional traders hunt for liquidity (stops) before reversing the price.
#### Signal Algorithms (Pseudocode)
**A. Bull Trap (Washout High)**
A false upside breakout designed to trap long traders.
```pine
Condition:
1. Is_Choppy == true (Market is sideways)
2. High > Upper_Bollinger_Band (Price pierces the upper band)
3. Close < Upper_Bollinger_Band (Price fails to hold and closes back inside)
Chỉ báo và chiến lược
Composite Index [Auto Signals]Composite Index
Description (描述正文):
Overview This is an enhanced version of the famous Composite Index (CI) developed by Connie Brown. While the traditional RSI is confined between 0 and 100, often masking true momentum in strong trends, the Composite Index is uncapped and incorporates a momentum component to reveal the market's true structural strength.
I have engineered this script to include Automated Signal Markers based on the crossover of the Composite Index and its Slow Moving Average. This helps traders instantly identify momentum shifts and "Timing" entries/exits without manual guesswork.
Key Features
Uncapped Momentum: Unlike RSI, the CI can go anywhere, preventing the "flattening" effect seen in strong trending markets (e.g., TSLA, NVDA).
Automated Signals:
▲ Green Triangle (Launch): Triggers when the Gray CI line crosses ABOVE the Red Slow MA. This indicates bearish momentum is exhausted and bulls are regaining control.
▼ Red Triangle (Warning): Triggers when the Gray CI line crosses BELOW the Red Slow MA. This indicates bullish momentum is failing, serving as an early warning for exits or tightening stops.
Classic Formula: Uses the standard Connie Brown parameters (14, 9, 3) + SMA smoothing for reliable divergence detection.
How to Use This Indicator This script is best used as a companion to trend indicators like TTM Squeeze or Moving Average Ribbons.
For Entries (The "Dip Buy"): In an uptrend, wait for a pullback. When the Green Triangle (▲) appears, it confirms that the pullback is over and momentum has turned back up.
For Exits (The "Top"): Look for Divergence. If Price makes a Higher High but the Composite Index makes a Lower High—followed by a Red Triangle (▼)—this is a high-probability sell signal.
The "Slow MA" Filter: The signals are generated only when the CI crosses the Slow MA (Red Line). This filters out the noise of minor fluctuations (crossing the Green line) and focuses on significant momentum changes.
Settings
RSI Period: 14 (Default)
Momentum Period: 9 (Default)
Signal Logic: Crossover/Crossunder of the Slow MA (33 Period).
Disclaimer This tool is for educational purposes only. Always combine momentum signals with price action and structure analysis.
Triple Supertrend + EMA CrossoverCustomized 3 supertrend and EMA crossover which is helpful for identification of the trend.
Volume Weighted Average Price @Marx_CapitalSimple VWAP indicator edited to not connect the lines between sessions for a cleaner look without vertical lines at session ends.
Session end and start times are customizable.
llama fixed-length moving averages [SMA, WMA]Llama Moving Averages
I needed moving averages on my charts, but I wanted them hardcoded based on the following values:
timframe --- MA length
Daily --- 20D (==1 trading month)
Weekly --- 30W (30W moving averages for assessing long term trends)
15m --- 1W (or 5 days)
Two averages:
EMA and WMA: fast moving and slow moving based on closes.
In addition to this, I needed the following things:
1. MAs ONLY on 15m, 1D and 1W timeframes.
2. Consistent colors.
3. for 15m chart, we want a 5D SMA, so 1D = 15m * 25(±1); times 5; 25*5 = 125
4. Option to configure different values for the daily chart, since I trade the daily chart. Defaults: 20.
If you were looking for something similar, enjoy!
Global Net Liquidity w/offsetShows the value of Global Net Liquidity.
Currently defined as:
Fed + Japan + China + HK + UK + ECB - RRP - TGA
where the first six components are central bank assets.
This script has been heavily inspired by dharmatech 's Global Net Liquidity
Original script can be viewed here:
Special for this script:
Hong Kong assets added
Offset mode
Smooth vs stepped line in lower than 1D time frame
Switch between trillion USD or full number
Defaults to overlay mode when added to chart
For Bitcoin, 90 days, is a fitting offset.
For SPX, around 60-70 days, is a fitting offset.
AperonFx Pivot Points 1.1This indicator plots ATR-based pivot levels with a clean, institutional layout.
The central pivot (P) is calculated from the selected timeframe and price formula, while support and resistance levels are placed at equal distance steps above and below the pivot.
Users can choose between an automatic step based on ATR or a fixed price step for fully controlled, symmetric levels.
All levels are drawn as continuous segments that align precisely with the active pivot period.
Price annotations are displayed in a minimal, unobtrusive style and always match the exact level values.
The indicator is designed to remain consistent across chart timeframes without recalculation drift.
It is intended for traders who want clear, structured reference levels rather than reactive signals.
CVD Divergence Background By HKOverview This indicator visualizes Delta Divergences (also known as Absorption) directly on your main chart. It highlights candles where the price direction contradicts the underlying net volume flow (CVD). This is a powerful method to spot "traps," limit order absorption, and potential reversals.
How it Works The script calculates the Intrabar Volume Delta based on price action relative to the candle's range. It then compares this Delta with the candle's color (Open vs. Close).
Bearish Divergence (Absorption Top):
Scenario: The candle is GREEN (Price closed higher), but the Volume Delta is NEGATIVE (Net Selling).
Visual: Red Background.
Meaning: Sellers are aggressively absorbing the buying pressure via limit orders. Price struggled to rise despite the volume.
Bullish Divergence (Absorption Bottom):
Scenario: The candle is RED (Price closed lower), but the Volume Delta is POSITIVE (Net Buying).
Visual: Green Background.
Meaning: Buyers are aggressively absorbing the selling pressure via limit orders. Price struggled to fall despite the volume.
Features
Background Highlighting: Instantly spot divergences without checking a separate oscillator window.
Seamless Integration: Works perfectly behind your price candles and other indicators (like Big Trade detectors).
Customizable: You can adjust the colors and transparency to fit your chart theme.
Use Case Use this to identify exhausted moves. If you see a green candle with a red background at a resistance level, it suggests that buyers are running into a wall of sellers, increasing the probability of a reversal.
UIA TrendCompass V1.0UIA TrendCompass v1.0 is a market structure interpretation tool designed to visualize trend states in real time.
The script identifies four structural states based on price behavior and trend continuity:
• T — Trend Start
• E — Trend Extension
• H — Structural High / Low
• X — Trend Exit / Reversal
This indicator is intended for market structure analysis and educational purposes only.
It does NOT provide trading signals, buy/sell recommendations, or investment advice.
All labels are generated based on historical price data and do not predict future market movements.
Users should combine this tool with their own analysis and risk management framework.
This script is provided "as is" with no guarantee of accuracy or performance.
Double Cross Strategy - directional color plus golden crossCandle color changes to dark green when opening below 9/20 SMAs when 9 is below the 20 and closes above.
Candle color changes to dark red when opening above the 9/20 SMAs when the 9 is above the 20 and closes below.
Candle color changes to yellow when either of the above occurs plus crosses the vwap.
GC1 Orderflow Engine - sudoTLDR
This indicator measures relative buying and selling pressure by comparing GC1! futures returns against XAU price returns, normalized by their own volatility and weighted by GC1! volume. The result is a pressure histogram and line that show whether futures orderflow is leading, lagging, or diverging from spot gold in real time.
What this indicator does
The Orderflow Engine is designed to answer one core question:
Is GC1! futures orderflow applying net pressure in the same direction as XAU, or pushing against it?
It does this by isolating relative strength and weakness between futures and spot, rather than looking at price direction alone.
How the pressure calculation works
1. GC1! futures returns and XAU returns are calculated bar by bar
2. Each return is normalized by its own recent volatility
3. The normalized XAU return is subtracted from the normalized GC1! return
This creates a relative pressure value:
Positive pressure - GC1! futures are outperforming XAU
Negative pressure - GC1! futures are underperforming XAU
Near zero - futures and spot are moving in balance
To emphasize meaningful activity:
GC1! volume is converted into a normalized score
Higher-than-normal futures volume increases the weight of the pressure
Low-volume pressure is naturally dampened
The final output is clamped to keep the scale stable across different market conditions.
Visual output
Histogram
Green bars - positive futures pressure
Red bars - negative futures pressure
Gray bars - neutral or minimal pressure
Pressure line
A smoother view of the same pressure data
Useful for spotting momentum shifts and divergence
Zero line
Represents balance between futures and spot
Crosses often mark changes in orderflow control
Optional annotations
Regime shift markers based on futures participation
Optional percent-change labels for studying pressure acceleration
How to use it
-Confirm whether price moves are supported by futures orderflow
-Spot early divergence between GC1! and XAU
-Identify absorption , distribution , or initiative behavior
-Filter entries by trading only when pressure aligns with your bias
-This tool is best used as confirmation and context, not as a standalone signal generator.
Design philosophy
-Self-normalizing across sessions and volatility regimes
-No fixed thresholds that break over time
-Focused on relative behavior, not prediction
-Built to pair naturally with the Participation Regime indicator
Volume OscillatorDescription
The Volume Oscillator measures the momentum of trading volume by calculating the percentage difference between a fast and a slow Simple Moving Average (SMA) of daily volume. It helps traders identify periods of increasing or decreasing market participation, often signaling potential trend strength or exhaustion.
Key Features:
Adaptive to Trading Session:
Automatically adjusts SMA periods based on the actual trading session length (default: 8.5 hours for FTSEMIB, customizable for any market — e.g., 6.5h for US stocks, 24h for crypto).
Fast & Slow SMAs:
Compares a short-term SMA (default 10 days) with a longer-term SMA (default 25 days) of volume.
Oscillator Formula:
100 × (Fast SMA / Slow SMA - 1)
→ Positive values = increasing volume momentum (bullish)
→ Negative values = decreasing volume momentum (bearish)
Signal Line (optional):
A moving average of the oscillator (default 7 days) for smoother trend identification and crossover signals.
Overbought/Oversold Levels:
User-defined horizontal lines (default +40 / -40) to highlight extreme volume conditions.
Customizable Colors:
Change the oscillator and signal line colors to match your chart style.
How to Interpret:
Bullish Conditions:
Oscillator crosses above the zero line
Oscillator crosses above the signal line
Readings near or above +40 may indicate strong buying pressure (watch for possible exhaustion if too extreme)
Bearish Conditions:
Oscillator crosses below the zero line
Oscillator crosses below the signal line
Readings near or below -40 may indicate selling pressure or capitulation
Divergences:
Look for divergences between price and the Volume Oscillator (e.g., price makes new highs but oscillator fails to confirm with higher highs) — a classic sign of weakening momentum.
Best Use Cases:
Indices (FTSEMIB, DAX, CAC, SPX, etc.), stocks and futures with defined trading hours, crypto (set session duration to 24 hours).
Works well on intraday (e.g., 15m, 30m, 1h) and daily charts.
Customization Tips:
- Shorten fast/slow lengths for faster signals (more noise)
- Lengthen them for smoother, longer-term analysis
- Adjust session duration for non-standard market hours
- Enable/disable the signal line in the settings
Note: Volume data quality can vary by symbol and exchange. Always combine this indicator with price action and other tools. Use proper risk management.
Besho SetupThe Moving Averages (The Colored Lines) These three lines are the backbone of this system. They are perfectly aligned for a bullish trend (Yellow > Green > Red) and act as protective shields for the price:
The Red Line (at the bottom): This is the "General Trend Line," typically the EMA 200 (200-period Exponential Moving Average).
Function: It separates the uptrend from the downtrend. As long as the price remains well above it, the trend is strongly "bullish." Notice that the price is very far from it, indicating strong momentum.
The Green Line (in the middle): This is the "Intermediate Support Line," typically the EMA 50 or EMA 100.
Function: It acts as a bounce zone (Dynamic Support) during deep corrections. The price is shown to respect this level well in the image.
The Yellow Line (closest to the price): This is the "Fast Momentum Line," typically the EMA 20 or EMA 21.
Function: It is used for quick entries and exits. As long as the candles are closing above it, the bullish wave is sharp and continuous.
Momentum & Breakout Confirmationwatch momentum build in real time on the current candle so you can confirm weather a breakout is indeed a breakout or will be a fake out. This is what it does
This is a Momentum & Breakout Confirmation (MBC) indicator that analyzes the current candle in real-time to determine if it's a strong continuation move or possible reversal. Here's the breakdown:
What It Measures:
Momentum Strength - How much % the candle moved:
STRONG = >0.5% move
MEDIUM = 0.2-0.5%
WEAK = <0.2%
Direction - Simply bullish (green candle) or bearish (red candle)
Four Confirmation Factors:
Volume Surge - Is volume 1.5x above the 20-period average?
Move Size - Is the candle body larger than 0.5x ATR (significant)?
Body Strength - Is the body >60% of total candle range (strong conviction, minimal wicks)?
Trend Aligned - Does it align with 9/21 MA trend direction?
The Scoring System:
Adds 1 point for each confirmation factor met (max 4 points)
3-4 points = "STRONG CONTINUATION" 🚀
2 points = "LIKELY CONTINUATION"
1 point = "WEAK SIGNAL"
0 points = "POSSIBLE REVERSAL" ⚠️
Key Difference from TPC:
TPC uses multi-timeframe SuperTrend for strategic entries
MBC focuses on the current candle only - it's asking "Is THIS candle showing real momentum or is it weak/fake?"
Practical Use:
Great for confirming if a breakout or move is "real" with strong conviction behind it, or if it's low-volume/weak-bodied and likely to fail. The table updates live so you can watch momentum build during the candle formation.
Hope it helps. if you guys have any ideas for any indicators you want made please feel free to dm me as i like a good challenge lol ill sit here and try to code anything now im not saying i will be 100 percent successful but i will try for you, thanks for all the support from all you guys i def do appreciate it.
Absorption DetectorSource: Prof Michael G.
Credit: GreatestUsername for the coding & implementation.
Zones of Support and Resistance can feel like drawing boxes on the chart. This indicator to help spot areas of possible reversal. It uses Volume Confirmation and Body-to-Wick Ratio to do this and defined as:
1. Volume Confirmation
High Volume: A candle that absorbs sitting limit orders is often accompanied with higher than average volume. The indicator define this type of candle if it has a volume is greater than 250%/350% of the average volume over the last 10 candles.
2. Body-to-Wick Ratio
Body vs. Wick: A candle with a small body and large wicks can indicate higher probability of reversal. You can define an absorption candle if the body of the candle is less than 50% of the total range (high-low).
These settings are also customizable to your own desired settings and should be used as a visual aid.
Midnight Opening RangeThis script uses the SMC/ICT midnight opening range to gain insight into the daily highs and lows.
It plots the opening range quadrants and the 0.5 and 1 standard deviations higher and lower.
These levels are often used as support/resistance at certain times of the day.
To be used in concert with other PD arrays.
Triple EMA// Triple EMA indicator designed for TradingView free users.
// Displays 3 standard EMAs in one indicator slot.
Monthly High/Low - [JTCAPITAL]Monthly High/Low Probability Table - is a modified way to use historical monthly high and low tracking combined with probabilistic analysis for bullish and bearish months to detect potential patterns in monthly price behavior.
The indicator works by calculating in the following steps:
Variable Declaration
Persistent variables ( var ) are used to store monthly highs, lows, open and close prices, and the days on which highs and lows occurred. Separate arrays track bullish and bearish month statistics for highs and lows ( highBull, lowBull, highBear, lowBear ). Counters ( bullCount, bearCount ) store the number of bullish and bearish months recorded.
New Month Detection
The script detects the start of a new month by comparing the current bar’s month to the previous bar’s month. If a new month is detected, the script proceeds to update statistics for the previous month.
Monthly High/Low Recording and Classification
At the start of each new month, the previous month’s high, low, open, and close are evaluated:
If monthClose > monthOpen , the month is classified as bullish.
If monthClose < monthOpen , the month is classified as bearish.
The arrays ( highBull, lowBull, highBear, lowBear ) are updated at the respective high and low days of the month by incrementing counts, which allows the script to keep track of the frequency of monthly highs and lows occurring on specific days.
Monthly High/Low Tracking
During the month, the script continuously updates monthHigh and monthLow if the current bar’s high exceeds monthHigh or the low is below monthLow . The days on which these highs and lows occur are recorded ( highDay and lowDay ). The monthClose variable is continuously updated to the latest closing price.
Probability Calculation
Once monthly data is accumulated, the script calculates probabilities for each day of the month:
bullHighProb and bullLowProb represent the probability (in percentage) that a bullish month’s high or low occurred on a given day.
bearHighProb and bearLowProb represent the probability for bearish months.
These probabilities are calculated by dividing the count of high or low occurrences on each day by the total number of bullish or bearish months, then multiplying by 100. This probabilistic approach allows traders to see recurring patterns for highs and lows across multiple months.
Gradient Coloring Function
The helper function gradientRelative computes a color gradient between lowColor and highColor based on the relative probability value. Higher probabilities are colored closer to highColor , and lower probabilities closer to lowColor . This visual representation allows for quick identification of the most probable days for highs and lows in bullish or bearish months.
Dynamic Updates
As new bars are processed, the table is updated in real-time with new probabilities reflecting the most recent month’s data. This dynamic behavior ensures that the table remains accurate and responsive to the latest market information.
Buy and Sell Conditions:
This indicator does not provide direct buy or sell signals. Instead, it provides probabilistic information about historical patterns for bullish and bearish months. Traders can use the table to:
Identify days in the month where highs or lows are statistically more likely to occur.
Combine with other trend-following or reversal strategies to optimize entry and exit points.
For example, if a trader notices that bullish month highs frequently occur around day 15, they may plan trades around that period when other indicators align.
Features and Parameters:
Dynamic Probability Table : Updates in real-time as new monthly data becomes available.
Historical Pattern Tracking : Maintains arrays for highs and lows in bullish and bearish months.
Gradient Visualization : Uses color interpolation to quickly highlight higher probability days.
Specifications:
Monthly High/Low Tracking
Tracks the highest and lowest prices within each month. This is the foundation of the probability calculations. It allows traders to understand when significant price events historically occur.
Bullish/Bearish Month Classification
Each month is classified based on the relationship between monthClose and monthOpen . This provides context for the high/low occurrences: whether they happened in bullish or bearish months.
High/Low Occurrence Arrays
Four arrays ( highBull, lowBull, highBear, lowBear ) store the count of high and low occurrences for each day of the month. These arrays are the core of the statistical analysis.
Probability Calculation
Divides the count of occurrences for each day by the total number of months in that category (bullish/bearish). Multiplying by 100 converts this to a percentage probability, giving traders a numerical sense of recurrence.
Real-Time Updates
The table and probabilities are recalculated and refreshed with each new bar. This ensures that traders have the most current information available without manual recalculation.
User-Centric Visualization
By showing probabilities for both bullish and bearish months separately, traders gain a deeper understanding of market tendencies and recurring monthly patterns, which can be leveraged for improved timing and strategy alignment.
Important:
There is a misalign in percentages due to not all months having the same amount of days.
Custom Reversal Oscillator [wjdtks255]📊 Indicator Overview: Custom Reversal Oscillator
This indicator is a momentum-based oscillator designed to identify potential trend reversals by analyzing price velocity and relative strength. It visualizes market exhaustion and recovery through a dynamic histogram and signal dots, similar to premium institutional tools.
Key Components
Dynamic Histogram (Bottom Bars): Changes color based on momentum strength. Bright Green/Red indicates accelerating momentum, while Darker shades suggest fading strength.
Signal Line: A white line tracing the core momentum, helping to visualize the "wave" of the market.
Buy/Sell Dots: Small circles at the bottom (Mint) or top (Red) that signal high-probability reversal points when the market is overextended.
📈 Trading Strategy (How to Trade)
1. Long Entry (Buy Signal)
Condition 1: The price should ideally be near or above the 200 EMA (for trend following) or showing a Bullish Divergence.
Condition 2: The Histogram bars transition from Dark Red to Bright Green.
Condition 3: A Mint Buy Dot appears at the bottom of the oscillator (near the -25 level).
Entry: Enter on the close of the candle where the Buy Dot is confirmed.
2. Short Entry (Sell Signal)
Condition 1: The price is struggling at resistance or showing a Bearish Divergence.
Condition 2: The Histogram bars transition from Dark Green to Bright Red.
Condition 3: A Red Sell Dot appears at the top of the oscillator (near the +25 level).
Entry: Enter on the close of the candle where the Sell Dot is confirmed.
3. Exit & Take Profit
Take Profit: Close the position when the Signal Line reaches the opposite extreme or when the histogram color starts to fade (loses its brightness).
Stop Loss: Place your stop loss slightly below the recent swing low (for Longs) or above the recent swing high (for Shorts).
💡 Pro Tips for Accuracy
Watch for Divergences: The most powerful signals occur when the price makes a lower low, but the Custom Reversal Oscillator makes a higher low. This indicates "Hidden Strength" and a massive reversal is often imminent.
MACD Divergences + RSI/ADXMACD Divergences + RSI/ADX Indicator
This indicator combines the classic MACD divergence detection with real-time RSI and ADX monitoring in fixed corner labels.
🔹 MAIN FEATURES:
- Automatic MACD divergence detection (Classic & Hidden)
- Visual RSI and ADX labels fixed in the right corner
- Color-coded trend direction (Green: DI+ > DI- | Red: DI- > DI+)
- Customizable MACD settings (Fast/Slow Length, Signal Smoothing)
- Configurable RSI and ADX periods
- Built-in alerts for all divergence types
🔹 DIVERGENCE TYPES:
- Classic Bullish: Price makes lower lows, MACD makes higher lows (Reversal signal)
- Classic Bearish: Price makes higher highs, MACD makes lower highs (Reversal signal)
- Hidden Bullish: Price makes higher lows, MACD makes lower lows (Continuation signal)
- Hidden Bearish: Price makes lower highs, MACD makes higher highs (Continuation signal)
🔹 RSI & ADX DISPLAY:
- Fixed labels in top-right (RSI) and bottom-right (ADX) corners
- Real-time values updated on every bar
- Background color changes based on directional movement (DI+ vs DI-)
- Large, easy-to-read format
🔹 HOW TO USE:
1. Watch for divergence patterns on MACD histogram
2. Monitor RSI for overbought/oversold conditions
3. Check ADX for trend strength (>25 = strong trend)
4. Green labels = Bullish momentum (DI+ > DI-)
5. Red labels = Bearish momentum (DI- > DI+)
🔹 BEST FOR:
- Swing trading on 4H and Daily timeframes
- Trend-following strategies with mo






















