CoffeeShopCrypto Supertrend Liquidity EngineMost SuperTrend indicators use fixed ATR multipliers that ignore context—forcing traders to constantly tweak settings that rarely adapt well across timeframes or assets.
This Supertrend is a nodd to and a more completion of the work
done by Olivier Seban ( @olivierseban )
This version replaces guesswork with an adaptive factor based on prior session volatility, dynamically adjusting stops to match current conditions. It also introduces liquidity-aware zones, real-time strength histograms, and a visual control panel—making your stoploss smarter, more responsive, and aligned with how the market actually moves.
📏 The Multiplier Problem & Adaptive Factor Solution
Traditional SuperTrend indicators rely on fixed ATR multipliers—often arbitrary numbers like 1.5, 2, or 3. The issue? No logical basis ties these values to actual market conditions. What works on a 5-minute Nasdaq chart fails on a daily EUR/USD chart. Traders spend hours tweaking multipliers per asset, timeframe, or volatility phase—and still end up with stoplosses that are either too tight or too loose. Worse, the market doesn’t care about your setting—it behaves according to underlying volatility, not your parameter.
This version fixes that by automating the multiplier selection entirely. It uses a 4-zone model based on the current ATR relative to the previous session’s ATR, dynamically adjusting the SuperTrend factor to match current volatility. It eliminates guesswork, adapts to the asset and timeframe, and ensures you’re always using a context-aware stoploss—one that evolves with the market instead of fighting it.
ATR EXAMPLE
Let’s say prior session ATR = 2.00
Now suppose current ATR = 0.32
This places us in Zone 1 (Very Low Volatility)
It doesn’t imply "overbought" or "oversold" — it tells you the market is moving very little, which often means:
Lower risk | Smaller stops | Smaller opportunities (and losses)
🔁 Liquidity Zones vs. Arbitrary Pullbacks
The standard SuperTrend stop loss line often looks like price “barely misses it” before continuing its trend. Traders call this "stop hunting," but what’s really happening is liquidity collection—price pulls back into a zone rich in orders before continuing. The problem? The old SuperTrend doesn’t show this zone. It only draws the outer limit, leaving no visual cue for where entries or continuation moves might realistically originate.
This script introduces 2 levels in the Liquidity Zone. One for Support and one for Stophunts, which draw dynamically between the current price and the SuperTrend line. These levels reflect where the market is most likely to revisit before resuming the trend. By visualizing the area just above the Supertrend stop loss, you can anticipate pullbacks, spot ideal re-entries, and avoid premature exits. This bridges the gap between mechanical stoploss logic and real-world liquidity behavior.
⏳ Prior Session ATR vs. Live ATR
Using real-time ATR to determine movement potential is like driving by looking in your rearview mirror. It’s reactive, not predictive. Traders often base decisions on live ATR, unaware that today’s range is still unfolding —creating volatility mismatches between what’s calculated and what actually matters. Since ATR reflects range, calculating it mid-session gives an incomplete and misleading picture of true volatility.
Instead, this system uses the ATR from the previous session , anchoring your volatility assumptions in a fully-formed price structure . It tells you how far price moved in the last full market phase—be it London, New York, or Tokyo—giving you a more reliable gauge of expected range today. This is a smarter way to estimate how far price could move rather than how far it has moved.
The Smoothing function will take the ATR, Support, Resistance, Stophunt Levels, and the Moving Avearage and smooth them by the calculation you choose.
It will also plot a moving average on your chart against closing prices by the smoothing function you choose.
🧭 Scalping vs. Trending Modes
The market moves in at least 4 phases. Trending, Ranging, Consolidation, Distribution.
Every trader has a different style —some scalp low-volatility moves during off-hours, while others ride macro trends across days. The problem with classic SuperTrend? It treats every market condition the same. A fixed system can’t possibly provide proper stoploss spacing for both a fast scalp and a long-term swing. Traders are forced to rebuild their system every time the market changes character or the session shifts.
This version solves that with a simple toggle:
Scalping or Trend Mode . With one switch, it inverts the logic of the adaptive factor to either tighten or loosen your trailing stops. During low-liquidity hours or consolidation phases, Scalping Mode offers snug stoplosses. During expansion or clear directional bias.
Trend Mode lets the trade breathe. This is flexibility built directly into the logic—not something you have to recalibrate manually.
📉 Histogram Oscillator for Move Strength
In legacy indicators, there’s no built-in way to gauge when the move is losing power . Traders rely on price action or momentum indicators to guess if a trend is fading. But this adds clutter, lag, and often contradiction. The classic SuperTrend doesn’t offer insight into how strong or weak the current trend leg is—only whether price has crossed a line.
This version includes a Trending Liquidity Histogram —a histogram that shows whether the liquidity in the SuperTrend zone is expanding or compressing. When the bars weaken or cross toward zero, it signals liquidity exhaustion . This early warning gives you time to prep for reversals or anticipate pullbacks. It even adapts visually depending on your trading mode, showing color-coded signals for scalping vs. trending behavior. It's both a strength gauge and a trade timing tool—built into your stoploss logic.
Histogram in Scalping Mode
Histogram in Trending Mode
📊 Visual Table for Real-Time Clarity
A major issue with custom indicators is opacity —you don’t always know what settings or values are currently being used. Even worse, if your dynamic logic changes mid-trade, you may not notice unless you go digging into the code or logs. This can create confusion, especially for discretionary traders.
This SuperTrend solves it with a clean visual summary table right on your chart. It shows your current ATR value, adaptive multiplier, trailing stop level, and whether a new zone size is active. That means no surprises and no second-guessing—everything important is visible and updated in real-time.
Indicadores de Banda
MSS + Liquidity Sweep + 50% Entry100% error-free, tested, and compilable Pine Script for your “Market Structure Shift + Liquidity Sweep + 50% Entry” logic. This version handles bar indexing properly, and is optimized for Pine Script v5.
NCrypt30 Breadth Strategy (Long Only, SMA 60, 7% SL)Breadth indication is the top 30 coin on coinbase by marketcap excluding BTC ETH & Stables to show overall alts sentiment. Trade will trigger when breadth hits 0 = the top 30 tokens on coinbase are all under the 60sma on the 4hr timeframe. The strategy has the trade close when breadth hits 100 or hits the stop loss which i have set at 7%, although is changeable to your risk tolerance.
Sessions BrockJavaThis script is a flexible, timezone-aware Session High/Low indicator for TradingView. It is based on the original work of kurtsmock (Mozilla Public License 2.0) and includes enhancements for UTC offset handling and autoscale compatibility.
Features:
Tracks and plots the highest and lowest prices within user-defined trading sessions.
Session times default to UTC, but you can set a custom UTC offset (e.g., -4 for New York, 0 for London, +8 for Singapore).
Reset modes: by session, by a set number of hours, or daily.
Backtesting support: specify a date range to limit indicator activity to historical periods.
Session constraint: restricts operation to specific sessions, with optional weekend inclusion for crypto or 24/7 markets.
Visual customization: choose to display session high/low as lines, background color, or filled regions. All colors and transparencies are user-configurable.
Efficient plotting: session levels are always included in TradingView’s autoscale, so you never lose sight of key levels.
Technical details:
Session definition uses TradingView’s session string format (e.g., 1800-1500).
Timezone handling is automatic and accurate, even with custom offsets.
Designed for high efficiency, supporting up to 5000 bars back and 500 lines.
Credit:
Major credit to kurtsmock, the original author. This version adds UTC offset and improved autoscale support.
License: Mozilla Public License 2.0
If you need session-based high/low levels that always fit your chart and your trading hours, this script is for you.
SMA + Range Breakout StrategyMA + Range Breakout Strategy
This strategy is designed for intraday traders who want to combine trend filtering with structured breakout logic, targeting breakouts beyond the first hour's range only when confirmed by broader trend direction.
🔍 Concept and Originality
This strategy merges two well-established concepts in technical trading:
Trend Filter Using Moving Averages
The strategy uses a short-term (50-period) and long-term (200-period) Simple Moving Average (SMA) to define market trend. Long trades are only considered when the short SMA is above the long SMA (indicating an uptrend), and vice versa for shorts.
Opening Range Breakout (ORB) Logic
The first hour after market open (customizable time window) is used to define a daily high and low range. The strategy then waits for price to break above or below this range — but only after the range window has closed, reducing false breakouts during consolidation.
The originality of this strategy lies in how it tightly integrates time-based range logic with directional bias from SMAs to filter out non-directional breakouts, helping avoid whipsaws in choppy markets.
⚙️ How It Works
Range Calculation: Captures the high and low between user-defined start and end times (default: 09:15 to 10:15).
Trend Confirmation: Uses 50/200 SMAs to determine directional bias.
Entry Logic:
Go long only if in uptrend and price breaks above the range high.
Go short only if in downtrend and price breaks below the range low.
Exit Logic:
Uses a fixed risk:reward ratio (default 1.5:1).
Stop-loss is placed at the opposite end of the range; take-profit is calculated accordingly.
All parameters are fully customizable.
📊 Strategy Settings and Assumptions
Default Account Size: 100,000 units (can be changed by the user)
Risk per Trade: 100% of equity used per position by default (users should adjust this lower, e.g., 1-5%, for realistic backtesting)
Slippage & Commissions: Set to 0 by default; users should input realistic values for live-like performance
Sample Size: This strategy performs best on high-volume instruments (indices, forex, or liquid stocks) and on intraday charts like 5–15 minutes, generating hundreds of trades over a year
📌 Recommendations for Use
Use on 5m or 15m timeframes for intraday setups.
Best applied on assets with strong trending tendencies, like index futures or currency pairs.
Adjust the rangeStart and rangeEnd times according to your market's open.
Add slippage and commission settings in the Strategy Properties for more realistic simulation.
[FS] Time & Cycles Time & Cycles
A comprehensive trading session indicator that helps traders identify and track key market sessions and their price levels. This tool is particularly useful for forex and futures traders who need to monitor multiple trading sessions.
Key Features:
• Multiple Session Support:
- London Session
- New York Session
- Sydney Session
- Asia Session
- Customizable TBD Session
• Session Visualization:
- Clear session boxes with customizable colors
- Session labels with adjustable visibility
- Support for sessions crossing midnight
- Timezone-aware calculations
• Price Level Tracking:
- Daily High/Low levels
- Weekly High/Low levels
- Previous session High/Low levels
- Customizable history depth for each level type
• Customization Options:
- Adjustable colors for each session
- Customizable border styles
- Label visibility controls
- Timezone selection
- History level depth settings
• Technical Features:
- High-performance calculation engine
- Support for multiple timeframes
- Efficient memory usage
- Clean and intuitive visual display
Perfect for:
• Forex traders monitoring multiple sessions
• Futures traders tracking market hours
• Swing traders identifying key session levels
• Day traders planning their trading hours
• Market analysts studying session patterns
The indicator helps traders:
- Identify active trading sessions
- Track session-specific price levels
- Monitor market activity across different time zones
- Plan trades based on session boundaries
- Analyze price action within specific sessions
Note: This indicator is designed to work across all timeframes and is optimized for performance with minimal impact on chart loading times.
Wavy Tunnel con señales Buy/Sell, VWAP y EMA200 + BacktestingBuy/sell signals are generated only when the tunnel (34 EMA low and 34 EMA high) is completely above or below the VWAP, and the price crosses the tunnel (as before).
The 200 EMA is drawn on the chart only as a visual reference; it does not affect the signals or act as a filter.
Multi-Timeframe Entry OKThis indicator performs a multi-timeframe trend-and-momentum check across three timeframes—Daily (“D”), 4-hour (“240”), and 1-hour (“60”). For each timeframe it verifies:
• EMA(9) > EMA(20)
• MACD histogram > 0 (MACD parameters 12,26,9)
If all three timeframe conditions are true, it returns 1; otherwise it returns 0.
Use case:
1. Save and publish this script with “Add to Screener” enabled.
2. In Crypto Screener, go to Filters → Custom and add “Multi-Timeframe Entry OK”.
3. Filter for “Multi-Timeframe Entry OK == 1” to automatically extract symbols that satisfy EMA and MACD trend alignment on Daily, 4H, and 1H.
Parameters:
– EMA periods fixed at 9 and 20
– MACD fixed at 12,26,9
– No external inputs required
This automates multi-timeframe AND logic, ensuring only symbols with aligned trend and momentum on longer and shorter timeframes appear in your screener.
Pocket Pivot Breakoutthis script will show Pivot pocket breakout + institutional buying volume
it will help in identify liquidity rush
EMA Crossover con VWAP, señales Buy/Sell y tabla RSI+MACDindicator("EMA Crossover con VWAP, señales Buy/Sell y tabla RSI+MACD"
Cruce EMA 9 & 21 + VWAP + EMA50, EMA200 + SMA200
indicator("Cruce EMA 9 & 21 + VWAP + EMA50, EMA200 + SMA200", overlay=true)
OBV Strength Relative to Volume (Lakhs View)OBV Strength Relative to Volume (Lakhs View)
Description:
to provide a compact yet powerful insight into volume momentum and price conviction. It's tailored for traders and analysts in markets like India, where high-volume stocks are often better interpreted in lakhs.
💡 Key Features:
OBV Calculation: Cumulative OBV is computed based on price movement direction and volume contribution.
OBV Strength (%): Measures the percentage strength of OBV relative to total volume over a user-defined period. It reflects how strongly volume is contributing to price movements.
Lakhs View: Both OBV and Volume are scaled to lakhs for cleaner readability and practical analysis in high-volume securities.
Historical Table Display:
Displays date-wise OBV, Volume, and OBV Strength for the last N candles (customizable).
Automatically updates every 5 bars or on each bar for real-time analysis.
Color-coded cells for quick visual recognition.
⚙️ Inputs:
OBV Strength Period: Number of bars used to calculate OBV strength (default = 5).
Number of Days in Table: Number of recent bars shown in the on-chart table (default = 5).
📈 Plots:
OBV (Lakhs) – Aqua line.
Volume (Lakhs) – Orange columns.
OBV Strength (%) – Green line indicating momentum strength based on volume.
📍 Ideal Use:
Use this indicator to:
Spot divergences between OBV and price.
Assess the strength of volume behind a trend.
Track consistency and spikes in volume-backed price moves.
Quickly scan recent trends with a clear numerical and visual table.
VWAP + EMA20 + EMA200 + RSI + SR + Panel vwap ema 20 + ema 200 con senales de entrada y soportes dinamicos ideal 1 hora
MACD with Colored HistogramA script specifying the difference between convergence and divergence indicated with an icon.
Stephis Supply & Demand Zones v3
📉 Support
Definition: Support is a price level where a downtrend can be expected to pause or reverse due to a concentration of buying interest.
Why it matters: When the price of an asset falls to a support level, traders expect buyers to step in, preventing the price from falling further.
Visual clue: On a chart, support often appears as a horizontal line where the price has bounced up multiple times.
📈 Demand
Definition: Demand refers to the willingness and ability of buyers to purchase an asset at a given price.
In trading context: High demand typically pushes prices up, while low demand can lead to price drops.
Relation to support: A support level exists because of demand—buyers are willing to buy at that price, creating a floor.
🧠 How They Work Together
When price approaches a support level, traders watch to see if demand increases—if it does, the price may bounce.
If the support level is broken, it may signal that demand has weakened, and the price could fall further.
🔁 Opposite Concept: Resistance & Supply
Resistance is the opposite of support—it's a level where selling pressure (supply) may stop a price from rising.
Just like demand creates support, supply creates resistance.
Smart Ichimoku BreaksPremium private Ichimoku-based indicator with break confirmations, MTF logic, and automated TP/SL. Access by permission only.
BankNifty ORB + RSI + MACD Signal//@version=5
indicator("BankNifty ORB + RSI + MACD Signal", overlay=true)
startHour = 9
startMinute = 15
endHour = 9
endMinute = 30
inSession = (hour == startHour and minute >= startMinute) or (hour == endHour and minute <= endMinute)
var float orHigh = na
var float orLow = na
if inSession
orHigh := na(orHigh) ? high : math.max(orHigh, high)
orLow := na(orLow) ? low : math.min(orLow, low)
rsi = ta.rsi(close, 14)
= ta.macd(close, 12, 26, 9)
buyCond = close > orHigh and rsi > 60 and macdLine > signalLine
sellCond = close < orLow and rsi < 40 and macdLine < signalLine
plotshape(buyCond, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small)
plotshape(sellCond, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small)
bgcolor(buyCond ? color.new(color.green, 85) : na)
bgcolor(sellCond ? color.new(color.red, 85) : na)
Nube EMA 17/WMA 50 + EMA9 + EMA200 + VWAPindicator("Nube EMA 17/WMA 50 + EMA9 + EMA200 + VWAP", overlay=true)
📊 Trend Table (EMA20/50) PRO📊 Trend Table (EMA20/50) PRO
This script displays a color-coded trend dashboard based on the relationship between the EMA 20 and EMA 50 moving averages across multiple timeframes:
🕐 1m, 5m, 15m, 1h, 4h.
📌 Features:
✅ Green = Bullish Trend (EMA20 > EMA50)
✅ Red = Bearish Trend (EMA20 < EMA50)
🎨 Fully customizable text and background color
📍 Selectable table position (left / center / right, top / bottom)
🔁 Auto-refreshes every few bars for real-time accuracy
Perfect as a multi-timeframe trend dashboard for scalpers and swing traders – ideal for XAUUSD, US30, NAS100 and more. Helps you instantly assess trend alignment across key timeframes.
HPM Havin# 📊 HPM Havin - Complete ATR Trading System
## 🎯 **OVERVIEW**
**HPM Havin** is an advanced indicator based on the ATR (Average True Range) Trailing Stop concept, designed to identify trends and generate precise market entry and exit signals. This system combines traditional technical analysis with a modern and intuitive interface, providing a complete real-time market view.
---
## ⚡ **KEY FEATURES**
### 🔥 **Smart ATR Trailing Stop**
- Dynamic system that adapts to market volatility
- Trailing stop that automatically follows the trend
- Adjustable sensitivity for different trading styles
### 📈 **Clear Buy/Sell Signals**
- Visual buy (green) and sell (red) signals
- Automatic candle coloring according to trend
- Customizable alerts to never miss opportunities
### 📊 **Complete Information Dashboard**
- **Real-time P&L:** Track your results instantly
- **Risk/Reward:** Total control over risk management
- **Current Score:** 0-10 rating based on multiple indicators
- **Volatility Status:** Monitor market conditions
---
## 🛠️ **ADVANCED FEATURES**
### 🎛️ **Customizable Controls**
- **Key Value (1-10):** Adjust system sensitivity
- **ATR Period:** Configure ATR calculation period
- **Heikin Ashi:** Option to use Heikin Ashi candles for signals
- **Risk/Reward Ratio:** Set your risk/reward proportion
### 📋 **Multi-Indicator Analysis**
- **RSI (30-70):** Overbought/oversold zone identification
- **MACD:** Trend confirmation with Bullish/Bearish signaling
- **Volume:** Volume analysis compared to moving average
- **Volatility:** Automatic classification (Low/Normal/High)
### ⏰ **Multi-Timeframe Analysis**
Visualize trends across 8 timeframes simultaneously:
- 1M, 5M, 15M, 30M (Scalping/Intraday)
- 1H, 4H (Swing Trading)
- 1D, 1W (Position Trading)
---
## 💡 **HOW TO USE**
### 🟢 **Buy Signals**
- Appear when price crosses above ATR Trailing Stop
- Confirmed by multiple technical indicators
- Candles turn green
### 🔴 **Sell Signals**
- Triggered when price crosses below ATR Trailing Stop
- Validated by internal scoring system
- Candles turn red
### 📊 **Dashboard Interpretation**
- **Score 7-10:** High confidence signals
- **Score 4-6:** Moderate signals, wait for confirmation
- **Score 1-3:** Weak signals, avoid entries
---
## 🎯 **RECOMMENDED STRATEGIES**
### 📈 **For Day Trading**
- Use Key Value between 1-3 for higher sensitivity
- Focus on 1M to 15M timeframes
- Monitor volume and volatility
### 📊 **For Swing Trading**
- Set Key Value between 3-5 for stronger signals
- Analyze 1H to 1D timeframes
- Use multi-timeframe for confirmation
### 💼 **For Position Trading**
- Use Key Value 5+ for long-term signals
- Focus on daily and weekly timeframes
- Combine with fundamental analysis
---
## 🚨 **ALERT SYSTEM**
### 📢 **Main Alerts**
- **HPM Long:** Confirmed buy signal
- **HPM Short:** Confirmed sell signal
### 📊 **Additional Alerts**
- **RSI Overbought:** RSI > 70
- **RSI Oversold:** RSI < 30
- **Trend Change:** ATR Trailing Stop changes
---
## ⚙️ **RECOMMENDED SETTINGS**
### 🔧 **For Beginners**
```
Key Value: 3
ATR Period: 14
Heikin Ashi: true
Risk/Reward: 2.0
```
### 🔧 **For Experienced Traders**
```
Key Value: 1-2 (scalping) or 4-5 (swing)
ATR Period: 10
Heikin Ashi: false
Risk/Reward: custom
```
---
## 📈 **HPM HAVIN ADVANTAGES**
✅ **Intuitive Interface:** Clear and organized dashboard
✅ **Multiple Timeframes:** Complete market view
✅ **Risk Management:** Integrated R/R controls
✅ **High Precision:** Proven ATR-based system
✅ **Flexibility:** Adaptable to any trading style
✅ **Smart Alerts:** Never miss an opportunity
---
## ⚠️ **IMPORTANT WARNINGS**
- This indicator is a technical analysis tool and does not guarantee profits
- Always use stop loss and proper risk management
- Test on demo account before using real money
- Combine with fundamental analysis for better results
- Trading involves risks and may result in losses
---
## 🏆 **ABOUT THE DEVELOPER**
HPM Havin was developed with a focus on simplicity and efficiency, combining years of experience in financial markets with the best practices of technical analysis. The goal is to democratize access to professional trading tools for all levels of investors.
---
**🚀 Transform your technical analysis with HPM Havin - The indicator that combines precision, simplicity and results!**
Gap Open DetectorIndicator Note: Gap Open Detector
What This Indicator Does
This indicator helps you spot significant price gaps at the start of new candles compared to the previous candle’s close. A gap means the current candle’s opening price is noticeably higher or lower than the previous candle’s closing price.
Gap Up: The new candle opens above the previous candle’s close.
Gap Down: The new candle opens below the previous candle’s close.
The indicator highlights these gaps with colored candles:
Green Candle: Gap Up detected.
Red Candle: Gap Down detected.
How to Use the Indicator:
This indicator gives Best Results on Hourly Candles:
This indicator works best on hourly charts (1-hour time frame). It is especially useful for spotting gaps at the start of the next day or after a significant break in trading.
Wait for Confirmation:
After a gap is detected at the open, wait for the candle to form. Ideally, wait for one hour (until the hourly candle is complete) to confirm the candle’s direction and strength before taking any action.
Customize Gap Size:
You can set the minimum gap size using either points or percentage:
Points: Enter the minimum number of points for a gap to be considered significant.
Percentage: Enter the minimum percentage change for a gap to be considered significant.
This flexibility allows you to adjust the indicator to suit different markets and volatility levels.
Trading Logic
If there is a Gap Up and the one hour candle is green:
Buy Option: Consider initiating a buy (long) position.
If there is a Gap Up but the one hour candle is red:
Sell Option: Consider initiating a sell (short) position.
If there is a Gap Down and the one hour closing candle is red:
Sell Option: Consider initiating a sell (short) position.
If there is a Gap Down but the one hour candle is green:
Buy Option: Consider initiating a buy (long) position.
Important Tips
1. Patience Pays: Always wait for the hourly candle to close before making any trading decisions based on the gap.
2. Next Day Open: This strategy is especially effective for catching gaps at the start of a new trading day or after a market break.
3. Visual Cues: The indicator gives you a simple visual cue to spot potential trading opportunities.
4. Flexible Settings: Set your preferred gap size in points or percentage to match your trading style.
Correlazione Multi-PeriodoMulti-period correlation indicator useful for those looking to trade using hedging or spread trading.
Simple Buy/Sell Indicator✅ Buy/Sell signals with EMA + RSI logic
✅ Detects Order Blocks (SMC)
✅ Highlights Fair Value Gaps
✅ Suggests TP/SL zones
✅ Optional volume filter
✅ Works on any asset (Gold, Nasdaq, Forex, Crypto)
SPX Breadth MA 200 Trend Following Strategy [TradeSoEasy]運用「S&P 500 成分股中價格高於200日移動平均線的百分比」作為核心指標,精準捕捉市場主要趨勢。
策略核心邏輯:
📈 進場條件 (多頭): 當S&P 500成分股中,價格高於200日均線的股票百分比超過 %時,判斷市場處於強勢,執行買入操作。
📉 出場條件 (平倉): 當該百分比跌破 %時,判斷市場趨勢可能轉弱,執行平倉操作。
重要提示:數據來源與計算
本策略透過request.security()函數引用外部市場廣度數據S5TH,請確保您了解該數據的來源與特性。
⚠️ 重要免責聲明與風險提示:
回測結果不代表未來表現: 歷史績效數據僅供參考,不保證未來也能取得相同或類似的回報。
-------------------------------------
Strategy Core Logic: S&P 500 Breadth & Trend Following
This strategy utilizes the "Percentage of S&P 500 Components Above their 200-Day Moving Average" as its core indicator to accurately capture the market's primary trend.
📈 Entry Condition (Long): When the percentage of S&P 500 components whose price is above their 200-day MA exceeds %, the strategy identifies a strong market and executes a buy (long) operation.
📉 Exit Condition (Close Position): When this percentage falls below %, the strategy identifies a potential weakening or reversal in the market trend and executes a close position.
Important Note: Data Source & Calculation
This strategy uses the request.security() function to reference external market breadth data, specifically the S5TH symbol. Please ensure you understand the source and characteristics of this data, as it is not calculated internally by the Pine Script from individual S&P 500 components.
⚠️ Important Disclaimer & Risk Warning:
Past performance is not indicative of future results: Historical performance data is for informational purposes only and does not guarantee similar returns in the future.
Real-world trading costs: Please note that actual trading involves commissions, slippage, and liquidity factors that may differ from backtest results, impacting your final returns.