Pine Script® indicator
Chart patterns
MTGCThis tool allows you to easily monitor higher timeframe candlesticks while trading on lower timeframes.
這是一個讓你在低時框級別時方便觀察其他更高時間機別K棒的工具。
This indicator was developed as a personal project to help users observe market trends more conveniently during analysis.
這個指標僅是個人興趣下所生產出的產物,目的是輔助使用者在分析時可以更方便觀察。
If you encounter bugs such as overlapping candles or delayed updates, simply toggle the visibility off and on to fix them. A permanent fix is currently in progress.
如遇到K棒重疊或是沒有即時更新之類的BUG,請切換顯示隱藏即可修正錯誤,這個問題還在修正中。
Pine Script® indicator
SMT DivergencePlots "SMT Divergence" labels.
Mouse over the label to display additional information.
Pine Script® indicator
8-Year Cycle 8-Year Cycle Indicator — Description
Overview:
The 8-Year Cycle Indicator visually highlights repeating 8-year macro cycles on a chart, commonly used for gold, miners, or other long-term assets. It helps traders and investors understand early, mid, and late phases of each cycle to better plan positioning and risk management.
Features:
Each cycle is 8 years long by default.
Each year in the cycle can be assigned a custom color for granular visualization.
The last 4 years of a cycle can optionally be highlighted to indicate the late-cycle phase, historically associated with peaks and higher volatility.
Vertical lines mark the start of each cycle.
Labels display the full cycle period (e.g., 1981–1988).
Background shading per year makes it easy to distinguish early, mid, and late cycle stages.
Use Cases:
Identifying accumulation and topping periods in gold or related assets.
Understanding long-term macro trends.
Providing visual context for risk management in multi-year cycles.
Complementing other technical or macro indicators for strategic positioning.
Pine Script® indicator
HTF SMT in LTF [Tradeisto]Version 1.0.0
This marks the first official release of the HTF SMT in LTF indicator. This tool has been engineered to provide high-precision Smart Money Technique (SMT) divergence detection across multiple timeframes with a focus on real-time accuracy and visual clarity.
Primary Features
Time-Sync Execution: The indicator utilizes a master-clock architecture to synchronize secondary ticker price data with the exact timestamp of main ticker pivots. This ensures that divergences are calculated based on identical moments in time, eliminating the false signals common in standard SMT scripts.
8-Slot Multi-Timeframe Support: Integrated monitoring for the current chart timeframe plus 7 additional higher timeframe (HTF) slots. Each slot is independently toggleable and customizable.
Anticipatory SMT Discovery: Implemented a live detection layer that plots dotted lines as soon as a potential divergence forms. This allows for tactical anticipation of market turns before a pivot is mathematically confirmed.
Real-Time Invalidation: Live anticipatory lines are monitored continuously and will automatically be removed if price action breaks the divergence criteria before the candle close.
Higher Timeframe Priority: Built-in overlap prevention automatically filters redundant signals. When multiple timeframes trigger at the same price level, the higher timeframe is given visual priority to maintain chart cleanliness.
Wick-to-Wick Alignment: Advanced time-mapping ensures that higher timeframe SMT lines are drawn with absolute precision across the high and low wicks of lower timeframe charts.
Pre-Configured Defaults
90-Minute Focus: HTF Slot 7 is enabled by default and pre-set to the 90-minute timeframe for specialized intraday analysis.
Optimized UI: The indicator header remains uncluttered by omitting the shorttitle parameter.
Technical Implementation
Custom Type Architecture: The script uses advanced Pine Script v5 types for efficient state management and data storage.
Dynamic Requests: Optimized for performance using TradingView's dynamic request engine to handle multiple ticker inputs simultaneously.
Timestamp Uniqueness: Pivot identification is handled via Unix timestamps to correctly differentiate and process Double Tops and Double Bottoms.
Pine Script® indicator
Minty Probability ModelThis indicator shows a historical distribution of outcomes based on similar past market conditions.
Green = average outcome
Blue = historical upside extreme
Red = historical downside extreme
//==================== INPUTS ====================
// Pattern Length
// The number of recent bars used to define the “current market fingerprint”.
// 20 bars is good for days
// raise it for smoother predictions
// default = 20
// Lookback Bars
// How far back the script searches for historical analogs.
// 800 daily bars is outside 2021 squeeze for GME
// increase for inclusion, decrease for more relevance
// default = 800
// Forward Bars
// The future window length used to measure outcomes.
// <10 for momentum trades
// 40+ for big swing plays
// default = 15
// Top Matches
// How many historical analogs are averaged.
// 6 still shows spikes
// lower to 3 to explore fringe chances - moass?
// raise over ~15 to remove spikes
// default = 6
// Return Weight
// Raise → Echo chamber like behavior
// Lower → Structure over noise
// default = 1
// Volume Weight
// High → favors accumulation/distribution patterns
// Low → ignores big volume spikes
// default = .6
// ATR Weight
// High → separates calm vs chaos
// Low → mixes regimes (dangerous)
// default = .8
// Trend Weight
// High → trend-following bias
// Low → mean-reversion bias
// default = .7
// RSI Weight
// High → value potential reversals of direction
// Low → expect momentum to continue
// default = .5
Pine Script® indicator
CryptoAntidote SpecialThis script looks for ranges and detects breakouts at key levels and draw signals - Always trade in the direction of trend and ignore opposite side signals.
Full alerts options are also available.
Enjoy!!
Pine Script® indicator
ICT MOC Macro (Time + Price) - Live Signals + 3:30/MOC/SLTPict moc strat basically it works by determining the bias of market on closer orders at 3:30-3:50.
Pine Script® indicator
UTC-5 Time MarkersFor model 110 of DTT use flout with this as a bias and you will catch high wr high rr trades for this certain time window of continuation or reversal
Pine Script® indicator
Pine Script® indicator
RACHERO (Z-Div)RACHERO (Z-Div) (Rachero Preview – Limited Version) is a proprietary market-pressure indicator that highlights unusual participation and momentum shifts often preceding key price moves. It emphasizes normal versus extreme conditions and marks early inflection zones where price behavior becomes unstable, helping traders anticipate potential reversals or strong continuations with minimal clutter.
Pine Script® indicator
NL Session High/Low ticks (16:30-17:30) - 5mthis is a 5 minut chart open and close off the new york open highs and lows
Pine Script® indicator
Pine Script® indicator
Auto Trend LinesPivot Left/Right Bars: Higher = fewer but stronger pivots (try 5-15 for weekly charts)
Extend Lines Forward: How far to project (50-200 bars recommended)
Line Color: Change to match your preference
Show Pivot Markers: Turn on to see where pivots are detected
Pine Script® indicator
Dual MACD + MFI + Volume Trend [v6] | High-ConvictionMFI MACD VOL to know when to enter and leave trades
Pine Script® indicator
ICT Killzones/Opening Prices/RELS/REHSThis TradingView indicator delivers clean, enhanced plotting of key trading session Highs and Lows (Asian, London, New York, and/or any custom sessions) in true ICT/SMC style — with thoughtful adjustments to cut noise, highlight high-probability levels, and give you full control for faster, clearer analysis.
Core features:
Plots Session Highs and Session Lows as customizable horizontal lines with optional labels, colors, styles, thickness, and fade-out for older levels
Marks Quality Highs and Quality Lows — visually distinguishing more reliable/significant extremes (e.g., unmitigated, displacement-backed, or liquidity-magnet levels based on ICT criteria)
Detects and highlights Relative Equal Highs and Relative Equal Lows — those subtle but powerful liquidity pools where price fails to push new extremes on retests, often acting as draws for sweeps or reversal confirmations
Customizable Key Opening Price Points — mark and highlight critical opens (e.g., midnight, 8:30 AM, NY open, 4H candle opens, or any user-defined times) as lines or labels to frame premium/discount zones, order blocks, or intraday bias shifts
100% customizable settings: session times/timezones, quality/relative equality thresholds (tolerance for 'relative' matching), mitigation/sweep removal, lookback periods, line behavior on breach, label visibility, and more — dial it in exactly how you trade without chart clutter
Built for ICT traders targeting liquidity grabs, PD Arrays, session reversals, or clean intraday structure. No more default-tool overload or guessing on relative levels — this gives precision, reduces visual fatigue, and lets you focus on high-edge setups.
If you're tired of noisy charts but still want deep ICT alignment (session extremes + relative equals + key opens), this one's designed to actually help you trade better. Solid upgrade path from basic session tools
Pine Script® indicator
Educational Trend Direction (Up & Down)🔍 Overview
This indicator is designed to visually represent trend direction and trend transitions using a simple moving-average relationship. It is built strictly for educational and analytical purposes, allowing users to observe how price behaves during upward and downward market phases without relying on trading signals or predictions.
The indicator focuses on trend context, not trade execution.
⚙️ How the Indicator Works
The script calculates two exponential moving averages:
A fast trend line that reacts quickly to recent price changes
A slow trend line that represents broader market direction
Trend direction is determined by the relative position of these two lines.
When the fast line moves above the slow line, the market is considered to be in an upward trend phase
When the fast line moves below the slow line, the market is considered to be in a downward trend phase
This relationship helps visualize trend shifts and momentum changes in a simple and intuitive way.
🎨 Visual Components Explained
🟢 Green Trend Line
Represents the fast moving average during upward trend phases
Indicates that price is maintaining strength relative to the broader trend
Color reflects trend direction only, not confirmation or entry
🔴 Red Trend Line
Represents the fast moving average during downward trend phases
Indicates sustained weakness relative to the broader trend
Color does not imply selling or future continuation
⚪ Grey Trend Line
Represents the slow moving average
Acts as a baseline trend reference
Helps distinguish between short-term fluctuations and broader direction
🎨 Background Shading
Light green shading appears during upward trend environments
Light red shading appears during downward trend environments
Background color provides context only and does not signal market actions
🎯 Purpose & Benefits
Helps identify trend phases in a clear and minimal way
Improves understanding of trend transitions and momentum shifts
Reduces visual noise compared to raw price data
Encourages context-based analysis instead of signal dependency
Suitable for all markets and timeframes
⚠️ Important Notes
This indicator does not generate buy or sell signals
No targets, stop levels, or performance metrics are included
Trend conditions are descriptive, not predictive
Past behavior does not guarantee future outcomes
Users should always apply their own analysis and risk management when interpreting market data.
📚 Intended Use
This tool is intended for:
Market trend study
Educational demonstrations
Visual analysis of trend direction
Long-term chart structure awareness
It is not intended for automated trading or decision-making.
Pine Script® indicator
Overnight Mid-point v2Same idea as first script, just refined so it takes candlesticks and not swings.
Pine Script® indicator
CapitalFlowsResearch: Sensitivity BandsCapitalFlowsResearch: Sensitivity Bands — Expected-Move Projection from Cross-Asset Beta
CapitalFlowsResearch: Sensitivity Bands builds on the idea of cross-asset sensitivity by turning beta into a set of projected price boundaries around the prior day’s close. Instead of showing beta as a standalone number, this tool translates it into real price levels that represent the expected magnitude of movement—up or down—given a typical shock in a chosen market driver.
The script measures how strongly the price asset has been responding to moves in the driver over a rolling window, then uses that relationship to calculate a dynamic “band width.” That width is applied symmetrically around the previous daily close to create two horizontal bands: an upper range and a lower range. These lines update intraday, offering a real-time sense of whether current price action is unfolding within normal sensitivity limits or pushing into statistically unusual territory.
Traders can choose how the driver’s changes are interpreted (basis points, absolute moves, or percent changes), and optionally replace the rolling band with a running mean to emphasise longer-term structural sensitivity. The resulting overlay acts much like an expected-move model—similar in spirit to options-derived ranges, but powered by beta dynamics rather than implied volatility.
In practice, Sensitivity Bands serves as a clean framework for contextualising market movement:
Inside the bands: price behaviour aligns with typical cross-asset sensitivity.
Touching a band: movement is strong but still consistent with historical response.
Breaking a band: indicates a regime shift, a driver disconnect, or unusually high momentum.
All of this is achieved without exposing the underlying beta calculations or normalisation logic.
Pine Script® indicator
FVG + Manip (optimized)
This indicator detects **Fair Value Gaps (FVGs)** using a **3-candle confirmation rule**, draws each FVG as a **boxed zone** on the chart (optionally with a **50% midpoint dashed line**), then monitors price action to:
1. flag a **“reaction”** when price touches the zone **and the candle body closes completely outside the zone**, and
2. **delete** the zone once it has been **fully filled** (either by wick or by body, depending on user settings).
Additionally, it colors the candle **green or red** only when a **manipulative candle** occurs *and* a matching **FVG reaction** is detected (bullish or bearish).
---
## Inputs and User Settings
### 1) FVG fill (“close”) method
**`closeMethod`** can be:
* **BODY**: the FVG is considered filled only when the **candle body** fully fills it.
* **WICK**: the FVG is considered filled when the **wick** fully fills it.
This setting affects when zones are deleted.
### 2) Manipulative candle detection mode
**`manipMode`** can be:
* **BASE**
* **BASE + BREAK**
* **DISPLACEMENT**
If **DISPLACEMENT** is selected, it also uses:
* **`dispPct`** = minimum body size as a % of candle range (0–1).
Example: `0.5` means the candle body must be at least **50%** of its full range.
### 3) Visual styling
You can set:
* Bull and bear FVG fill/border colors
* Fill transparency
* Border thickness
* Whether to show the **50% midpoint line**
* Midline colors and thickness
---
## Candle Measurements (for displacement logic)
For each candle it computes:
* **bodyHigh** = max(open, close)
* **bodyLow** = min(open, close)
* **bodySize** = abs(close − open)
* **rangeSize** = max(high − low, minimum tick)
* **hasDisp** = true if `bodySize >= rangeSize * dispPct`
So in DISPLACEMENT mode, a candle qualifies only if its body is “big enough” relative to its range.
---
## Manipulative Candle Logic
The script defines “manipulative” candles separately for bullish and bearish directions.
### BASE mode
* **Bullish (c1Green):**
The candle makes an equal/lower low vs the previous candle (`low <= low `) and closes bullish (`close > open`).
* **Bearish (c1Red):**
The candle makes an equal/higher high vs the previous candle (`high >= high `) and closes bearish (`close < open`).
### BASE + BREAK mode
* **Bullish (c2Green):**
It makes a lower low (`low < low `) and closes back above the previous low (`close > low `), and is bullish (`close > open`).
* **Bearish (c2Red):**
It makes a higher high (`high > high `) and closes back below the previous high (`close < high `), and is bearish (`close < open`).
### DISPLACEMENT mode
Same as BASE + BREAK, but also requires **hasDisp**:
* **Bullish (c3Green):** `c2Green and hasDisp`
* **Bearish (c3Red):** `c2Red and hasDisp`
Finally:
* **manipGreen** is true if the selected mode’s bullish condition is true
* **manipRed** is true if the selected mode’s bearish condition is true
---
## FVG Detection (3-candle confirmed)
It defines an FVG using candles `0`, `1`, and `2` (current candle = 0):
### Bullish FVG confirmed
```pine
bullFvgConfirmed = low > high
```
Meaning the **current candle’s low** is above the **high of two candles ago** → an “upward gap” across 3 candles.
### Bearish FVG confirmed
```pine
bearFvgConfirmed = high < low
```
Meaning the **current candle’s high** is below the **low of two candles ago** → a “downward gap”.
---
## Zone Creation and Drawing
When an FVG is confirmed, the script creates:
* a **box** representing the zone
* an optional **dashed midpoint line** at 50%
### Bullish zone geometry
* **Top = current low**
* **Bottom = high **
The box starts at the current bar and extends right by:
* **`extendBars = 500`**
### Bearish zone geometry
* **Top = low **
* **Bottom = current high**
### Midline (50%)
Midpoint is:
```pine
mid = (zTop + zBot) / 2
```
A dashed line is drawn across the same 500-bar extension.
If `showMidline` is false, the line is made effectively invisible.
---
## Storage / Object Management (maxKeep)
The script stores:
* bull boxes + their midlines
* bear boxes + their midlines
It keeps at most:
* **`maxKeep = 120`** zones per direction
When exceeded, it deletes the oldest box and its line to stay within limits.
---
## Zone Monitoring: Reaction + Deletion
Every bar, it loops through all stored zones and checks:
### A) “Touch” condition (common)
```pine
touches = (high >= zBot) and (low <= zTop)
```
This means the candle range overlaps the zone at least partially.
---
### B) Reaction rules (strict: body must be outside)
The script’s comment says:
**Reaction requires body OUTSIDE zone (never inside).**
#### Bullish reaction
```pine
if touches and (bodyLow > zTop)
bullReactNow := true
```
So price touched the zone, but the **entire candle body is above the zone** (bodyLow is above the zone top).
This is a “tap + rejection upward” style reaction.
#### Bearish reaction
```pine
if touches and (bodyHigh < zBot)
bearReactNow := true
```
Touched the zone, but the **entire candle body is below the zone** (bodyHigh is below zone bottom).
This is a “tap + rejection downward” reaction.
---
### C) Deletion rules (zone “filled”)
#### Bullish FVG fill
* Wick fill:
```pine
filledW = (low <= zBot)
```
* Body fill:
```pine
filledB = (bodyLow <= zBot)
```
Delete if:
* `closeMethod == WICK` and `filledW`
* OR `closeMethod == BODY` and `filledB`
#### Bearish FVG fill
* Wick fill:
```pine
filledW = (high >= zTop)
```
* Body fill:
```pine
filledB = (bodyHigh >= zTop)
```
Delete if:
* `closeMethod == WICK` and `filledW`
* OR `closeMethod == BODY` and `filledB`
When deleting, it removes:
* the box
* its corresponding midpoint line
* the entries in the arrays
---
## Final Candle Coloring (no overlap)
At the end, it colors candles only if:
* there is a **manipulative candle**, and
* there is a **reaction** in the same direction, and
* the opposite reaction is not simultaneously active
### Bullish candle coloring
```pine
greenFinal = manipGreen and bullReactNow and not bearReactNow
```
→ candle becomes **lime**
### Bearish candle coloring
```pine
redFinal = manipRed and bearReactNow and not bullReactNow
```
→ candle becomes **red**
If neither condition is met, `barcolor(na)` leaves candles unchanged.
---
## In short (one-liner)
This script draws 3-candle FVG zones, keeps them extended forward, deletes them only when fully filled (by wick/body setting), and highlights candles only when a chosen “manipulative” candle pattern happens at the same time as a strict “touch + body rejection” reaction from a bull/bear FVG.
If you want, I can also write a clean “user manual” style description (what signals mean, how to use settings, typical setups for scalping vs swing) in English.
Pine Script® indicator
ASIA + ALERT (Touch after 09:00)This script is a pure indicator designed to analyze price action around the Asian session and provide contextual market structure information.
It does not open trades and does not manage positions.
1. Asia Session Box (Core Reference)
The script identifies the Asian session from 23:00 to 07:00 (Rome time).
During this period it:
Tracks the highest high and lowest low.
Draws a visual box on the chart that expands in real time.
This Asia range becomes the main reference framework for the rest of the logic.
2. Yellow Candles (Imbalance / FVG Detection)
The script detects “yellow candles” using a Fair Value Gap–style logic:
Bullish imbalance or bearish imbalance patterns.
Only yellow candles formed outside the Asian session are stored.
These candles represent potential supply or demand origins.
3. Zone Creation (After Asia Ends)
When the Asian session ends (07:00):
The script scans the stored yellow candles.
It creates price zones based on their position relative to the Asia range:
LONG zones → yellow candles below the Asia low
SHORT zones → yellow candles above the Asia high
The user can choose:
To use only the first valid yellow candle, or
To also include the second valid yellow candle (optional).
Zones are drawn as boxes that extend to the right, acting as areas of interest.
4. Zone Touch Alert (After 09:00 Only)
The script can trigger one single alert:
Only after 09:00 (Rome time).
Only when price actually touches the zone entry level:
LONG → touch of the upper boundary of the long zone.
SHORT → touch of the lower boundary of the short zone.
Once a zone is touched:
It can be marked as consumed, preventing further alerts (optional).
The zone changes visual style to indicate it is no longer active.
5. Trend Table (Multi-Timeframe Context)
A compact table is displayed in the top-right corner of the chart.
It shows BULL / BEAR / NA for the following selectable timeframes:
M1, M3, M5, M15, H1, H4, Daily
Trend direction is determined using market structure pivots:
Break above the last pivot high → BULL
Break below the last pivot low → BEAR
No break → NA
All table colors and timeframes are fully customizable.
6. What This Script Is Meant For
Session-based market structure analysis
Supply & demand context
Multi-timeframe directional bias
Precise zone interaction alerts
Discretionary trading support
7. What This Script Does NOT Do
❌ No trades
❌ No backtesting
❌ No risk management
❌ No entries or exits
It is designed to support decision-making, not to automate trading.
Pine Script® indicator
OAS Train Track MA SystemTrain tracks for any timeframe or EMA, helps to hold your trades with your specific EMAs
Pine Script® indicator
Advanced Harmonic Pattern Detector v6Advanced Harmonic Pattern Detector and Backtesting Suite (Pine Script v6)
Overview
The Advanced Harmonic Pattern Detector and Backtesting Suite is an original TradingView indicator designed to identify harmonic price patterns using Fibonacci-based ratio validation. The script automatically detects harmonic structures in real time, plots their defining price legs, and highlights potential reversal zones derived from Fibonacci confluence.
In addition to pattern visualization, the indicator includes an integrated backtesting module that allows traders to evaluate historical pattern performance directly on the chart using configurable trade parameters.
The indicator is applicable across multiple asset classes, including forex, crypto, stocks, indices, and futures, and can be used on any timeframe.
Supported Harmonic Patterns
The indicator detects both bullish and bearish variations of the following patterns:
Gartley
Bat
Alternate Bat
Butterfly
Crab
Deep Crab
Shark
AB=CD
Three-Drive
Five-Zero
Each pattern is validated using predefined Fibonacci ratio relationships between the XA, AB, BC, and CD legs. Ratio tolerances are pattern-specific to balance accuracy and practical signal frequency.
Pattern Detection Logic
The detection engine is built around objective price-structure analysis and includes:
Automatic swing high and swing low identification
Fibonacci ratio validation for each pattern leg
Support for both retracement-based and extension-based patterns
Pattern confirmation using completed price data only
Once a pattern is confirmed, it is fixed on the chart and does not repaint.
Potential Reversal Zones (PRZ)
For each validated pattern, the indicator calculates and plots a Potential Reversal Zone based on Fibonacci confluence across relevant pattern legs. These zones are displayed directly on the chart and are intended to help traders anticipate areas where price may react, rather than signaling guaranteed reversals.
Bullish and bearish patterns are visually distinguished to maintain clarity during live analysis.
Integrated Backtesting and Performance Analysis
The indicator includes a built-in backtesting component that allows traders to simulate pattern-based trades using historical data. Features include:
Pattern-triggered trade simulation
User-defined stop-loss and take-profit levels
Adjustable risk-to-reward parameters
Trade count, win rate, and summary statistics
Results displayed in an on-chart performance table
This functionality enables traders to evaluate harmonic pattern behavior statistically within the same tool used for analysis.
Customization and Controls
Users can customize the indicator by:
Enabling or disabling individual harmonic patterns
Toggling bullish and bearish detection independently
Adjusting Fibonacci tolerance thresholds
Configuring stop-loss and take-profit ratios
These options allow the script to be adapted to different markets, instruments, and trading approaches.
Intended Use
This indicator is designed as a technical analysis and decision-support tool for traders who incorporate harmonic patterns and Fibonacci structure into their analysis. It is not a buy or sell signal generator and should be used alongside broader market context and risk management.
Disclaimer
This indicator is intended for educational and analytical purposes only and does not constitute financial advice. Always apply proper risk management and confirm analysis with additional tools.
Pine Script® indicator






















