Ketidakstabilan
EMA Color Flip Strategy Experimenting on SOL 30 min chart, it seems good!
Let me know what you think!
WeeklyDealingRange Pro+Weekly Dealing Range Indicator
Overview
The Weekly Dealing Range indicator identifies range + volatility based pivot levels that form at the close of the first trading session and extend for the entire week. This tool provides key reference points for both trending and range-bound market conditions.
What It Provides
Range High & Low: Weekly session extremes
Median Level: Mid-point of the weekly range
Weekly Open: First session opening price
Standard Deviation Extensions: Calculated levels above the high and below the low
Practical Application
These levels serve as:
Reversal zones for mean reversion setups
Support/resistance reference points
Target levels for existing positions
Framework for building trade ideas around high-probability pivot areas
Key Features
Optional function based alerts
Traditional price crosses level alerts
Automatically updates each week
Clean, uncluttered chart display
Works across all timeframes
Suitable for all markets and instruments
Relative Performance vs XAO (Histogram)RSC Relative Strength Comparison is used to compare performance of a Sector Index or Stock against a Benchmark (Index). The Benchmark used is the Australian All Ordinaries Index with a look back period of 63 days (3 months). Both the benchmark and look back period may be changed in the code to suit.
QT Previous Micro Cycle Range + SSMT [bilal]Previous Micro Cycle Range + SMTs - Indicator Description
📊 Overview
This indicator tracks 22.5-minute micro cycles within ICT's Quarterly Theory framework and automatically detects Smart Money Technique (SMT) divergences across correlated indices (NQ, ES, YM). It visualizes previous cycle ranges and identifies high-probability manipulation completions for precise intraday entries.
🎯 What It Does
Micro Cycle Tracking:
Divides each 90-minute session into four 22.5-minute micro quarters
Plots the previous micro cycle's High, Low, Equilibrium (EQ), and Quarter levels
Updates automatically as new micro cycles form
Works on any timeframe (recommended: 1-5 minute charts)
SMT Detection:
Compares current micro cycle vs previous micro cycle across NQ, ES, and YM
Detects Bearish SMT: Divergence at highs (signals distribution down)
Detects Bullish SMT: Divergence at lows (signals distribution up)
Draws visual SMT lines with directional arrows showing correlation/divergence
Optional SMT table showing all three indices' movements
💡 How To Use It
For Scalpers & Day Traders:
Wait for a new micro cycle to begin (lines will refresh every 22.5 minutes)
Watch for SMT formation in the current cycle
Bullish SMT = Buy signal (previous low is confirmed, expect move to previous high)
Bearish SMT = Sell signal (previous high is confirmed, expect move to previous low)
Key Concepts:
Minimum Target: Opposite extreme of previous cycle
SMT Confirmation: One or two indices sweep a level while the other(s) fail to sweep
Best Results: Trade with higher timeframe bias aligned
⚙️ Features
Customizable Display:
Toggle High/Low lines with multiple label styles (Timeframe, Label, %, Fib)
Optional Equilibrium (50%) level
Optional Quarter levels (25% / 75%)
Optional extended range projections (±50% to ±400%)
Adjustable line colors, widths, and label sizes
SMT Options:
Enable/disable SMT detection
Show/hide SMT text labels
Custom colors for bullish/bearish SMTs
Option to delete previous cycle SMTs (keeps chart clean)
Real-time SMT table showing all three indices
Comparison Assets:
Default: ES1! and YM1! (customize to your preference)
Set correlation type for each asset (correlated vs inverse)
Disable individual assets if needed
🔍 Understanding The Visuals
Lines:
Solid lines = Previous cycle High/Low (where price came from)
Dotted lines = EQ and Quarter levels (internal cycle structure)
Green lines = SMT divergence detected (buy/sell signal)
Labels:
▲ = Asset made higher high/low vs previous cycle
▼ = Asset made lower high/low vs previous cycle
🔺 = Inverse correlation (up when others down)
🔻 = Inverse correlation (down when others up)
SMT Logic:
If indices diverge (move opposite directions), SMT is confirmed
Bearish SMT = Highs diverge → Sell
Bullish SMT = Lows diverge → Buy
📈 Best Practices
Use on 1-5 minute charts for optimal micro cycle visualization
Combine with higher timeframe bias (Daily Cycle SSMT, session bias, etc.)
Wait for SMT confirmation before entering trades
Target previous cycle's opposite extreme as minimum profit target
Exit when opposing SMT forms or price reaches target
🛠️ Settings Guide
Essential Settings:
Comparison Symbols: Set to the indices you trade (default: ES1!, YM1!)
Show Cycle SMT: Toggle SMT detection on/off
Delete Previous Cycles SMTs: Keep chart clean by removing old SMTs
Visual Preferences:
Line Color/Width: Customize previous cycle lines
Label Style: Choose between Timeframe (22.5m), Label (descriptive), % (percentage), or Fib (0-1)
Show High/Low: Toggle previous cycle extremes
Show EQ/Quarters/Extended Ranges: Add more reference levels as needed
⚠️ Important Notes
This indicator shows previous cycle ranges, not predictive future levels
SMTs are confirmation signals for manipulation completion
Always use proper risk management and combine with your trading plan
Best results when aligned with higher timeframe directional bias
🎓 Based On ICT Concepts
This indicator implements concepts from Inner Circle Trader (ICT):
Quarterly Theory (fractal time structure)
Micro cycles (22.5-minute quarters)
Sequential SMT (mechanical divergence confirmation)
Smart Money accumulation, manipulation, distribution (AMD)
Perfect for: Scalpers, day traders, and anyone using ICT's Quarterly Theory and SMT concepts for precise intraday entries.
Note: This is a study indicator (overlay=true). It does not generate buy/sell signals automatically - you must interpret SMT formations based on your trading strategy.RéessayerGu should know it only works on the 30s chart btwPrevious Micro Cycle Range + SMTs - Indicator Description
📊 Overview
This indicator tracks 22.5-minute micro cycles within ICT's Quarterly Theory framework and automatically detects Smart Money Technique (SMT) divergences across correlated indices (NQ, ES, YM). It visualizes previous cycle ranges and identifies high-probability manipulation completions for precise intraday entries.
⚠️ IMPORTANT: This indicator is designed to work on the 30-second chart only. The micro cycle calculations are optimized for 30s timeframe data.
🎯 What It Does
Micro Cycle Tracking:
Divides each 90-minute session into four 22.5-minute micro quarters
Plots the previous micro cycle's High, Low, Equilibrium (EQ), and Quarter levels
Updates automatically as new micro cycles form every 22.5 minutes
Precise timing based on New York timezone session structure
SMT Detection:
Compares current micro cycle vs previous micro cycle across NQ, ES, and YM
Detects Bearish SMT: Divergence at highs (signals distribution down)
Detects Bullish SMT: Divergence at lows (signals distribution up)
Draws visual SMT lines with directional arrows showing correlation/divergence
Optional SMT table showing all three indices' movements in real-time
💡 How To Use It
Setup:
Switch to 30-second chart (required for accurate cycle timing)
Add indicator to your chart
Ensure you're viewing NQ, ES, or YM (or correlated futures)
For Scalpers & Day Traders:
Wait for a new micro cycle to begin (lines will refresh every 22.5 minutes)
Watch for SMT formation in the current cycle
Bullish SMT = Buy signal (previous low is confirmed, expect move to previous high)
Bearish SMT = Sell signal (previous high is confirmed, expect move to previous low)
Key Concepts:
Minimum Target: Opposite extreme of previous cycle
SMT Confirmation: One or two indices sweep a level while the other(s) fail to sweep
Best Results: Trade with higher timeframe bias aligned (Daily Cycle SSMT, session bias)
⚙️ Features
Customizable Display:
Toggle High/Low lines with multiple label styles (Timeframe, Label, %, Fib)
Optional Equilibrium (50%) level
Optional Quarter levels (25% / 75%)
Optional extended range projections (±50% to ±400%)
Adjustable line colors, widths, and label sizes
Line extension length (default: 15 bars ahead)
SMT Options:
Enable/disable SMT detection
Show/hide SMT text labels with ticker symbols and directional arrows
Custom colors for bullish/bearish SMT lines
Option to delete previous cycle SMTs (keeps chart clean)
Real-time SMT table showing all three indices' current status
Comparison Assets:
Default: ES1! and YM1! (customize to your preference)
Set correlation type for each asset (correlated vs inverse)
Disable individual assets if needed
Works with any correlated futures contracts
Debug Mode:
Toggle debug info to see current NY time, session, and micro cycle timing
Helpful for understanding cycle structure and troubleshooting
🔍 Understanding The Visuals
Lines:
Solid lines = Previous cycle High/Low (where price came from)
Dotted lines = EQ and Quarter levels (internal cycle structure)
Green lines (default) = SMT divergence detected (buy/sell signal)
Gray dotted lines = Extended range projections (if enabled)
Labels:
▲ = Asset made higher high/low vs previous cycle (correlated)
▼ = Asset made lower high/low vs previous cycle (correlated)
🔺 = Inverse correlation (up when others down)
🔻 = Inverse correlation (down when others up)
SMT Logic:
If indices diverge (move opposite directions), SMT is confirmed
Bearish SMT = Highs diverge → High is set, expect distribution down
Bullish SMT = Lows diverge → Low is set, expect distribution up
📈 Best Practices
Must use 30-second chart - indicator timing is calibrated for this timeframe
Combine with higher timeframe bias (Daily Cycle SSMT, 90-min SSMT, session bias)
Wait for SMT confirmation before entering trades (don't front-run)
Target previous cycle's opposite extreme as minimum profit target
Exit when opposing SMT forms or price reaches target
Best windows: Q2→Q3 or Q3→Q4 transitions within 90-minute sessions
Volatility injection times: Watch 09:30, 10:00, and 14:00 ET for strongest moves
🛠️ Settings Guide
Essential Settings:
Comparison Symbols: Set to the indices you monitor (default: ES1!, YM1!)
Correlation Type: Toggle "Correlated" on/off for each asset based on expected relationship
Show Cycle SMT: Enable/disable SMT detection
Show SMT Text: Toggle labels showing ticker divergence details
Delete Previous Cycles SMTs: Keep chart clean by removing old SMTs
Visual Preferences:
Line Color/Width: Customize previous cycle lines (default: black, width 1)
Label Style: Choose between:
Timeframe (shows "22.5m")
Label (descriptive: "previous micro cycle high/low")
% (shows "100%/0%")
Fib (shows "1/0")
Show High/Low: Toggle previous cycle extremes (recommended: ON)
Show EQ/Quarters/Extended Ranges: Add more reference levels as needed
SMT Customization:
SMT Colors: Customize bearish/bullish SMT line colors (default: green for both)
SMT Label Colors: Background and text color for SMT labels
SMT Table: Toggle real-time comparison table (bottom right)
⚠️ Important Notes
30-second chart required - will not work accurately on other timeframes
This indicator shows previous cycle ranges, not predictive future levels
SMTs are confirmation signals for manipulation completion, not entry triggers alone
Always use proper risk management and position sizing
Best results when aligned with higher timeframe directional bias
Monitor all three indices (NQ, ES, YM) for complete SMT picture
Micro cycles are part of a fractal structure - align with 90-min and Daily Cycle SMTs
🎓 Based On ICT Concepts
This indicator implements concepts from Inner Circle Trader (ICT):
Quarterly Theory (fractal time structure - 22.5 min micro quarters)
Micro cycles (four quarters within each 90-minute session)
Sequential SMT (mechanical divergence confirmation across correlated indices)
Smart Money AMD (Accumulation, Manipulation, Distribution pattern)
New York session timing (based on ICT's 6-hour daily cycles)
🕐 Micro Cycle Structure
Each 90-minute session divides into four 22.5-minute micro quarters:
Micro Q1: 00:00 - 22:30
Micro Q2: 22:30 - 45:00
Micro Q3: 45:00 - 67:30
Micro Q4: 67:30 - 90:00
This pattern repeats across all 16 daily 90-minute sessions (Q1.1 through Q4.4).
Perfect for: Scalpers and day traders using ICT's Quarterly Theory and SMT concepts for precise micro-level entries on 30-second charts.
Chart Requirement: 30-second timeframe only.
Note: This is a study indicator. It does not generate automatic buy/sell signals - you must interpret SMT formations based on your trading strategy and higher timeframe bias.
SimpleAlgo.io V4.1SimpleAlgo V4.1 — Multi-Layer Trend & Market Structure Framework
SimpleAlgo V4.1 is an advanced all-in-one market framework designed to help traders visually interpret trend direction, volatility conditions, potential reversal areas, and trade planning levels — all without relying on traditional lagging indicators.
This version introduces improved trend mapping, refined reversal zones, adaptive take-profit logic, and expanded risk-management visualization.
🔹 Core Concept
V4.1 analyzes price movement, volatility behavior, and momentum shifts to outline trend bias, market context, and potential turning points.
The goal is not to predict price, but to organize the chart into clear, actionable regions:
- Trending vs ranged environments
- Extended vs balanced price conditions
- Momentum shifts and transitions
- Areas where reactions or reversals are more likely
The indicator is designed to complement your own strategy — not produce mechanical buy/sell rules.
🔹 Trend Identification
The internal trend engine evaluates both directional movement and volatility compression/expansion to determine whether conditions favor a bullish or bearish environment.
You can optionally display:
- A trend tracker line
- A trend cloud
- Gradient-based bar coloring for momentum shifts
- A smoothing-based signal line for visual confirmation
These tools help quickly identify the dominant directional context.
🔹 Signals (Optional)
V4.1 can highlight potential long/short opportunities when price transitions through key internal levels while aligned with the active trend environment.
These are points of interest, not trade instructions.
They work best when combined with structure, trend context, and independent analysis.
🔹 Reversal Zones
Volatility-influenced bands outline areas where price may become stretched relative to recent conditions.
These zones can help identify:
- Potential exhaustion
- Pullback regions in trends
- Profit-taking areas
- High-risk chase zones
- Reversal bands do not predict tops or bottoms — they simply highlight areas where reactions become more probable.
🔹 Support & Resistance
Optional pivot-based S/R levels automatically mark key structural areas.
These are anchored on recent swing points and help contextualize:
- Breakouts
- Failed breakouts
- Retests
- Range boundaries
🔹 Risk Management Tools
V4.1 includes a complete visual framework for trade planning:
- Dynamic Take-Profit Markers
- Adaptive targets based on evolving momentum conditions.
- Can help identify when a move starts losing strength.
- Static Multi-R TP/SL Levels
- ATR-based levels that outline:
- Stop distance
- 1:1 Take Profit
- 2:1 Take Profit
- 3:1 Take Profit
- An adaptive trailing stop that responds to trend strength and volatility shifts.
(Useful for riding strong moves while locking in unrealized gains.)
🔹 Trend Cloud
A multi-layer directional zone that provides a higher-level view of trend health and momentum alignment.
Useful for identifying:
- Expanding / contracting momentum
- Trend continuations
- Transitional phases
- Trend exhaustion
🔹 Customization
Nearly every component can be toggled on/off:
- Trend tracking
- Cloud
- Signals
- Bands
- Bar coloring
- S/R
- Dynamic TP
- Static TP/SL layers
- Trailing stops
- You can also switch sensitivity modes for scalping, day trading, or swing trading.
⚠️ Disclaimer
This tool is for chart analysis and educational use only.
It does not predict future price movement or guarantee results.
All trading involves risk, and no indicator should be used in isolation.
ADX HUD LabelStatic ADX Strength Label
Drops a fixed label in the top-right corner of your chart that only tells you one thing: is the trend worth trading or not.
The label constantly updates the current ADX value and changes color: red below 20 (dead / choppy), yellow between 20–25 (warming up), and green above 25 (strong trend, go hunting).
Use it as a quick trend-filter so you’re not forcing trades when the market is caca chop.
SimpleAlgo V3.1SimpleAlgo V3.1 – Adaptive Trend, Signals, and Market Context
Overview
SimpleAlgo V3.1 combines an adaptive trail system, range-based signal engine, MACD-driven candle coloring, ATR reversal zones, and optional structure tools into one framework. It is designed to help visualize trend direction, potential reversal areas, and trade planning levels in a single overlay.
Adaptive Trail System
V3.1 includes a volatility-adjusted trail based on a modified true range calculation.
This trail switches between long and short states and can highlight trend shifts, pullbacks, and areas where price is extended relative to recent movement. Optional Fibonacci-style projections around the trail provide additional visual context.
Signal Engine
The script uses a range-filtered price model to generate potential long and short signals.
Signals appear when filtered price, direction, and persistence conditions align. These entries are meant as points of interest rather than standalone trade instructions and should be confirmed with the broader context.
Candle Coloring (MACD-Based)
MACD and histogram values are used to color candles according to momentum strength.
This helps quickly see when momentum is building, fading, or switching sides without relying on separate subcharts.
Reversal Zones (ATR Bands)
ATR-based reversal zones are calculated around a smoothed midline.
Multiple upper and lower bands highlight where price may be stretched relative to its recent volatility profile. These zones can help identify potential reaction or exhaustion areas.
Support, Resistance, and Structure
Optional pivot-based levels mark recent support and resistance.
Swing markers (HH, HL, LH, LL) can be displayed to visualize swing structure and trend progression over time. These tools are there to support structure analysis rather than predict future price.
Momentum Bands and Trend Ribbon
Short-term “momentum energy” bands and a simple trend ribbon can be enabled to reinforce direction and strength.
These layers help confirm alignment between short-term movement and the underlying trend.
Custom MAs and Previous Day Levels
Users can add custom moving averages and display previous day high, low, and close levels.
These elements give additional reference points for intraday and swing decision-making.
Position Management (TP/SL Framework)
When a percentage stop is set, V3.1 can draw a visual framework of entry, stop, and multiple profit targets based on the distance between entry and stop.
This is a planning tool only; it does not place orders or manage trades.
Info Panel
An optional information panel summarizes trend direction, strength, volume sentiment, and volatility as simple percentage-style metrics.
This provides a quick snapshot of current conditions without leaving the chart.
Alerts
Alert conditions are available for:
– Long Entry
– Short Entry
– Any Signal
– Overbought and Oversold conditions (RSI-based)
Customization and Use
All major components (signals, trail, zones, structure tools, MAs, previous day levels, panel) can be toggled on or off.
SimpleAlgo V3.1 is best used as a contextual framework: identify trend, observe where price sits relative to the trail and zones, then use signals and structure as supporting information within a complete trading plan.
Disclaimer
This indicator is for technical analysis and educational purposes only. It does not predict future price or guarantee results. All trading involves risk and should be managed accordingly.
SimpleAlgo V2.1SimpleAlgo V2.1 – Momentum and Volatility Framework
Overview
SimpleAlgo V2.1 combines momentum waves, volatility envelopes, key price levels, and optional entry markers to provide a structured view of market behavior. The tool is designed to help traders interpret trend conditions, momentum shifts, and volatility expansion or compression through a clean set of visual components.
Momentum Waves
The indicator calculates multiple smoothed momentum waves using adaptive EMA logic. These waves highlight short and medium-term momentum behavior.
Color fills between waves help visualize momentum changes and transitions in trend strength.
Entry Signals (Optional)
Potential long or short markers can appear when a momentum shift aligns with a wave crossover. These are visual aids intended to highlight moments of interest on the chart. They are not standalone trade signals and should be confirmed with additional analysis.
Volatility Envelope (Optional)
A multi-band volatility envelope constructed from smoothed true range helps identify overextension zones and expansion phases. This framework can be useful when evaluating price deviations and potential exhaustion areas.
Key Price Levels (Optional)
Pivot-based levels identify potential support and resistance areas. These levels are projected forward to help visualize structure points without repainting.
Momentum Cloud and Bar Shading
The script includes cloud shading and bar coloring to help illustrate the strength and direction of momentum. These visuals help clarify trend conditions at a glance.
Position Management Tools (Optional)
When enabled, V2.1 can display hypothetical entry, stop, and target levels based on ATR-derived risk measurements. These elements provide a visual framework for trade planning only and do not execute or manage trades.
Alerts
Alert conditions are available for potential long and short entries based on the internal wave-cross and momentum logic.
Customization
Users can adjust responsiveness, volatility settings, level lookback, cloud visibility, shading, bar coloring, and all position-management parameters. Every layer can be enabled or disabled depending on preference and trading style.
Recommended Use
This tool is most effective when combined with a broader analysis approach that incorporates higher timeframe context, structure, and risk management principles. It should not be used as a standalone trading system.
Disclaimer
This indicator is for technical analysis and educational purposes only. It does not predict future price movement or guarantee results. All trading involves risk.
SimpleAlgo V1.1SimpleAlgo V1.1 – Market Structure & Trend Framework
Overview
SimpleAlgo V1.1 is designed to simplify chart analysis by combining trend direction, volatility channels, dynamic support and resistance, and optional breakout logic. The script provides a structured view of market behavior through visual layers built for clarity.
Features
– Adaptive ATR-based trend engine with selectable sensitivity (Conservative, Balanced, Aggressive)
– EMA cloud for short and mid-term momentum structure
– Multi-layer volatility channels based on smoothed Keltner calculations
– Automatic support and resistance levels using pivot logic
– Optional breakout markers for structural highs and lows
– Optional linear regression trend lines with deviation bands
– Long and short markers when price interacts with the trend engine
– Alert conditions for long, short, support break, resistance break, and general signals
– Fully configurable inputs to enable or disable any component
How to Use
– Start by selecting the preferred trend sensitivity.
– Observe price relative to the trend engine to determine directional bias.
– Enable the EMA cloud and volatility channels to assess momentum and volatility conditions.
– Turn on support/resistance and breakout markers to identify structural levels and break conditions.
– Use long/short markers only as visual cues and confirm with additional analysis.
Combine with higher timeframe context and proper risk management.
Disclaimer
This tool is intended for technical analysis and educational purposes only. It does not provide financial advice or guarantee performance. All trading involves risk.
Turtle System 1 (20/10) + N-Stop + MTF Table V7.2🐢 Description: Turtle System 1 (20/10) IndicatorThis indicator implements the original trading signals of the Turtle Trading System 1 based on the classic Donchian Channels. It incorporates a historically correct, volatility-based Trailing Stop (N-Stop) and a Multi-Timeframe (MTF) status dashboard. The script is written in Pine Script v6, optimized for performance and reliability.📊 Core Logic and ParametersThe system is a pure trend-following model, utilizing the more widely known, conservative parameters of the Turtle System 1:FunctionParameterValueDescriptionEntry$\text{Donchian Breakout}$$\mathbf{20}$Buy/Sell upon breaking the 20-day High/Low.Exit (Turtle)$\text{Donchian Breakout}$$\mathbf{10}$Close the position upon breaking the 10-day Low/High.Volatility$\mathbf{N}$ (ATR Period)$\mathbf{20}$Calculation of market volatility using the Average True Range (ATR).Stop-LossMultiplier$\mathbf{2.0} BER:SETS the initial and Trailing Stop at $\mathbf{2N}$.🛠️ Key Technical Features1. Original Turtle Trailing Stop (Section 4)The stop-loss mechanism is implemented with the historically accurate Turtle Trailing Logic. The stop is not aggressively tied to the current candle's low/high, which often causes premature exits. Instead, the stop only trails in the direction of the trend, maximizing the previous stop price against the new calculated $\text{Close} \pm 2N$:$$\text{New Trailing Stop} = \text{max}(\text{Previous Stop}, \text{Close} \pm (2 \times N))$$2. Reliable Multi-Timeframe (MTF) Status (Section 6)The indicator features a robust MTF status table.Purpose: It calculates and persistently stores the Turtle System 1 status (LONG=1, SHORT=-1, FLAT=0) for various timeframes (1H, 4H, 8H, 1D, and 1W).Method: It uses global var int variables combined with request.security(), ensuring the status is accurately maintained and updated across different bars and timeframes, providing a reliable higher-timeframe context.3. VisualizationsChannels: The 20-period (Entry) and 10-period (Exit) Donchian Channels are plotted.Stop Line: The dynamic $\mathbf{2N}$ Trailing Stop is visible as a distinct line.Signals: plotshape markers indicate Entry and Exit.MTF Table: A clean, color-coded status summary is displayed in the upper right corner.
Turtle System 2 (55/20) + N-Stop + MTF Table V7.2🐢 Description: Turtle System 2 (55/20) IndicatorThis indicator implements the trading signals of the Turtle Trading System 2 based on the classic Donchian Channels, supplemented by a historically correct, volatility-based Trailing Stop (N-Stop) and a Multi-Timeframe (MTF) status overview. The script was developed in Pine Script v6 and is optimized for performance and robustness.📊 Core Logic and ParametersThe indicator is based on the rule-based trend-following system developed by Richard Dennis and William Eckhardt, utilizing the more aggressive Entry/Exit parameters of System 2:FunctionParameterValueDescriptionEntry$\text{Donchian Breakout}$$\mathbf{55}$Buy/Sell upon breaking the 55-day High/Low.Exit (Turtle)$\text{Donchian Breakout}$$\mathbf{20}$Close the position upon breaking the 20-day Low/High.Volatility$\mathbf{N}$ (ATR Period)$\mathbf{20}$Calculation of market volatility using the Average True Range (ATR).Stop-LossMultiplier$\mathbf{2.0} BER:SETS the initial and Trailing Stop at $\mathbf{2N}$.🛠️ Technical Implementation1. Correct Trailing Stop (Section 4)In contrast to many flawed implementations, the Trailing Stop is implemented here according to the Original Turtle Logic. The stop price (current_stop_price) is not aggressively tied to the current low or high. Instead, at the close of each bar, it is only trailed in the direction of the trade (math.max for long positions) based on the formula:$$\text{New Trailing Stop} = \text{max}(\text{Previous Stop}, \text{Close} \pm (2 \times N))$$This ensures the stop is only adjusted upon sustained positive movement and is not prematurely triggered by short-term, deep price shadows.2. Reliable Multi-Timeframe (MTF) Logic (Section 6)The MTF section utilizes global var int variables (mtf_status_1h, mtf_status_D, etc.) in conjunction with the request.security() function.Purpose: Calculates and persistently stores the current Turtle System 2 status (LONG=1, SHORT=-1, FLAT=0) for the timeframes 1H, 4H, 8H, 1D, and 1W.Advantage: By persistently storing the status using the var variables, the critical error of single-update status is eliminated. The states shown in the table are reliable and accurately reflect the Turtle System's position status on the respective timeframes.3. Visual ComponentsDonchian Channels: The entry (55-period) and exit (20-period) channels are drawn with color highlighting.N-Stop Line: The dynamically calculated Trailing Stop ($\mathbf{2N}$) is displayed as a magenta line.Visual Signals: plotshape markers indicate Entry and Exit points.MTF Table: A compact status summary with color coding (Green/Red/Gray) for the higher timeframes is displayed in the upper right corner.
TSO PRO – Trend & Momentum Unified EngineAdvanced unified engine for detecting structural trend shifts and momentum transitions in price movement. Designed for traders who need deeper resolution, dynamic behavior, and automation-ready output.
💡 Why TSO PRO Is Different
Traditional oscillators separate their functions:
• MACD → trend inflection
• RSI → momentum strength
• Stochastics → oscillation bias
Because they rely on averaged data, these tools often react slowly
or fail to reveal structural turning zones in time.
TSO PRO works differently.
It interprets structural changes inside price movement, providing a unified view of both trend behavior and momentum shifts with higher resolution, faster transition visibility, and dynamic responsiveness.
What’s Inside TSO PRO
TSO PRO expands on the Lite version with additional layers, enhanced structural interpretation, and automation-ready outputs.
🔹 Included in TSO PRO
• TSO Line (Enhanced) – refined directional feedback
• TSO Flow (Advanced) – high-resolution background structure
• TSO Pulse (Enhanced) – dynamic expansion/compression behavior
• TSO Drive – active directional pressure
• TSO Extremes – turning-zone detection
• Automation Layer – webhook-ready alerts
• Full multi-layer unified engine
🔹 Ideal for
• experienced traders
• structural behavior analysis
• automated system builders
• high-resolution oscillation mapping
TSO Lite vs TSO PRO – Feature Comparison
───────────────────────────────────────────────
TSO LITE | TSO PRO
───────────────────────────────────────────────
Core Layers ✔ 3 layers | ✔ Full multi-layer engine
TSO Drive ✘ Not included | ✔ Dynamic response
TSO Extremes ✘ Not included | ✔ Turning-zone detection
Automation ✘ Not supported | ✔ Webhook automation
Best For Beginners | Advanced traders
───────────────────────────────────────────────
🔗 How to Access TSO PRO
TSO PRO is available via subscription:
• Monthly: tradesmith6.gumroad.com
• Yearly (best value): tradesmith6.gumroad.com
All subscribers receive continuous updates, feature improvements, and priority support.
📌 Licensing
TSO PRO is a paid invite-only indicator. Redistribution, resale, or reverse-engineering attempts are prohibited.
📌 Disclaimer
This tool does not guarantee profit. All trading is at your own risk.
가격 움직임 내부의 구조적 변화(Trend + Momentum)를 고해상도로 해석하도록 설계된 통합형 엔진 기반 오실레이터입니다. 고급 트레이더, 자동매매 사용자, 구조 분석 전문가에게 최적화되어 있습니다.
💡 TSO PRO가 특별한 이유
일반적인 오실레이터는 기능이 나뉘어 있습니다:
• MACD → 추세 전환
• RSI → 모멘텀 강도
• Stochastics → 진동 편향
이들은 대부분 평균 기반 계산 방식에 의존하여
전환 구간이 늦게 나타나거나 중요한 변화를 놓칠 수 있습니다.
TSO PRO는 다른 방식으로 작동합니다.
가격의 내부 구조적 변화를 해석하여
추세 변화와 모멘텀 전환을 더 빠르고 정밀하게 보여주는 고해상도 통합 엔진 방식으로 구성되어 있습니다.
TSO PRO 구성 요소
TSO PRO는 Lite 버전보다 더 많은 레이어, 고해상도 구조 감지, 자동매매(Webhook) 대응 기능을 포함합니다.
🔹 TSO PRO 포함 기능
• TSO Line (고급형) – 강화된 방향 반응
• TSO Flow (고해상도) – 심층 구조 흐름
• TSO Pulse (강화형) – 확장/압축 리듬 변화
• TSO Drive – 적극적인 방향 압력
• TSO Extremes – 전환 구간 감지
• Automation Layer – Webhook 자동매매 지원
• 멀티 레이어 기반 통합 엔진
🔹 적합한 사용자
• 중급~고급 트레이더
• 구조 기반 분석가
• 자동매매/전략화 사용자
• 고해상도 관찰이 필요한 트레이더
TSO Lite vs TSO PRO – 기능 비교
───────────────────────────────────────────────
TSO LITE | TSO PRO
───────────────────────────────────────────────
핵심 레이어 ✔ 3 레이어 | ✔ 멀티 레이어 엔진
TSO Drive ✘ 미포함 | ✔ 동적 반응
TSO Extremes ✘ 미포함 | ✔ 전환 구간 감지
자동매매 지원 ✘ 지원 안 함 | ✔ Webhook 자동화
적합한 사용자 초보자 | 고급 트레이더
───────────────────────────────────────────────
🔗 TSO PRO 구독 안내
더 깊은 구조 분석, 고해상도 감지, 자동매매(Webhook)이 필요하다면:
• 월간 구독: tradesmith6.gumroad.com
• 연간 구독(가성비): tradesmith6.gumroad.com
구독자에게는 지속적 업데이트와 기능 강화가 제공됩니다.
📌 라이선스
TSO PRO는 유료 초대형(Invite-only) 지표입니다.
재배포, 재판매, 역설계 시도는 금지되어 있습니다.
📌 면책 조항
본 도구는 수익을 보장하지 않으며, 모든 매매 책임은 사용자에게 있습니다.
Hide Out ProHide Out Pro —
Hide Out Pro is built for intraday option traders who analyze CALL (CE) and PUT (PE) charts separately to identify the stronger side of the market. It filters sideways phases, detects premium-decay zones, and highlights structured breakout and pullback entries using forward-projected volatility levels.
1. Hide Out Trend Filter (Sideways Market Protection)
Options lose value quickly during sideways movement.
The Hide Out engine uses volatility expansion to determine when the market is active or stagnant.
Pink-masked candles → weak momentum / premium-decay zone → avoid entries
Breakout from the mask → real trend activation
Works independently on CALL and PUT charts
This keeps option buyers out of choppy, time-decay conditions.
2. Day Opening Range (DOR)
The script marks the first 3 minutes of the session (designed for Indian market timing) and locks the High, Low, and Range for the rest of the day.
Directional Bias Using CALL & PUT Charts
CALL above DOR Low → bullish continuation potential
PUT above DOR Low → bearish continuation potential
Price below DOR Low → premium-decay zone.
Both inside DOR → sideways / low-quality movement
This helps traders identify which option side is gaining strength.
3. Leading Lines (Projected 6 Minutes Ahead)
Volatility Price Lines (Entry System)
Forward-projected volatility lines guide high-probability entries:
Green line → momentum structure
Amber line → liquidity pullback structure
After a Hide Out breakout, pullbacks into these lines provide controlled, rule-based entries for CE/PE buyers.
Target Line (Exit & Risk Control)
A thin forward-projected blue line marking short-term volatility expansion:
Avoid entering above this line
Use it for profit-booking or trailing stop-loss
This prevents late entries into overstretched premium zones.
4. Base Price Labels (Entry + Stop-Loss)
After trend confirmation, the script waits for a pullback into the Volatility Price Lines.
A Base Price label appears only when conditions align and includes:
Entry price
Stop-loss level (volatility-based)
This provides structured, predefined-risk entries.
5. Hide Out Label (Trend Confirmation)
A Hide Out label appears when price breaks out of the masked zone, signaling the start of true momentum and avoiding premature entries.
Works independently on CALL and PUT charts.
6. LP Divergence Label (Momentum Exhaustion Warning)
The script uses a proprietary calculation to generate an internally calculated low-participation metric.
When price forms a higher high but participation weakens, an LP label warns of:
Premium exhaustion
Trend slowdown
Reversal probability
Useful for avoiding late entries or tightening stops.
7. Best Timeframe
Optimized for the 3-minute timeframe, though it works on all timeframes.
How to Use (Quick Workflow)
Apply Hide Out Pro separately on CALL and PUT charts.
Identify which chart stays above its DOR Low → potential strength side.
Wait for a Hide Out breakout → confirms trend.
Enter on pullbacks to the Volatility Price Lines.
Avoid entries above the Target Line.
Use Target Line for exits or trail SL.
Watch LP labels for exhaustion or profit-booking signals.
Why the Script Is Closed-Source
Hide Out Pro uses a custom, self-protected computational framework combining volatility modelling, forward-projected structures, and multi-layer filters designed specifically for option premiums.
This includes proprietary logic for:
Sideways-market suppression (Hide Out mask)
DOR-based premium-decay detection
Forward-projected volatility lines
Base Price pullback and SL mapping
Internally calculated low-participation divergence
Because the methodology uses original algorithms, proprietary calculations, sequencing rules, and interaction logic not available in any public indicator, the source code is protected to prevent duplication and reverse-engineering.
Financial Earthquakes, LPPLSConcept Overview
Sornette (ETH Zurich) pioneered the Log-Periodic Power Law Singularity (LPPLS) model, drawing a profound analogy between financial crashes and physical ruptures/earthquakes. In this framework, speculative bubbles exhibit super-exponential price growth (power-law acceleration toward a critical time tₚ) decorated by accelerating log-periodic oscillations — signatures of herding behavior and hierarchical feedback loops among investors. These "financial earthquakes" often end in regime changes: crashes (positive bubbles) or sharp rebounds (negative bubbles). This indicator provides a practical adaptation of Sornette's core ideas, without requiring complex nonlinear fitting on rolling windows.
Components
Multi-scale Local Hurst Exponent (m): Approximates the power-law exponent in the LPPLS model.
A rough local proxy for the exponent m is computed on five different lookback periods (default: 5, 14, 30, 70, 140 bars) using the relation:
local H ≈ (log(range) − log(ATR)) / log(period)
The average of these five values serves as a dynamic estimate of the bubble's "super-exponentiality" (persistent trending behavior when H > 0.5).
Log-Periodic Oscillation Term:
C1 × t^H × (1 + C2 × cos(ω × log(t) + φ))
where t is distance from an arbitrary recent reference point. This introduces the characteristic log-periodic "ripples" that accelerate as the hypothetical critical time approaches.
DSI Hurst (0–100 oscillator):
The raw LPPLS-inspired series is dynamically scaled over a 100-bar lookback into a bounded 0–100 range (similar to a stochastic or RSI).
≈ 50 → neutral / random-walk regime
87 → extreme super-exponential + log-periodic pressure (potential positive bubble / end-of-rally critical point)
< 13 → extreme anti-persistent pressure (potential negative bubble / end-of-bear critical point)
Visual Elements
Red line: DSI Hurst oscillator (0–100)
Horizontal lines at 13, 50, 87
Bar coloring: fuchsia when DSI > 87 (bubble warning), yellow when DSI ≈ 0 (extreme tightening)
Circle shapes at the top → potential critical point (DSI extreme + Hurst consistent across scales + ongoing log-periodic ripples) — analogous to Sornette's "financial earthquake" warning
Circle shapes at the bottom → potential critical pullback / regime shift in the opposite direction
Usage
High DSI Hurst (especially > 87) with confirming circle → increasing probability of an imminent regime change (often a crash after a bubble).
Low DSI Hurst (especially < 13) with confirming circle → potential sharp rebound after a negative bubble.
The indicator works on any timeframe and asset class (stocks, indices, crypto, forex) where herding and positive-feedback dynamics can appear.
*Default values (periods) optimized for SPX.
Notes
This is an interpretation of Sornette's LPPLS theory adapted for Pine Script limitations. It does not perform full nonlinear LPPLS calibration (which requires heavy optimization and is used in academic confidence/trust indicators). It captures the spirit: multi-scale persistence + log-periodic component → early warning of critical transitions.
Combine with price action, volume, fundamentals or any other form of analysis, and risk management.
No indicator predicts crashes with certainty — it only highlights periods where the market structure resembles the pre-crisis patterns repeatedly documented in Sornette's research (1987, 2000, 2008, 2015 China, Bitcoin, etc.).
TSO Lite – Trend & Momentum Unified OscillatorTrend & momentum unified oscillator for structural price movement.
💡 Why TSO is Different
Most oscillators separate their functions:
• MACD → trend inflection
• RSI → momentum strength
• Stochastics → oscillation bias
Because they rely on averaged price data, these indicators often react slowly
or fail to reveal structural transitions in time.
TSO works differently.
It interprets structural shifts occurring inside price movement, capturing both
trend changes and momentum strength within a single unified engine.
Since it does not depend on moving averages, transitions appear earlier and clearer.
TSO Lite is the simplified edition of TSO (Triple Structure Oscillation),
designed to visualize structural rhythm and directional flow with clarity.
🔹 Included in TSO Lite:
• TSO Line – immediate directional response
• TSO Flow – structural background flow
• TSO Pulse – expansion/compression behavior
• Lightweight and clean visualization
🔹 Not Included in Lite:
• TSO Drive
• TSO Extremes
• Automation / Webhook alerts
• Multi-layer structural engine (PRO only)
TSO Lite is ideal for:
• beginners
• lightweight structural analysis
• users who want a clean and simple version of TSO
TSO Lite vs TSO PRO – Feature Comparison
───────────────────────────────────────────────
TSO LITE | TSO PRO
───────────────────────────────────────────────
Core Layers ✔ 3 layers | ✔ Full multi-layer engine
TSO Drive ✘ Not included | ✔ Dynamic response
TSO Extremes ✘ Not included | ✔ Turning-zone detection
Automation ✘ Not supported | ✔ Webhook automation
Best For Beginners | Advanced traders
───────────────────────────────────────────────
🔗 Upgrade to TSO PRO
For deeper structural detection, high-resolution mapping, and automation:
• Monthly subscription: tradesmith6.gumroad.com
• Yearly subscription (best value): tradesmith6.gumroad.com
📌 Licensing
TSO Lite is a free publicly available script.
Redistribution, resale, or reverse-engineering attempts are prohibited.
📌 Disclaimer
This tool does not guarantee profit. All trading is at your own risk.
구조적 가격 움직임을 기반으로 추세와 모멘텀을 동시에 관찰할 수 있는 통합형 오실레이터입니다.
💡 왜 TSO가 다른가?
일반적인 오실레이터는 기능이 나누어져 있습니다:
• MACD → 추세 전환 신호
• RSI → 모멘텀 강도
• Stochastics → 진동 편향
이러한 지표들은 대부분 ‘평균 기반 계산’을 사용하기 때문에
신호가 늦게 나오거나 중요한 전환 구간을 놓치는 경우가 많습니다.
TSO는 다른 방식으로 작동합니다.
가격 움직임 내부에서 발생하는 구조적 변화를 해석하여
추세 변화와 모멘텀 강도를 하나의 통합된 엔진 관점에서 읽어냅니다.
평균값에 의존하지 않기 때문에, 전환 구간이 더 빠르고 명확하게 표시됩니다.
TSO Lite는 TSO(Triple Structure Oscillation)의 간소화 버전으로,
가격 움직임의 구조적 리듬과 방향성 흐름을 깔끔하게 시각화하도록 설계되었습니다.
🔹 TSO Lite 포함 기능:
• TSO Line – 즉각적인 방향 반응
• TSO Flow – 구조적 배경 흐름
• TSO Pulse – 확장/압축 리듬 변화
• 가볍고 직관적인 레이아웃
🔹 TSO Lite 미포함 기능:
• TSO Drive
• TSO Extremes
• 자동매매(Webhook)
• 다층 구조 엔진(PRO 전용)
TSO Lite는 다음 사용자에게 적합합니다:
• 초보자
• 가벼운 구조 분석
• 심플한 형태의 TSO를 원하는 사용자
TSO Lite vs TSO PRO – 기능 비교
───────────────────────────────────────────────
TSO LITE | TSO PRO
───────────────────────────────────────────────
핵심 레이어 ✔ 3 레이어 | ✔ 멀티 레이어 엔진
TSO Drive ✘ 미포함 | ✔ 동적 반응
TSO Extremes ✘ 미포함 | ✔ 전환 구간 감지
자동매매 지원 ✘ 지원 안 함 | ✔ Webhook 자동화
적합한 사용자 초보자 | 고급 트레이더
───────────────────────────────────────────────
🔗 TSO PRO 업그레이드 안내
더 깊은 구조 분석, 고해상도 감지, 자동매매(Webhook)가 필요하다면:
• 월간 구독: tradesmith6.gumroad.com
• 연간 구독(가성비): tradesmith6.gumroad.com
📌 라이선스
TSO Lite는 무료로 제공되는 공개 스크립트입니다.
재배포, 재판매, 역설계 시도는 금지되어 있습니다.
📌 면책 조항
본 도구는 수익을 보장하지 않으며, 모든 거래 책임은 사용자 본인에게 있습니다.
ATH대비 지정하락률에 도착 시 매수 - 장기홀딩 선물 전략(ATH Drawdown Re-Buy Long Only)본 스크립트는 과거 하락 데이터를 이용하여, 정해진 하락 %가 발생하는 경우 자기 자본의 정해진 %만큼을 진입하게 설계되어진 스트레티지입니다.
레버리지를 사용할 수 있으며 기본적으로 셋팅해둔 값이 내장되어있습니다.(자유롭게 바꿔서 쓰시면 됩니다.) 추가적으로 2번의 진입 외에도 다른 진입 기준, 진입 %를 설정하실 수 있으며 - ChatGPT에게 요청하면 수정해줄 것입니다.
실제 사용용도로는 KillSwitch 기능을 꺼주세요. 바 돋보기 기능을 켜주세요.
ATH Drawdown Re-Buy Long Only 전략 설명
1. 전략 개요
ATH Drawdown Re-Buy Long Only 전략은 자산의 역대 최고가(ATH, All-Time High)를 기준으로 한 하락폭(드로우다운)을 활용하여,
특정 구간마다 단계적으로 롱 포지션을 구축하는 자동 재매수(Long Only) 전략입니다.
본 전략은 다음과 같은 목적을 가지고 설계되었습니다.
급격한 조정 구간에서 체계적인 분할 매수 및 레버리지 활용
ATH를 기준으로 한 명확한 진입 규칙 제공
실시간으로
평단가
레버리지
청산가 추정
계좌 MDD
수익률
등을 시각적으로 제공하여 리스크와 포지션 상태를 직관적으로 확인할 수 있도록 지원
※ 본 전략은 교육·연구·백테스트 용도로 제공되며,
어떠한 형태의 투자 권유 또는 수익을 보장하지 않습니다.
2. 전략의 핵심 개념
2-1. ATH(역대 최고가) 기준 드로우다운
전략은 차트 상에서 항상 가장 높은 고가(High)를 ATH로 기록합니다.
새로운 고점이 형성될 때마다 ATH를 갱신하고, 해당 ATH를 기준으로 다음을 계산합니다.
현재 바의 저가(Low)가 ATH에서 몇 % 하락했는지
현재 바의 종가(Close)가 ATH에서 몇 % 하락했는지
그리고 사전에 설정한 두 개의 드로우다운 구간에서 매수를 수행합니다.
1차 진입 구간: ATH 대비 X% 하락 시
2차 진입 구간: ATH 대비 Y% 하락 시
각 구간은 ATH가 새로 갱신될 때마다 한 번씩만 작동하며,
새로운 ATH가 생성되면 다시 “1차 / 2차 진입 가능 상태”로 초기화됩니다.
2-2. 첫 포지션 100% / 300% 특수 규칙
이 전략의 중요한 특징은 **“첫 포지션 진입 시의 예외 규칙”**입니다.
전략이 현재 어떠한 포지션도 들고 있지 않은 상태에서
최초로 롱 포지션을 진입하는 시점(첫 포지션)에 대해:
기본적으로는 **자산의 100%**를 기준으로 포지션을 구축하지만,
만약 그 순간의 가격이 ATH 대비 설정값 이상(예: 약 –72.5% 이상 하락한 상황) 이라면
→ 자산의 300% 규모로 첫 포지션을 진입하도록 설계되어 있습니다.
이 규칙은 다음과 같이 동작합니다.
첫 진입이 1차 드로우다운 구간에서 발생하든,
첫 진입이 2차 드로우다운 구간에서 발생하든,
현재 하락폭이 설정된 기준 이상(예: –72.5% 이상) 이라면
→ “이 정도 하락이면 첫 진입부터 더 공격적으로 들어간다”는 의미로 300% 규모로 진입
그 이하의 하락폭이라면
→ 첫 진입은 100% 규모로 제한
즉, 전략은 다음 두 가지 모드로 동작합니다.
일반적인 상황의 첫 진입: 자산의 100%
심각한 드로우다운 구간에서의 첫 진입: 자산의 300%
이 특수 규칙은 깊은 하락에서는 공격적으로, 평소에는 상대적으로 보수적으로 진입하도록 설계된 것입니다.
3. 전략 동작 구조
3-1. 매수 조건
차트 상 High 기준으로 ATH를 추적합니다.
각 바마다 해당 ATH에서의 하락률을 계산합니다.
사용자가 설정한 두 개의 드로우다운 구간(예시):
1차 구간: 예를 들어 ATH – 50%
2차 구간: 예를 들어 ATH – 72.5%
각 구간에 대해 다음과 같은 조건을 확인합니다.
“이번 ATH 구간에서 아직 해당 구간 매수를 한 적이 없는 상태”이고,
현재 바의 저가(Low)가 해당 구간 가격 이하를 찍는 순간
→ 해당 바에서 매수 조건 충족으로 간주
실제 주문은:
해당 구간 가격에 맞춰 롱 포지션 진입(리밋/시장가 기반 시뮬레이션) 으로 처리됩니다.
3-2. ATH 갱신과 진입 기회 리셋
차트 상에서 새로운 고점(High)이 기존 ATH를 넘어서는 순간,
ATH가 갱신되고,
1차 / 2차 진입 여부를 나타내는 내부 플래그가 초기화됩니다.
이를 통해, 시장이 새로운 고점을 돌파해 나갈 때마다,
해당 구간에서 다시 한 번씩 1차·2차 드로우다운 진입 기회를 갖게 됩니다.
4. 포지션 사이징 및 레버리지
4-1. 계좌 자산(Equity) 기준 포지션 크기 결정
전략은 현재 계좌 자산을 다음과 같이 정의하여 사용합니다.
현재 자산 = 초기 자본 + 실현 손익 + 미실현 손익
각 진입 구간에서의 포지션 가치는 다음과 같이 결정됩니다.
1차 진입 구간:
“자산의 몇 %를 사용할지”를 설정값으로 입력
설정된 퍼센트를 계좌 자산에 곱한 뒤,
다시 전략 내 레버리지 배수(Leverage) 를 곱하여 실제 포지션 가치를 계산
2차 진입 구간:
동일한 방식으로, 독립된 퍼센트 설정값을 사용
즉, 포지션 가치는 다음과 같이 계산됩니다.
포지션 가치 = 현재 자산 × (해당 구간 설정 % / 100) × 레버리지 배수
그리고 이를 해당 구간의 진입 가격으로 나누어 실제 수량(토큰 단위) 를 산출합니다.
4-2. 첫 포지션의 예외 처리 (100% / 300%)
첫 포지션에 대해서는 위의 일반적인 퍼센트 설정 대신,
다음과 같은 고정 비율이 사용됩니다.
기본: 자산의 100% 규모로 첫 포지션 진입
단, 진입 시점의 ATH 대비 하락률이 설정값 이상(예: –72.5% 이상) 일 경우
→ 자산의 300% 규모로 첫 포지션 진입
이때 역시 다음 공식을 사용합니다.
포지션 가치 = 현재 자산 × (100% 또는 300%) × 레버리지
그리고 이를 가격으로 나누어 실제 진입 수량을 계산합니다.
이 규칙은:
첫 진입이 1차 구간이든 2차 구간이든 동일하게 적용되며,
“충분히 깊은 하락 구간에서는 첫 진입부터 더 크게,
평소에는 비교적 보수적으로” 라는 운용 철학을 반영합니다.
4-3. 실레버리지(Real Leverage)의 추적
전략은 각 바 단위로 다음을 추적합니다.
바가 시작할 때의 기존 포지션 크기
해당 바에서 새로 진입한 수량
이를 바탕으로, 진입이 발생한 시점에 다음을 계산합니다.
실제 레버리지 = (포지션 가치 / 현재 자산)
그리고 차트 상에 예를 들어:
Lev 2.53x 와 같은 형식의 레이블로 표시합니다.
이를 통해, 매수 시점마다 실제 계좌 레버리지가 어느 정도였는지를 직관적으로 확인할 수 있습니다.
5. 시각화 및 모니터링 요소
5-1. 차트 상 시각 요소
전략은 차트 위에 다음과 같은 정보를 직접 표시합니다.
ATH 라인
High 기준으로 계산된 역대 최고가를 주황색 선으로 표시
평단가(평균 진입가) 라인
현재 보유 포지션이 있을 때,
해당 포지션의 평균 진입가를 노란색 선으로 표시
추정 청산가(고정형 청산가) 라인
포지션 수량이 변화하는 시점을 감지하여,
당시의 평단가와 실제 레버리지를 이용해 근사적인 청산가를 계산
이를 빨간색 선으로 차트에 고정 표시
포지션이 없거나 레버리지가 1배 이하인 경우에는 청산가 라인을 제거
매수 마커 및 레이블
1차/2차 매수 조건이 충족될 때마다 해당 지점에 매수 마커를 표시
"Buy XX% @ 가격", "Lev XXx" 형태의 라벨로
진입 비율과 당시 레버리지를 함께 시각화
레이블의 위치는 설정에서 선택 가능:
바 아래 (Below Bar)
바 위 (Above Bar)
실제 가격 위치 (At Price)
5-2. 우측 상단 정보 테이블
차트 우측 상단에는 현재 계좌·포지션 상태를 요약한 정보 테이블이 표시됩니다.
대표적으로 다음 항목들이 포함됩니다.
Pos Qty (Token)
현재 보유 중인 포지션 수량(토큰 기준, 절대값 기준)
Pos Value (USDT)
현재 포지션의 시장 가치 (수량 × 현재 가격)
Leverage (Now)
현재 실레버리지 (포지션 가치 / 현재 자산)
DD from ATH (%)
현재 가격 기준, 최근 ATH에서의 하락률(%)
Avg Entry
현재 포지션의 평균 진입 가격
PnL (%)
현재 포지션 기준 미실현 손익률(%)
Max DD (Equity %)
전략 전체 기간 동안 기록된 계좌 기준 최대 손실(MDD, Max Drawdown)
Last Entry Price
가장 최근에 포지션을 추가로 진입한 직후의 평균 진입 가격
Last Entry Lev
위 “Last Entry Price” 시점에서의 실레버리지
Liq Price (Fixed)
위에서 설명한 고정형 추정 청산가
Return from Start (%)
전략 시작 시점(초기 자본) 대비 현재 계좌 자산의 총 수익률(%)
이 테이블을 통해 사용자는:
현재 계좌와 포지션의 상태
리스크 수준
누적 성과
를 직관적으로 파악할 수 있습니다.
6. 시간 필터 및 라벨 옵션
6-1. 전략 동작 기간 설정
전략은 옵션으로 특정 기간에만 전략을 동작시키는 시간 필터를 제공합니다.
“Use Date Range” 옵션을 활성화하면:
시작 시각과 종료 시각을 지정하여
해당 구간에 한해서만 매매가 발생하도록 제한
옵션을 비활성화하면:
전략은 전체 차트 구간에서 자유롭게 동작
6-2. 진입 라벨 위치 설정
사용자는 매수/레버리지 라벨의 위치를 선택할 수 있습니다.
바 아래 (Below Bar)
바 위 (Above Bar)
실제 가격 위치 (At Price)
이를 통해 개인 취향 및 차트 가독성에 맞추어
시각화 방식을 유연하게 조정할 수 있습니다.
7. 활용 대상 및 사용 예시
본 전략은 다음과 같은 목적에 적합합니다.
현물 또는 선물 롱 포지션 기준 장기·스윙 관점 추매 전략 백테스트
“고점 대비 하락률”을 기준으로 한 규칙 기반 운용 아이디어 검증
레버리지 사용 시
계좌 레버리지·청산가·MDD를 동시에 모니터링하고자 하는 경우
특정 자산에 대해
“새로운 고점이 형성될 때마다
일정한 규칙으로 깊은 조정 구간에서만 분할 진입하고자 할 때”
실거래에 그대로 적용하기보다는,
전략 아이디어 검증 및 리스크 프로파일 분석,
자신의 성향에 맞는 파라미터 탐색 용도로 사용하는 것을 권장합니다.
8. 한계 및 유의사항
백테스트 결과는 미래 성과를 보장하지 않습니다.
과거 데이터에 기반한 시뮬레이션일 뿐이며,
실제 시장에서는
유동성
슬리피지
수수료 체계
강제청산 규칙
등 다양한 변수가 존재합니다.
청산가는 단순화된 공식에 따른 추정치입니다.
거래소별 실제 청산 규칙, 유지 증거금, 수수료, 펀딩비 등은
본 전략의 계산과 다를 수 있으며,
청산가 추정 라인은 참고용 지표일 뿐입니다.
레버리지 및 진입 비율 설정에 따라 손실 폭이 매우 커질 수 있습니다.
특히 **“첫 포지션 300% 진입”**과 같이 매우 공격적인 설정은
시장 급락 시 계좌 손실과 청산 리스크를 크게 증가시킬 수 있으므로
신중한 검토가 필요합니다.
실거래 연동 시에는 별도의 리스크 관리가 필수입니다.
개별 손절 기준
포지션 상한선
전체 포트폴리오 내 비중 관리 등
본 전략 외부에서 추가적인 안전장치가 필요합니다.
9. 결론
ATH Drawdown Re-Buy Long Only 전략은 단순한 “저가 매수”를 넘어서,
ATH 기준으로 드로우다운을 구조적으로 활용하고,
첫 포지션에 대한 **특수 규칙(100% / 300%)**을 적용하며,
레버리지·청산가·MDD·수익률을 통합적으로 시각화함으로써,
하락 구간에서의 규칙 기반 롱 포지션 구축과
리스크 모니터링을 동시에 지원하는 전략입니다.
사용자는 본 전략을 통해:
자신의 시장 관점과 리스크 허용 범위에 맞는
드로우다운 구간
진입 비율
레버리지 설정
다양한 시나리오에 대한 백테스트와 분석
을 수행할 수 있습니다.
다시 한 번 강조하지만,
본 전략은 연구·학습·백테스트를 위한 도구이며,
실제 투자 판단과 책임은 전적으로 사용자 본인에게 있습니다.
/ENG Version.
This script is designed to use historical drawdown data and automatically enter positions when a predefined percentage drop from the all-time high occurs, using a predefined percentage of your account equity.
You can use leverage, and default parameter values are provided out of the box (you can freely change them to suit your style).
In addition to the two main entry levels, you can add more entry conditions and custom entry percentages – just ask ChatGPT to modify the script.
For actual/live usage, please turn OFF the KillSwitch function and turn ON the Bar Magnifier feature.
ATH Drawdown Re-Buy Long Only Strategy
1. Strategy Overview
The ATH Drawdown Re-Buy Long Only strategy is an automatic re-buy (Long Only) system that builds long positions step-by-step at specific drawdown levels, based on the asset’s all-time high (ATH) and its subsequent drawdown.
This strategy is designed with the following goals:
Systematic scaled buying and leverage usage during sharp correction periods
Clear, rule-based entry logic using drawdowns from ATH
Real-time visualization of:
Average entry price
Leverage
Estimated liquidation price
Account MDD (Max Drawdown)
Return / performance
This allows traders to intuitively monitor both risk and position status.
※ This strategy is provided for educational, research, and backtesting purposes only.
It does not constitute investment advice and does not guarantee any profits.
2. Core Concepts
2-1. Drawdown from ATH (All-Time High)
On the chart, the strategy always tracks the highest high as the ATH.
Whenever a new high is made, ATH is updated, and based on that ATH the following are calculated:
How many percent the current bar’s Low is below the ATH
How many percent the current bar’s Close is below the ATH
Using these, the strategy executes buys at two predefined drawdown zones:
1st entry zone: When price drops X% from ATH
2nd entry zone: When price drops Y% from ATH
Each zone is allowed to trigger only once per ATH cycle.
When a new ATH is created, the “1st / 2nd entry possible” flags are reset, and new opportunities open up for that ATH leg.
2-2. Special Rule for the First Position (100% / 300%)
A key feature of this strategy is the special rule for the very first position.
When the strategy currently holds no position and is about to open the first long position:
Under normal conditions, it builds the position using 100% of account equity.
However, if at that moment the price has dropped by at least a predefined threshold from ATH (e.g. around –72.5% or more),
→ the strategy will open the first position using 300% of account equity.
This rule works as follows:
Whether the first entry happens at the 1st drawdown zone or at the 2nd drawdown zone,
If the current drawdown from ATH is at or below the threshold (e.g. –72.5% or worse),
→ the strategy interprets this as “a sufficiently deep crash” and opens the initial position with 300% of equity.
If the drawdown is less severe than the threshold,
→ the first entry is capped at 100% of equity.
So the strategy has two modes for the first entry:
Normal market conditions: 100% of equity
Deep drawdown conditions: 300% of equity
This special rule is intended to be aggressive in extremely deep crashes while staying more conservative in normal corrections.
3. Strategy Logic & Execution
3-1. Entry Conditions
The strategy tracks the ATH using the High price.
For each bar, it calculates the drawdown from ATH.
The user defines two drawdown zones, for example:
1st zone: ATH – 50%
2nd zone: ATH – 72.5%
For each zone, the strategy checks:
If no buy has been executed yet for that zone in the current ATH leg, and
If the current bar’s Low touches or falls below that zone’s price level,
→ That bar is considered to have triggered a buy condition.
Order simulation:
The strategy simulates entering a long position at that zone’s price level
(using a limit/market-like approximation for backtesting).
3-2. ATH Reset & Entry Opportunity Reset
When a new High goes above the previous ATH:
The ATH is updated to this new high.
Internal flags that track whether the 1st and 2nd entries have been used are reset.
This means:
Each time the market makes a new ATH,
The strategy once again has a fresh opportunity to execute 1st and 2nd drawdown entries for that new ATH leg.
4. Position Sizing & Leverage
4-1. Position Size Based on Account Equity
The strategy defines current equity as:
Current Equity = Initial Capital + Realized PnL + Unrealized PnL
For each entry zone, the position value is calculated as follows:
The user inputs:
“What % of equity to use at this zone”
The strategy:
Multiplies current equity by that percentage
Then multiplies by the strategy’s leverage factor
Thus:
Position Value = Current Equity × (Zone % / 100) × Leverage
Finally, this position value is divided by the entry price to determine the actual position size in tokens.
4-2. Exception for the First Position (100% / 300%)
For the very first position (when there is no open position),
the strategy does not use the zone % parameters. Instead, it uses fixed ratios:
Default: Enter the first position with 100% of equity.
If the drawdown from ATH at that moment is greater than or equal to a predefined threshold (e.g. –72.5% or more)
→ Enter the first position with 300% of equity.
The position value is computed as:
Position Value = Current Equity × (100% or 300%) × Leverage
Then it is divided by the entry price to obtain the token quantity.
This rule:
Applies regardless of whether the first entry occurs at the 1st zone or 2nd zone.
Embeds the philosophy:
“In very deep crashes, go much larger on the first entry; otherwise, stay more conservative.”
4-3. Tracking Real Leverage
On each bar, the strategy tracks:
The existing position size at the start of the bar
The newly added size (if any) on that bar
When a new entry occurs, it calculates the real leverage at that moment:
Real Leverage = (Position Value / Current Equity)
This is then displayed on the chart as a label, for example:
Lev 2.53x
This makes it easy to see the actual leverage level at each entry point.
5. Visualization & Monitoring
5-1. On-Chart Visual Elements
The strategy plots the following directly on the chart:
ATH Line
The all-time high (based on High) is plotted as an orange line.
Average Entry Price Line
When a position is open, the average entry price of that position is plotted as a yellow line.
Estimated Liquidation Price (Fixed) Line
The strategy detects when the position size changes.
At each size change, it uses the current average entry price and real leverage to compute an approximate liquidation price.
This “fixed liquidation price” is then plotted as a red line on the chart.
If there is no position, or if leverage is 1x or lower, the liquidation line is removed.
Entry Markers & Labels
When 1st/2nd entry conditions are met, the strategy:
Marks the entry point on the chart.
Displays labels such as "Buy XX% @ Price" and "Lev XXx",
showing both entry percentage and real leverage at that time.
The label placement is configurable:
Below Bar
Above Bar
At Price
5-2. Information Table (Top-Right Panel)
In the top-right corner of the chart, the strategy displays a summary table of the current account and position status. It typically includes:
Pos Qty (Token)
Absolute size of the current position (in tokens)
Pos Value (USDT)
Market value of the current position (qty × current price)
Leverage (Now)
Current real leverage (position value / current equity)
DD from ATH (%)
Current drawdown (%) from the latest ATH, based on current price
Avg Entry
Average entry price of the current position
PnL (%)
Unrealized profit/loss (%) of the current position
Max DD (Equity %)
The maximum equity drawdown (MDD) recorded over the entire backtest period
Last Entry Price
Average entry price immediately after the most recent add-on entry
Last Entry Lev
Real leverage at the time of the most recent entry
Liq Price (Fixed)
The fixed estimated liquidation price described above
Return from Start (%)
Total return (%) of equity compared to the initial capital
Through this table, users can quickly grasp:
Current account and position status
Current risk level
Cumulative performance
6. Time Filters & Label Options
6-1. Strategy Date Range Filter
The strategy provides an option to restrict trading to a specific time range.
When “Use Date Range” is enabled:
You can specify start and end timestamps.
The strategy will only execute trades within that range.
When this option is disabled:
The strategy operates over the entire chart history.
6-2. Entry Label Placement
Users can customize where entry/leverage labels are drawn:
Below Bar (Below Bar)
Above Bar (Above Bar)
At the actual price level (At Price)
This allows you to adjust visualization according to personal preference and chart readability.
7. Use Cases & Applications
This strategy is suitable for the following purposes:
Long-term / swing-style re-buy strategies for spot or futures long positions
Testing rule-based strategies that rely on “drawdown from ATH” as a main signal
Monitoring account leverage, liquidation price, and MDD when using leverage
Handling situations where, for a given asset:
“Every time a new ATH is formed,
you want to wait for deep corrections and enter only at specific drawdown zones”
It is generally recommended to use this strategy not as a direct plug-and-play live system, but as a tool for:
Strategy idea validation
Risk profile analysis
Parameter exploration to match your personal risk tolerance and style
8. Limitations & Warnings
Backtest results do not guarantee future performance.
They are based on historical data only.
In live markets, additional factors exist:
Liquidity
Slippage
Fee structures
Exchange-specific liquidation rules
Funding fees, etc.
The liquidation price is only an approximate estimate, derived from a simplified formula.
Actual liquidation rules, maintenance margin requirements, fees, and other details differ by exchange.
The liquidation line should be treated as a reference indicator, not an exact guarantee.
Depending on the configured leverage and entry percentages, losses can be very large.
In particular, extremely aggressive settings such as “first position 300% of equity” can greatly increase the risk of large account drawdowns and liquidation during sharp market crashes.
Use such settings with extreme caution.
For live trading, additional risk management is essential:
Your own stop-loss rules
Maximum position size limits
Portfolio-level exposure controls
And other external safety mechanisms beyond this strategy
9. Conclusion
The ATH Drawdown Re-Buy Long Only strategy goes beyond simple “buy the dip” logic. It:
Systematically utilizes drawdowns from ATH as a structural signal
Applies a special first-position rule (100% / 300%)
Integrates visualization of leverage, liquidation price, MDD, and returns
All of this supports rule-based long position building in drawdown phases and comprehensive risk monitoring.
With this strategy, users can:
Explore different:
Drawdown zones
Entry percentages
Leverage levels
Run various backtests and scenario analyses
Better understand the risk/return profile that fits their own market view and risk tolerance
Once again, this strategy is intended for research, learning, and backtesting only.
All real trading decisions and their consequences are solely the responsibility of the user.
LGZ – Liquidity Gravity Zones v1 📌 LGZ – Liquidity Gravity Zones (SVI + Net CVD + Volume)
Original Liquidity-Driven Price Magnet Model by Thomas Aaroon
📘 Concept Overview
LGZ (Liquidity Gravity Zones) is a new, original liquidity-based price-attraction model built using three core components:
SVI (Shock Volume Index) – measures abnormal volume spikes at each strike
Net CVD (NCP = CE_CVD − PE_CVD) – the real directional order-flow imbalance
Total Volume (CE + PE) – true liquidity density at each strike
Using these three elements, the indicator calculates Liquidity Gravity Weight (LGW) for every strike and identifies the strongest zones that attract price during the session.
🧠 Why This Indicator?
Traditional OI-based methods (long build-up, short build-up, OI change etc.) often lag.
LGZ focuses only on:
Real traded volume
Actual buy/sell aggression (CVD)
Shock events
Dealer hedging pressure
Strike-level liquidity clusters
This makes it far more responsive for intraday traders.
⭐ Core Formula
Liquidity Gravity Weight (LGW)
LGW = |SVI| × |Net CVD| × Total Volume
Where:
SVI = Shock Volume Index (Z-score based)
Net CVD (NCP) = CE_CVD − PE_CVD
Total Volume = CE_volume + PE_volume
LGW indicates how strongly a strike is pulling price toward it.
🎯 What the Indicator Shows
✔ Top Liquidity Gravity Zones (LGZ-1, LGZ-2, LGZ-3)
These are the strongest price magnets for the day.
✔ Gravity Lines on Chart
Each LGZ is plotted as a horizontal magnet line extending to the right.
✔ Strike-Level Liquidity Table
Shows:
Strike
SVI (Shock intensity)
LGW (Gravity strength)
This table gives a complete picture of the intraday liquidity landscape.
📈 How to Use (Intraday Trading Strategy)
🔵 1. Price gravitates toward LGZ-1
If price is below LGZ-1 → upward pull
If price is above LGZ-1 → downward pull
🔵 2. LGZ Flips = Trend Change
If LGZ-1 suddenly jumps to a different strike:
→ strong trend acceleration
🔵 3. LGZ Cluster = Reversal / Consolidation Zone
Multiple LGZ levels around the same strike indicate
→ liquidity saturation → reversal or slowdown.
🔵 4. Combine with Price Action
Best clarity on 5-minute timeframe
Use 1-minute only for entry.
🔬 Why LGZ Works
The indicator models the same reality driving option markets:
Where option volume + orderflow (CVD) + shock liquidity concentrate,
market makers hedge, and price moves toward that strike.
This is the foundation of dealer hedging mechanics and liquidity-based price movement.
🔧 Inputs
Symbol prefix (e.g., NIFTY)
Expiry (YYMMDD)
Center strike & range
Number of gravity zones
Color customization
920 Order Flow SATY ATR//@version=6
indicator("Order-Flow / Volume Signals (No L2)", overlay=true)
//======================
// Inputs
//======================
rvolLen = input.int(20, "Relative Volume Lookback", minval=5)
rvolMin = input.float(1.1, "Min Relative Volume (× avg)", step=0.1)
wrbLen = input.int(20, "Wide-Range Lookback", minval=5)
wrbMult = input.float(1, "Wide-Range Multiplier", step=0.1)
upperCloseQ = input.float(0.60, "Close near High (0-1)", minval=0.0, maxval=1.0)
lowerCloseQ = input.float(0.40, "Close near Low (0-1)", minval=0.0, maxval=1.0)
cdLen = input.int(25, "Rolling CumDelta Window", minval=5)
useVWAP = input.bool(true, "Use VWAP Bias Filter")
showSignals = input.bool(true, "Show Long/Short OF Triangles")
//======================
// Core helpers
//======================
rng = high - low
tr = ta.tr(true)
avgTR = ta.sma(tr, wrbLen)
wrb = rng > wrbMult * avgTR
// Relative Volume
volAvg = ta.sma(volume, rvolLen)
rvol = volAvg > 0 ? volume / volAvg : 0.0
// Close location in bar (0..1)
clo = rng > 0 ? (close - low) / rng : 0.5
// VWAP (session) + SMAs
vwap = ta.vwap(close)
sma9 = ta.sma(close, 9)
sma20 = ta.sma(close, 20)
sma200= ta.sma(close, 200)
// CumDelta proxy (uptick/downtick signed volume)
tickSign = close > close ? 1.0 : close < close ? -1.0 : 0.0
delta = volume * tickSign
cumDelta = ta.cum(delta)
rollCD = cumDelta - cumDelta
//======================
// Signal conditions
//======================
volActive = rvol >= rvolMin
effortBuy = wrb and clo >= upperCloseQ
effortSell = wrb and clo <= lowerCloseQ
cdUp = ta.crossover(rollCD, 0)
cdDown = ta.crossunder(rollCD, 0)
biasBuy = not useVWAP or close > vwap
biasSell = not useVWAP or close < vwap
longOF = barstate.isconfirmed and volActive and effortBuy and cdUp and biasBuy
shortOF = barstate.isconfirmed and volActive and effortSell and cdDown and biasSell
//======================
// Plot ONLY on price chart
//======================
// SMAs & VWAP
plot(sma9, title="9 SMA", color=color.orange, linewidth=3)
plot(sma20, title="20 SMA", color=color.white, linewidth=3)
plot(sma200, title="200 SMA", color=color.black, linewidth=3)
plot(vwap, title="VWAP", color=color.new(color.aqua, 0), linewidth=3)
// Triangles with const text (no extra pane)
plotshape(showSignals and longOF, title="LONG OF",
style=shape.triangleup, location=location.belowbar, size=size.tiny,
color=color.new(color.green, 0), text="LONG OF")
plotshape(showSignals and shortOF, title="SHORT OF",
style=shape.triangledown, location=location.abovebar, size=size.tiny,
color=color.new(color.red, 0), text="SHORT OF")
// Alerts
alertcondition(longOF, title="LONG OF confirmed", message="LONG OF confirmed")
alertcondition(shortOF, title="SHORT OF confirmed", message="SHORT OF confirmed")
//────────────────────────────
// End-of-line labels (offset to the right)
//────────────────────────────
var label label9 = na
var label label20 = na
var label label200 = na
var label labelVW = na
if barstate.islast
// delete old labels before drawing new ones
label.delete(label9)
label.delete(label20)
label.delete(label200)
label.delete(labelVW)
// how far to move the labels rightward (increase if needed)
offsetBars = input.int(3)
label9 := label.new(bar_index + offsetBars, sma9, "9 SMA", style=label.style_label_left, textcolor=color.white, color=color.new(color.orange, 0))
label20 := label.new(bar_index + offsetBars, sma20, "20 SMA", style=label.style_label_left, textcolor=color.black, color=color.new(color.white, 0))
label200 := label.new(bar_index + offsetBars, sma200, "200 SMA", style=label.style_label_left, textcolor=color.white, color=color.new(color.black, 0))
labelVW := label.new(bar_index + offsetBars, vwap, "VWAP", style=label.style_label_left, textcolor=color.black, color=color.new(color.aqua, 0))
//────────────────────────────────────────────────────────────────────
//────────────────────────────────────────────
// Overnight High/Low + HOD/LOD (no POC)
//────────────────────────────────────────────
sessionRTH = input.session("0930-1600", "RTH Session (exchange tz)")
levelWidth = input.int(2, "HL line width", minval=1, maxval=5)
labelOffsetH = input.int(10, "HL label offset (bars to right)", minval=0)
isRTH = not na(time(timeframe.period, sessionRTH))
rthOpen = isRTH and not isRTH
// --- Track Overnight High/Low during NON-RTH; freeze at RTH open
// --- Track Overnight High/Low during NON-RTH; freeze at RTH open
var float onHigh = na
var float onLow = na
var int onHighBar = na
var int onLowBar = na
var float onHighFix = na
var float onLowFix = na
var int onHighFixBar = na
var int onLowFixBar = na
if not isRTH
if na(onHigh) or high > onHigh
onHigh := high
onHighBar := bar_index
if na(onLow) or low < onLow
onLow := low
onLowBar := bar_index
if rthOpen
onHighFix := onHigh
onLowFix := onLow
onHighFixBar := onHighBar
onLowFixBar := onLowBar
onHigh := na, onLow := na
onHighBar := na, onLowBar := na
// ──────────────────────────────────────────
// Candle coloring + labels for 9/20/VWAP crosses
// ──────────────────────────────────────────
showCrossLabels = input.bool(true, "Show cross labels")
// Helpers
minAll = math.min(math.min(sma9, sma20), vwap)
maxAll = math.max(math.max(sma9, sma20), vwap)
// All three lines
goldenAll = open <= minAll and close >= maxAll
deathAll = open >= maxAll and close <= minAll
// 9/20 only (exclude cases that also crossed VWAP)
dcUpOnly = open <= math.min(sma9, sma20) and close >= math.max(sma9, sma20) and not goldenAll
dcDownOnly = open >= math.max(sma9, sma20) and close <= math.min(sma9, sma20) and not deathAll
// Candle colors (priority: all three > 9/20 only)
var color cCol = na
cCol := goldenAll ? color.yellow : deathAll ? color.black :dcUpOnly ? color.lime :dcDownOnly ? color.red : na
barcolor(cCol)
// Labels
plotshape(showCrossLabels and barstate.isconfirmed and goldenAll, title="GOLDEN CROSS",
style=shape.labelup, location=location.belowbar, text="GOLDEN CROSS",
color=color.new(color.yellow, 0), textcolor=color.black, size=size.tiny)
plotshape(showCrossLabels and barstate.isconfirmed and deathAll, title="DEATH CROSS",
style=shape.labeldown, location=location.abovebar, text="DEATH CROSS",
color=color.new(color.black, 0), textcolor=color.white, size=size.tiny)
plotshape(showCrossLabels and barstate.isconfirmed and dcUpOnly, title="DC UP",
style=shape.labelup, location=location.belowbar, text="DC UP",
color=color.new(color.lime, 0), textcolor=color.black, size=size.tiny)
plotshape(showCrossLabels and barstate.isconfirmed and dcDownOnly, title="DC DOWN",
style=shape.labeldown, location=location.abovebar, text="DC DOWN",
color=color.new(color.red, 0), textcolor=color.white, size=size.tiny)
// ──────────────────────────────────────────
// Audible + alert conditions
// ──────────────────────────────────────────
alertcondition(goldenAll, title="GOLDEN CROSS", message="GOLDEN CROSS detected")
alertcondition(deathAll, title="DEATH CROSS", message="DEATH CROSS detected")
alertcondition(dcUpOnly, title="DC UP", message="Dual Cross UP detected")
alertcondition(dcDownOnly,title="DC DOWN", message="Dual Cross DOWN detected")
Session Indicator by FlipPointThe indicator is designed to display trading sessions on a TradingView chart. It highlights the time ranges of major sessions such as Frankfurt, London, New York, and Asia, providing the ability to analyze price behavior during different periods of the trading day.
Functional settings
1. Show history
Enables or disables the display of sessions on historical parts of the chart. If disabled, only today's sessions are shown.
2. Show Frankfurt / London / New York / Asia
Each parameter is responsible for displaying the corresponding trading session. When enabled, a highlighted zone appears on the chart, representing the time boundaries of that session.
3. Show titles
Displays text labels with the name of each session.
4. Color settings
Determines the fill color of the highlighted zones for the respective sessions.
5. Label text color
Defines the color of the session title labels.
6. PDH / PDL parameters
Show PDH — displays the previous day’s high (Previous Day High).
Show PDL — displays the previous day’s low (Previous Day Low).
PDH/PDL lines color — sets the color of the lines representing these levels.
Time zone alignment
The indicator is automatically aligned with the time zone set in the TradingView chart settings. The time boundaries of the sessions adjust to the selected time zone without requiring manual adjustments. This ensures accurate session display regardless of the user’s local time.
Session Indicator by FlipPointThe indicator is designed to display trading sessions on a TradingView chart. It highlights the time ranges of major sessions such as Frankfurt, London, New York, and Asia, providing the ability to analyze price behavior during different periods of the trading day.
Functional settings
1. Show history
Enables or disables the display of sessions on historical parts of the chart. If disabled, only today's sessions are shown.
2. Show Frankfurt / London / New York / Asia
Each parameter is responsible for displaying the corresponding trading session. When enabled, a highlighted zone appears on the chart, representing the time boundaries of that session.
3. Show titles
Displays text labels with the name of each session.
4. Color settings
Determines the fill color of the highlighted zones for the respective sessions.
5. Label text color
Defines the color of the session title labels.
PDH / PDL parameters
Show PDH — displays the previous day’s high (Previous Day High).
Show PDL — displays the previous day’s low (Previous Day Low).
PDH/PDL lines color — sets the color of the lines representing these levels.
Time zone alignment
The indicator is automatically aligned with the time zone set in the TradingView chart settings. The time boundaries of the sessions adjust to the selected time zone without requiring manual adjustments. This ensures accurate session display regardless of the user’s local time.
SMC MTF + FVG + Trailing TP 100% [FIXED]Component Description
Entry Timeframe: H1
Trend Filter: D1 (EMA50 vs EMA200)
Trend Filter Only enter BUY orders if EMA50 > EMA200 on D1 (uptrend)
Only enter SELL orders if EMA50 < EMA200 (downtrend)
Break of Structure (BOS) Identify the previous swing high/low breakout point
Order Block (OB) The candle area before BOS is marked with an orange box
Fair Value Gap (FVG) Check for the presence of a price gap to confirm Entry
Trailing TP Trigger trailing after reaching the desired R (in pips or ATR)
区间顶底与超级趋势系统Overview:
This is a comprehensive trading system designed to capture both trend reversals and trend-following opportunities. This script combines three core modules: Long-term EMA Tunnels (Vegas Style), Dynamic Support/Resistance Zones (based on historical highs/lows), and the classic SuperTrend. It aims to help traders identify "buy low, sell high" opportunities in ranging markets and catch major waves during strong trends.
Core Features Explained
1. EMA Long-term Trend Tunnel
Configuration: The script includes three specific Exponential Moving Averages (EMAs): 144, 169, and 233.
Function: These lines form a long-term support and resistance band. Price action above these lines is generally considered a bullish trend, while price below indicates a bearish trend.
2. Dynamic Range Top/Bottom
Logic: Calculates the current market structure based on the highest and lowest prices over a specific lookback period (default 130 bars), combined with ATR (Average True Range).
Visualization: Automatically draws Resistance Boxes (Red zone) at the top and Support Boxes (Green zone) at the bottom.
Data Panel: Displays the current ATR volatility percentage and a count of Bullish/Bearish K-lines within the period to help gauge the balance of power between buyers and sellers.
Signals: Reversal arrows appear when price tests these extreme zones and shows signs of rejection.
3. SuperTrend Integration
Tool: A classic trend-following indicator based on ATR and median price.
Usage: Acts as a reliable market noise filter. When SuperTrend is green, it is recommended to look for long setups; when red, look for short setups.
Highlighting: The script supports background highlighting, allowing you to identify the current trend direction at a glance.
How to Use This System
Trend Following Strategy: When the EMA lines are aligned upwards and the SuperTrend shows a Buy signal (Green background), look for long entries on pullbacks to the SuperTrend support line or near the EMAs.
Range Reversal Strategy: When price hits the upper or lower limits of the "Dynamic Range" and a SuperTrend flip or arrow reversal signal occurs, consider counter-trend trades.
Stop Loss: It is recommended to place stop losses just outside the SuperTrend line or the Dynamic Range boxes.
Settings
EMA: You can toggle the visibility of the EMA lines on or off.
Dynamic Range: Customizable lookback period (Length) and extension settings to fit your timeframe.
SuperTrend: Fully adjustable ATR Period and Multiplier to adapt to different asset volatilities.
Disclaimer: This script is for educational purposes only and does not constitute financial advice.
概述:
这是一个专为捕捉趋势反转与顺势交易设计的综合交易系统。本脚本结合了三大核心模块:长期均线隧道(Vegas风格)、动态支撑阻力区间(基于历史高低点)以及经典的超级趋势(SuperTrend)。旨在帮助交易者在震荡行情中识别高抛低吸的机会,并在趋势行情中抓住主升浪。
核心功能解析
1. EMA 长期趋势隧道 (EMA Tunnel)
脚本内置了三条特定的指数移动平均线 (EMA):144、169 和 233。
这些均线构成了长期趋势的支撑与阻力带。当价格位于这些均线之上时,通常视为多头趋势;反之则为空头趋势。
2. 动态顶底区间 (Dynamic Range Top/Bottom)
原理:基于过去一定周期(默认130根K线)内的最高价和最低价,结合 ATR(平均真实波幅)计算出当前的市场结构。
视觉化:图表中会自动绘制出顶部的阻力箱体(红色区域)和底部的支撑箱体(绿色区域)。
数据面板:箱体旁会显示当前的 ATR 波动率百分比,以及该周期内的 K 线买入/卖出计数,帮助判断多空力量对比。
信号:当价格触及这些极限区域并出现反转迹象时,会显示箭头提示。
3. 超级趋势 (SuperTrend)
经典的趋势跟踪工具,基于 ATR 和价格中位数计算。
用法:用于过滤市场噪音。当超级趋势为绿色时,建议只寻找做多机会;为红色时,建议只寻找做空机会。
高亮显示:脚本支持背景高亮,让你一目了然当前的趋势方向。
如何使用本指标进行交易
顺势交易:当 EMA 均线向上排列且 SuperTrend 显示买入信号(绿色背景)时,关注回调至 SuperTrend 支撑线或 EMA 附近的做多机会。
区间反转:当价格触及“动态顶底区间”的上沿或下沿,并且出现 SuperTrend 变色或箭头反转信号时,可考虑反向操作。
止损建议:建议将止损设置在 SuperTrend 线或动态箱体的外侧。
设置说明
你可以开启/关闭 EMA 显示。
可以自定义顶底区间的计算周期(Length)和延伸长度。
可以调整 SuperTrend 的 ATR 周期和乘数以适应不同的波动率。






















