Dhokiya's 0.09% IndicatorThis is a custom indicator for predicting the levels on NSE:NIFTY chart for day trading. More strategy details will be updated soon.
(WIP)
- Rahul Dhangar
Indicators and strategies
RSP / VOO 比值指標The RSP/VOO ratio compares the performance of the S&P 500 Equal Weight ETF (RSP) to the S&P 500 Market Cap Weighted ETF (VOO). When the ratio is falling, it indicates that large-cap stocks—especially mega-cap tech names—are outperforming the broader market. In contrast, a rising ratio suggests that smaller and mid-sized companies are catching up or leading, which may signal a healthy broadening of market participation. Investors often use this ratio to identify shifts in market leadership and assess the strength or fragility of a rally.
Recuadro 06:00–07:30 NY extendido hasta 11:00 con DRDefining Range 6:00 am -7:30 am NY time
This indicator includes the daily range between 6:00am -7:30 am according to quarterly Theory
Weekly Open LineThis script is designed to assist traders in identifying the "Power of Three" (PO3) model on a weekly basis — as taught by ICT (Inner Circle Trader).
It automatically plots:
- The **Weekly Open**, a crucial reference level for detecting manipulation zones.
- **Weekly High and Low**, to frame liquidity zones and potential sweep areas.
- A customizable **Manipulation Zone**, calculated as a percentage range above and below the weekly open.
The PO3 model breaks market structure into:
1. Accumulation (early-week range)
2. Manipulation (false breakouts and liquidity grabs)
3. Distribution (true directional move)
This tool helps visualize those stages and align trades with smart money behavior.
Best used on 1H, 4H, or 15M timeframes for clarity.
Tip: Combine with FVGs, Order Blocks, and time-of-day filters for enhanced setups.
Simple v6 Moving‑Average TrendTo provide a visual guide for trend direction using EMA crossovers, supported by a dynamic trailing stop for potential exit zones. It shows whether the price is above or below a moving average and highlights shifts in trend with labeled signals and a stop-line.
⚙️ How It Works
1. EMA Calculation
It computes a single EMA (default: 20-period) from the current chart’s close price.
The EMA represents the short-term trend.
Indicador Pro: Medias + RSI + ADX + Engulfing + FiboThis advanced indicator is designed to detect high-probability trading opportunities by combining multiple technical signals into a single system.
✅ Included Features:
EMA cross signals (fast vs. slow)
Confirmation via RSI (avoids overbought/oversold conditions)
Trend strength filter using ADX
Entry validation with Engulfing candlestick patterns
Automated buy/sell alerts
Dynamic Take Profit (TP) and Stop Loss (SL) levels
Automatic Fibonacci retracement zones
All SMAs Bullish/Bearish Screener (Visually Enhanced)Title: All SMAs Bullish/Bearish Screener Enhanced: Uncover Elite Trend Opportunities with Confidence & Clarity
Description:
Are you striving to master the art of trend-following, but often find yourself overwhelmed by market noise and ambiguous signals? Do you yearn for a trading edge that clearly identifies high-conviction opportunities and equips you with robust risk management principles? Look no further. The "All SMAs Bullish/Bearish Screener Enhanced" is your ultimate solution – a meticulously crafted Pine Script indicator designed to cut through the clutter, pinpointing stocks where the trend is undeniably strong, and providing you with the clarity you need to trade with confidence.
The Pinnacle of Confluence: Beyond Simple Averages
This is not just another moving average indicator. This is a sophisticated, multi-layered analytical engine built on the profound principle of Confluence. While our core strength lies in tracking a comprehensive suite of six critical Simple Moving Averages (5, 10, 20, 50, 100, and 200-period SMAs), this Enhanced version elevates signal reliability by integrating powerful, independent confirmation layers:
Momentum (Rate of Change - ROC): A true trend isn't just about direction; it's about the force and persistence of price movement. The Momentum filter ensures that the trend is backed by accelerating buying (for bullish signals) or selling (for bearish signals) pressure, validating its underlying strength.
Volume Confirmation: Smart money always leaves a trail. Significant price moves, especially trend continuations or reversals, demand genuine participation. This enhancement confirms that the "All SMAs" alignment is accompanied by above-average volume, signaling institutional conviction and differentiating authentic moves from mere whipsaws.
Relative Strength Index (RSI) Bias: The RSI helps gauge the health of the trend. For a bullish signal, we confirm RSI maintains a bullish bias (above 50), while for a bearish signal, we look for a bearish bias (below 50). This adds another layer of qualitative validation, ensuring the trend isn't overextended without confirmation.
When a stock's price is trading above ALL six critical SMAs, and is simultaneously confirmed by strong positive Momentum, robust Volume, and a bullish RSI bias, you are witnessing a powerful "STRONGLY BULLISH" signal. This rare alignment often precedes sustained upward moves and signifies a prime accumulation phase across all time horizons. Conversely, a "STRONGLY BEARISH" signal, where price is below ALL SMAs with compelling negative Momentum, validating Volume, and a bearish RSI bias, indicates significant distribution and potential for substantial downside.
Seamless Usage & Unmatched Visual Clarity:
Adding this script to your TradingView chart is simple, and its visual design has been meticulously optimized for maximum readability:
Easy Integration: Paste the script into your Pine Editor and click "Add to Chart."
Full Customization: All SMA lengths, RSI periods, Volume SMA periods, and Momentum periods are easily adjustable via user-friendly input settings, allowing you to fine-tune the strategy to your precise preferences.
Optimal Timeframes:
For identifying robust, actionable trends for swing and position trading, Daily (1D) and 4-Hour (240 min) timeframes are highly recommended. These capture significant market movements with reduced noise.
While the script functions on shorter timeframes (e.g., 15min, 60min), these are best reserved for highly active day traders seeking precise entry triggers within broader trends, as shorter timeframes are prone to increased volatility and noise.
Important Note on Candle Size: The width of candles on your chart is controlled by TradingView's platform settings and your zoom level, not directly by Pine Script. To make candles appear larger, simply zoom in horizontally on your chart or adjust the "Bar Spacing" in your Chart Settings (Right-click chart > Settings > Symbol Tab).
Crystal-Clear Visual Signals:
Subtle Background Hues: The chart background will subtly tint lime green for "STRONGLY BULLISH" and red for "STRONGLY BEARISH" conditions. This transparency ensures your underlying candles remain perfectly visible.
Distinct Moving Averages: SMAs are plotted with increased line thickness and a carefully chosen color palette for easy identification.
Precise Signal Triangles: Small, clean green triangles below the bar signify "STRONGLY BULLISH," while small red triangles above the bar mark "STRONGLY BEARISH" conditions. These are unobtrusive yet clear.
Dedicated Indicator Panes: RSI and Momentum plots, along with their key levels, now appear in their own separate, clean sub-panes below the main price chart, preventing clutter and allowing for focused analysis.
On-Chart Status Table: A prominent table in your chosen corner of the chart provides an immediate, plain-language update on the current trend status.
Real-Time Screener Power (via TradingView Alerts): This is your ultimate automation tool. Set up custom alerts for "Confirmed Bullish Trade" or "Confirmed Bearish Trade" conditions. Receive instant notifications (email, app, webhook) for any stock in your watchlist that meets these stringent, high-conviction criteria, allowing you to react swiftly to premium setups across the market without constant chart monitoring.
Mastering Risk & Rewards: The Trader's Edge
Finding a signal is only the first step. This script helps you trade intelligently by guiding your risk management:
Strategic Stop-Loss Placement: Your stop-loss is your capital protector. For a "STRONGLY BULLISH" trade, place it just below the most recent significant swing low (higher low). This is where the uptrend's structure is invalidated. For "STRONGLY BEARISH" trades, place it just above the most recent significant swing high (lower high). As an alternative, consider placing your stop just outside the 20-period SMA; a close beyond this mid-term average often signals a crucial shift. Always ensure your chosen stop-loss aligns with your strict risk-per-trade rules (e.g., risking no more than 1-2% of your capital per trade).
Disciplined Profit Booking: Don't just let winners turn into losers. Employ a strategy to capture gains:
Trailing Stop-Loss: As your trade moves into profit, dynamically move your stop-loss upwards (for longs) or downwards (for shorts). You can trail it by following subsequent swing lows/highs or by using a faster Moving Average like the 10 or 20-period SMA as a dynamic exit point if price closes beyond it. This allows you to ride extended trends while protecting accumulated gains.
Target Levels: Identify potential profit targets using traditional support/resistance levels, pivot points, or Fibonacci extensions. Consider taking partial profits at these key junctures to secure gains while letting a portion of your position run.
Loss of Confluence: A unique exit signal for this script is the breakdown of the "STRONGLY BULLISH" or "STRONGLY BEARISH" confluence itself. If the confirmation layers or even a few of the core SMAs are no longer aligned, it might be time to re-evaluate or exit, even if your hard stop hasn't been hit.
The "All SMAs Bullish/Bearish Screener Enhanced" is more than just code; it's a philosophy for disciplined trend trading. By combining comprehensive multi-factor confluence with intuitive visuals and robust risk management principles, you're equipped to make smarter, higher-conviction trading decisions. Add it to your favorites today and transform your approach to the markets!
#PineScript #TradingView #SMA #MovingAverage #TrendFollowing #StockScreener #TechnicalAnalysis #Bullish #Bearish #MarketScanner #Momentum #Volume #RSI #Confluence #TradingStrategy #Enhanced #Signals #Analysis #DayTrading #SwingTrading
KosATRWhat this Pine Script does:
✅ This indicator displays daily ATR (Average True Range) information on any chart timeframe (minutes, hours, etc.), ensuring the calculations are based strictly on daily price data.
Displayed Information in the Table:
The script creates a table in the bottom-left corner of the chart that shows:
ATR — A custom, filtered version of the daily ATR that excludes abnormal price bars (extremely large or small daily ranges).
% — The percentage of the ATR that today's price movement (Open to Close) has covered so far.
Level — A manually defined fixed level, set through the script's input.
Level + ATR — The sum of the daily ATR and your defined level, useful for setting price targets or alerts.
Key Features:
Uses request.security() to ensure all calculations (high, low, open, close) are taken from the daily timeframe, even when you're viewing lower or higher timeframes.
Implements a filtering method to calculate an "adaptive ATR," ignoring price ranges that are too large or too small (outliers), making the ATR value more stable and realistic.
Displays a live, easy-to-read table directly on the chart for quick reference during trading.
Summary:
This script provides traders with reliable, daily-based ATR data, helping assess current price movement strength relative to historical daily volatility. It's especially useful for intraday traders who want constant awareness of daily ATR levels, regardless of their current chart timeframe.
SP Indicator Clone## 💡 **SCRIPT का STRUCTURE और FUNCTION**
### 📌 **Indicator Name**
* नाम: `SP Indicator Clone`
* Overlay पर plot होती है — मतलब ये indicator chart पर ही lines, dots, shapes बनाता है।
---
### 📌 **Inputs**
User से कुछ values input लेता है:
1️⃣ **Short EMA Length** → default: 5
👉 ये एक छोटा EMA बनाता है ताकि short term trend दिखे।
2️⃣ **Long EMA Length** → default: 50
👉 ये एक लंबा EMA बनाता है — इसे black trendline जैसा use करते हैं।
3️⃣ **ATR Length** → default: 14
👉 ये ATR निकालता है ताकि trailing stop calculate कर सके।
---
### 📌 **Indicators Plotted**
1️⃣ **Short EMA (blue)**
* Chart पर एक हल्की तेजी/मंदी की direction दिखाता है।
2️⃣ **Long EMA (black)**
* ये SP Indicator की तरह main trend line की तरह काम करता है।
* इस black line के ऊपर/नीचे price जाने पर signals generate होते हैं।
---
### 📌 **Signal Conditions**
#### Long Signal
* जब price का **close** black line (Long EMA) के ऊपर cross करता है।
👉 मतलब market नीचे से ऊपर की तरफ जा रहा है।
#### Short Signal
* जब price का **close** black line (Long EMA) के नीचे cross करता है।
👉 मतलब market ऊपर से नीचे गिर रहा है।
---
### 📌 **Signal Shapes**
* Long signal पर: Green triangle (नीचे candle के नीचे दिखेगा)
* Short signal पर: Red triangle (candle के ऊपर दिखेगा)
---
### 📌 **Trailing Stop**
* Trailing Stop को ATR से निकाला जाता है:
* Long trade में: close price - ATR
* Short trade में: close price + ATR
👉 ये stoploss points green/red dots की तरह दिखते हैं।
---
### 📌 **Visualization**
आप chart पर देख पाते हैं:
* Short EMA (blue line)
* Long EMA (black line)
* Long/Short signal markers (triangles)
* Trailing stop points (dots)
---
## ⚙️ **इस Script से आप क्या देख सकते हैं?**
✅ कब trend बदला (black line के cross पर signal मिलेगा)।
✅ कहाँ approximate trailing stop लगाना है (ATR dots से)।
✅ कब entry लेनी थी (triangles से)।
---
## 🚫 **इस Script की Limitations**
⚠️ यह सिर्फ signals और trailing stop show करता है — **ये Pine Strategy नहीं है** यानी ये Trades को backtest नहीं करता।
⚠️ आप इसका use visual reference के लिए कर सकते हैं, लेकिन P\&L, win/loss stats Strategy Tester में नहीं आएंगे।
---
💡 **अगर आप चाहते हो कि मैं इसी को एक Pine Strategy में बदलूं ताकि Strategy Tester में actual performance दिखे (number of trades, profit, loss आदि)?**
बस बताओ — मैं code तैयार कर दूँ! 🚀
📊 Multi Bollinger Bands (4 sets)Made for people who want to use Multi Bollinger Bands.
By Charles SUNG.
Gabriel's MPT Moving Average RibbonGabriel's MPT Moving Average Ribbon is a cutting-edge, risk-adjusted technical analysis tool that fuses Modern Portfolio Theory (MPT) with adaptive moving average logic to dynamically guide market participants through bullish and bearish conditions.
This ribbon is not a simple MA crossover — it leverages Sharpe Ratio, Sortino Ratio, Omega Ratio, and Value at Risk (VaR) to scale and smooth each moving average using real-time probabilistic efficiency metrics. Combined, these elements create a volatility-weighted, risk-optimized visualization of market structure.
🔍 Core Features:
Multi-Ratio Adaptive Scaling: Moving averages are dynamically weighted by Omega Ratio, Sortino Stdev, Sharpe Winrate, and VaR conditions for smarter price tracking.
Volatility Engine: Supports multiple return models:
Close-to-Close
Parkinson
Garman-Klass
Rogers–Satchell
Yang–Zhang (default for highest accuracy)
Smart Ribbon Construction:
Blends 3 different MA types per ribbon (e.g., SMA, EMA, WMA) for each of the 4 ribbons
Supports WMA-style dynamic weighting using MPT-derived ratios
Sharpe Winrate Estimation: Uses CDF logic to project the probability of success given current Sharpe ratio.
Dynamic Risk Phase Detection (VaR):
Identifies Risk On, Risk Off, or Neutral states using a triple-model composite VaR framework.
🛎️ Alerts Included:
📈 Bullish Crossover Alert: MA #1 crossing above MA #2 with all ribbons aligned upward.
📉 Bearish Crossunder Alert: MA #1 crossing below MA #2 with all ribbons aligned downward.
📊 Omega Ratio Alert: Triggered when Omega exceeds 1 (profitable risk-adjusted reward).
⚠️ Omega Caution Alert: Triggered when Omega drops below 1.
🟢 Risk On Alert: Market enters a favorable, low-risk zone. Deep Value Zone for Long-Term Investing.
🔴 Risk Off Alert: Market enters a cautionary, high-risk phase.
🎯 Use Cases:
Trend Identification: MA ribbon alignment indicates momentum phases.
Risk-Tuned Entries/Exits: Combine ribbon crossovers with VaR/Ratio signals for confirmation.
Institutional Strategy Overlay: Ideal for portfolio managers integrating risk-adjusted technical overlays.
🧠 Pro Tips:
Use "Complete" mode for the most robust risk signal, as it blends Historical, EWMA, and Variance-Covariance ratios.
Customize each MA’s type and length to match your trading horizon (e.g., intraday, swing).
Toggle Ratios Weighted MA for adaptive weighting when market risk fluctuates.
It's set to the settings I use to trade, from MA settings to MPT table. It goes in order: Sharpe Est. Winrate, Deviation of Sortino, Omega Ratio (1 Year), and the Ideal position size according to VaR.
HalfTrend cross 2.0 LcfxCore Functionality
HalfTrend Baseline
Plots a dynamic trend-following line that alternates between blue (bullish) and red (bearish)
Uses amplitude and channel deviation settings to adapt to market volatility
Shows ATR-based channels around the trend line (optional)
Key Signals:
Reversal Signals: Traditional arrows at trend reversal points
Cross Signals: Basic "B"/"S" labels when price crosses the HalfTrend line
Re-Cross Signals: Special "RB"/"RS" labels for strategic re-entry opportunities
Unique Re-Cross Logic
Bullish Trend:
Triggers RB (Re-Cross Buy) only when:
Price first crosses BELOW HalfTrend (bearish cross)
Then crosses BACK ABOVE HalfTrend
Only the FIRST such occurrence in current bullish trend
Bright green "RB" label
Bearish Trend:
Triggers RS (Re-Cross Sell) only when:
Price first crosses ABOVE HalfTrend (bullish cross)
Then crosses BACK BELOW HalfTrend
Only the FIRST such occurrence in current bearish trend
Orange "RS" label
Smart Signal Management
Prevents signal spam by allowing only one re-cross signal per trend phase
Automatically resets signals when trend reverses
Dedicated alerts for all signal types
Customizable visual elements (colors, channels, arrows)
Practical Use Case
Identifies high-probability continuation entries:
RB signals: Potential add-to-position points in uptrends after minor pullbacks
RS signals: Shorting opportunities in downtrends after dead-cat bounces
This enhanced version reduces noise while highlighting strategic trade setups where price temporarily violates the trend line but quickly reconfirms the dominant trend direction.
Intra-bar Close/Open Gap [YuL]Just checking one idea: look at gaps between close and open bars on lower timeframe to try to estimate how much slippage exists there that may be a result of buying or selling pressure.
Perhaps it only useful in real time to see if situation of the current bar is changing.
Open to ideas and suggestions.
Weekly PO3 Market Structure ToolThis script is designed to assist traders in identifying the "Power of Three" (PO3) model on a weekly basis — as taught by ICT (Inner Circle Trader).
It automatically plots:
- The **Weekly Open**, a crucial reference level for detecting manipulation zones.
- **Weekly High and Low**, to frame liquidity zones and potential sweep areas.
- A customizable **Manipulation Zone**, calculated as a percentage range above and below the weekly open.
The PO3 model breaks market structure into:
1. Accumulation (early-week range)
2. Manipulation (false breakouts and liquidity grabs)
3. Distribution (true directional move)
This tool helps visualize those stages and align trades with smart money behavior.
Best used on 1H, 4H, or 15M timeframes for clarity.
Tip: Combine with FVGs, Order Blocks, and time-of-day filters for enhanced setups.
Recuadro 06:00–07:30 NY extendido hasta 11:00 con DRThis indicator includes the daily range between 6 am to 7.30 am ny time acoordinly to quarterly theory
All SMAs Bullish/Bearish Screener (Enhanced)All SMAs Bullish/Bearish Screener Enhanced: Uncover High-Conviction Trend Alignments with Confidence
Description:
Are you ready to elevate your trading from mere guesswork to precise, data-driven decisions? The "All SMAs Bullish/Bearish Screener Enhanced" is not just another indicator; it's a sophisticated, yet user-friendly, trend-following powerhouse designed to cut through market noise and pinpoint high-probability trading opportunities. Built on the foundational strength of comprehensive Moving Average confluence and fortified with critical confirmation signals from Momentum, Volume, and Relative Strength, this script empowers you to identify truly robust trends and manage your trades with unparalleled clarity.
The Power of Multi-Factor Confluence: Beyond Simple Averages
In the unpredictable world of financial markets, true strength or weakness is rarely an isolated event. It's the harmonious alignment of multiple technical factors that signals a high-conviction move. While our original "All SMAs Bullish/Bearish Screener" intelligently identified stocks where price was consistently above or below a full spectrum of Simple Moving Averages (5, 10, 20, 50, 100, 200), this Enhanced version takes it a crucial step further.
We've integrated a powerful three-pronged confirmation system to filter out weaker signals and highlight only the most compelling setups:
Momentum (Rate of Change - ROC): A strong trend isn't just about price direction; it's about the speed and intensity of that movement. Positive momentum confirms that buyers are still aggressively pushing price higher (for bullish signals), while negative momentum validates selling pressure (for bearish signals).
Volume: No trend is truly trustworthy without the backing of smart money. Above-average volume accompanying an "All SMAs" alignment signifies strong institutional participation and conviction behind the move. It separates genuine trend starts from speculative whims.
Relative Strength Index (RSI): This versatile oscillator ensures the trend isn't just "there," but that it's developing healthily. We use RSI to confirm a bullish bias (above 50) or a bearish bias (below 50), adding another layer of confidence to the direction.
When the price aligns above ALL six critical SMAs, and is simultaneously confirmed by robust positive momentum, healthy volume, and a bullish RSI bias, you have an exceptionally strong "STRONGLY BULLISH" signal. This confluence often precedes sustained upward moves, signaling prime accumulation phases. Conversely, a "STRONGLY BEARISH" signal, where price is below ALL SMAs with negative momentum, confirming volume, and a bearish RSI bias, indicates powerful distribution and potential for significant downside.
How to Use This Enhanced Screener:
Add to Chart: Go to TradingView's Pine Editor, paste the script, and click "Add to Chart."
Customize Parameters: Fine-tune the lengths of your SMAs, RSI, Momentum, and Volume averages via the indicator's settings. Experiment to find what best suits your trading style and the assets you trade.
Choose Your Timeframe Wisely:
Daily (1D) and 4-Hour (240 min) are highly recommended. These timeframes cut through intraday noise and provide more reliable, actionable signals for swing and position trading.
Shorter timeframes (e.g., 15min, 60min) can be used by advanced day traders for very short-term entries, but be aware of increased volatility and noise.
Visual Confirmation:
Green/Red Triangles: Appear on your chart, indicating confirmed bullish or bearish signals.
Background Color: The chart background will subtly turn lime green for "STRONGLY BULLISH" and red for "STRONGLY BEARISH" conditions.
On-Chart Status Table: A clear table displays the current signal status ("STRONGLY BULLISH/BEARISH," or "SMAs Mixed") for immediate feedback.
Set Up Alerts (Your Primary Screener Tool): This is the game-changer! Create custom alerts on TradingView based on the "Confirmed Bullish Trade" and "Confirmed Bearish Trade" conditions. Receive instant notifications (email, pop-up, mobile) for any stock in your watchlist that meets these stringent criteria. This allows you to scan the entire market effortlessly and act decisively.
Strategic Stop-Loss Placement: The Trader's Lifeline
Even the most robust signals can fail. Protecting your capital is paramount. For this trend-following strategy, your stop-loss should be placed where the underlying trend structure is broken.
For a "STRONGLY BULLISH" Trade: Place your stop-loss just below the most recent significant swing low (higher low). This is the last point where buyers stepped in to support the price. If price breaks below this, your bullish thesis is invalidated.
For a "STRONGLY BEARISH" Trade: Place your stop-loss just above the most recent significant swing high (lower high). If price breaks above this, your bearish thesis is invalidated.
Alternatively, consider placing your stop-loss just below the 20-period SMA (for bullish trades) or above the 20-period SMA (for bearish trades). A significant close beyond this intermediate-term average often indicates a critical shift in momentum. Always ensure your chosen stop-loss adheres to your pre-defined risk per trade (e.g., 1-2% of capital).
Disciplined Profit Booking: Maximizing Gains
Just as important as knowing when you're wrong is knowing when to take profits.
Trailing Stop-Loss: As your trade moves into profit, trail your stop-loss upwards (for longs) or downwards (for shorts). You can trail it using:
Previous Swing Lows/Highs: Move your stop to just below each new higher low (for longs) or just above each new lower high (for shorts).
A Moving Average (e.g., 10-period or 20-period SMA): If price closes below your chosen trailing SMA, exit. This allows you to ride the trend while protecting accumulated profits.
Target Levels: Identify potential resistance levels (for longs) or support levels (for shorts) using pivot points, previous highs/lows, or Fibonacci extensions. Consider taking partial profits at these levels and letting the rest run with a trailing stop.
Loss of Confluence: If the "STRONGLY BULLISH/BEARISH" condition ceases to be met (e.g., RSI crosses below 50, or volume drops significantly), this can be a signal to reduce or exit your position, even if your stop-loss hasn't been hit.
The "All SMAs Bullish/Bearish Screener Enhanced" is your comprehensive partner in navigating the markets. By combining robust trend identification with critical confirmation signals and disciplined risk management, you're equipped to make smarter, more confident trading decisions. Add it to your favorites and unlock a new level of precision in your trading journey!
#PineScript #TradingView #SMA #MovingAverage #TrendFollowing #StockScreener #TechnicalAnalysis #Bullish #Bearish #QQQ #Momentum #Volume #RSI #SPY #TradingStrategy #Enhanced #Signals #Analysis #DayTrading #SwingTrading
Intermarket Analisis V.1What is Intermarket Analysis?
Intermarket analysis looks at how various asset classes influence each other. The key idea is that markets are interconnected, and movements in one can signal or predict movements in another. For example:
Stocks and Bonds: Rising bond yields (e.g., US 10-year Treasury) often pressure stock prices downward.
Commodities and Forex: A rising US Dollar (USD) typically weakens gold (XAU/USD) prices due to their inverse relationship.
Forex and Equities: Strong economic data boosting equities might strengthen the USD.
This method helps you confirm trends, anticipate reversals, or avoid false signals in your EMA 10/20 crossover strategy.
Key Intermarket Relationships
USD Index (DXY) and Gold (XAU/USD):
Correlation: Inverse. When DXY rises (stronger USD), gold often falls, and vice versa.
Indicator: Track DXY on a separate chart. Use a 50-period SMA or RSI to spot overbought/oversold conditions in USD strength.
Application: If your EMA 10/20 gives a buy signal on gold but DXY is overbought (RSI > 70), it might be a false signal—wait for DXY to cool off.
US 10-Year Treasury Yields and Equities (e.g., S&P 500):
Correlation: Inverse. Higher yields increase borrowing costs, pressuring stocks.
Indicator: Use a 200-day EMA on yields (e.g., ^TNX) and compare with S&P 500’s 50-day EMA.
Application: If yields are trending up (above 200 EMA) while your EMA 10/20 signals a stock buy, consider it risky—cross-check with macro data.
Crude Oil (WTI/Brent) and Gold:
Correlation: Positive. Both are inflation hedges, so they often move together during economic uncertainty.
Indicator: Apply a MACD (12, 26, 9) on oil prices to confirm trend direction.
Application: If oil’s MACD shows a bullish crossover and your gold buy signal aligns, it strengthens the case for a trend.
Bond Yields and USD:
Correlation: Positive. Rising yields support a stronger USD.
Indicator: Use a Stochastic Oscillator (14, 3, 3) on DXY to spot momentum shifts.
Application: If Stochastic is overbought on DXY and yields are high, a gold sell signal from EMA 10/20 might be more reliable.
How to Apply Intermarket Analysis to Your EMA 10/20 Strategy
Your current strategy uses EMA 10/20 crossovers for entry/exit, with SL at swing low/high and no TP until an opposite crossover. Here’s how to integrate intermarket analysis:
Confirmation: Before acting on a buy signal (EMA 10 > EMA 20), check if DXY is weakening (e.g., below 50 SMA) or oil is rising (MACD bullish). This supports a gold uptrend.
Divergence Warning: If your EMA 10/20 buy signal occurs but DXY is trending up (strong USD) or yields are spiking, it might indicate a false breakout—hold off.
Macro Context: On July 02, 2025, 08:30 PM WIB, watch for upcoming US Jobless Claims (3-4 July). A weak report could boost gold and weaken USD, aligning with your buy signal.
BTC vs 美元指数(DXY) 强度指标1. Introduction
一、 指标简介
In the grand game of macroeconomics, the relationship between Bitcoin (BTC) and the US Dollar Index (DXY) is a key barometer for market risk appetite versus risk-aversion.
在宏观经济的大棋局中,比特币(BTC)与美元指数(DXY)的强弱关系,是衡量市场风险偏好与避险情绪的核心风向标。
It is often said that "BTC is a hedge against a falling dollar." This indicator is built upon this classic logic, providing you with a quantitative and intuitive analytical tool.
交易员们常说「BTC 是抗美元下跌的工具」,本指标正是基于这一经典逻辑,为您提供一个量化、直观的分析工具。
The BTC vs. DXY Strength Index helps you gain insight into critical questions by calculating the relative performance spread between the two assets, combined with statistical tools (Bollinger Bands) and significant historical macro signals (DXY weekly death cross):
BTC vs 美元指数(DXY) 强度指标 通过计算两者的相对表现差异,并结合统计学工具(布林带)和重要的历史宏观信号(DXY周线死叉),帮助您洞察以下关键问题:
Is the current market dominated by BTC (risk-on) or the Dollar (risk-off)?
当前市场由 BTC 主导(风险偏好),还是由美元主导(避险情绪)?
Has the strength relationship between them reached an extreme level where a reversal is possible?
两者之间的强弱关系是否达到了可能逆转的极端水平?
Has a major macro reversal signal, which has historically triggered significant market shifts, appeared?
是否出现了历史上曾多次引发市场巨变的宏观反转信号?
2. Features & Interpretation
二、 核心功能与解读
2.1. Performance Spread Histogram
1. 强度差柱状图
The core of the indicator is a histogram extending from the zero line, representing the performance spread of BTC relative to DXY.
指标的核心是一系列从 0 轴延伸的柱状图,它代表了 BTC 相对于 DXY 的表现强度差。
Green Bars (Positive Value): Indicates that BTC has outperformed the DXY over the period. The taller the green bar, the stronger BTC's momentum and the higher the market's risk appetite.
绿色柱 (正值): 代表在该周期内,BTC 的表现优于美元指数。绿色柱越高,说明 BTC 越强势,市场风险偏好情绪越高。
Red Bars (Negative Value): Indicates that the DXY has outperformed BTC. The deeper the red bar, the stronger the Dollar and the more prevalent the risk-off sentiment.
红色柱 (负值): 代表在该周期内,美元指数的表现优于 BTC。红色柱越深,说明美元越强势,市场避险情绪越浓。
2.2. Bollinger Bands Extreme Signal
2. 布林带极端信号
The indicator calculates Bollinger Bands for the "performance spread" in the background. When the histogram breaks above or below the bands, an alert is triggered.
指标在后台对「强度差」计算布林带。当柱状图突破上下轨时,会触发警报。
Breakout Above Upper Band: BTC's strength relative to DXY has reached a statistical extreme, signaling caution for a potential mean reversion (e.g., a BTC pullback or DXY strengthening).
向上突破: BTC 相对于 DXY 的强势达到了统计上的极端,警惕短期关系回归(例如 BTC 回调或 DXY 走强)。
Breakdown Below Lower Band: BTC's weakness relative to DXY has reached a statistical extreme, signaling a potential opportunity for a bounce (e.g., BTC strengthening or DXY pulling back).
向下突破: BTC 相对于 DXY 的弱势达到了统计上的极端,关注潜在的反弹机会(例如 BTC 走强或 DXY 回调)。
2.3. DXY Historical Anomaly Signal
3. DXY 历史规律信号
This is the essence of this indicator. Based on research from Coindesk analysts, the "Death Cross" (50-week MA crossing below the 200-week MA) on the DXY weekly chart has often acted as a contrarian indicator—a "bear trap"—since 2009.
这是本指标的精髓所在。根据 Coindesk 分析师的研究,自 2009 年以来,美元指数(DXY)周线级别的「死亡交叉」(50周均线下穿200周均线)往往是一个反向指标,即「空头陷阱」。
Instead of preceding a bear market for the dollar, it has repeatedly marked major cyclical bottoms for the DXY.
它非但没有引发美元的熊市,反而屡次成为美元阶段性大底的标志。
Blue Background Highlight: When the indicator detects a "Death Cross" on the DXY weekly chart, the background will turn blue, and a high-priority alert will be triggered. This is designed to warn you that, based on historical patterns, the US Dollar may be about to bottom and strengthen, posing a significant potential bearish risk for BTC.
蓝色背景高亮: 当指标检测到 DXY 周线图上形成「死亡交叉」时,指标背景会变为蓝色,并触发最高优先级的警报。这旨在提醒您:根据历史规律,美元可能即将见底走强,这对 BTC 构成潜在的重大利空风险,需高度警惕!
3. Settings
三、 主要功能与设定
Customizable symbols for BTC and DXY.
可自定义 BTC 和 DXY 的交易对。
Freely adjustable periods for performance calculation and Bollinger Bands.
可自由调整表现计算周期、布林带参数。
Configurable MA periods for the DXY Death Cross detection, with the ability to toggle this signal on or off.
可配置 DXY 死亡交叉的均线周期,并自由开关此信号的显示。
Includes a comprehensive info panel and alert system.
包含功能全面的信息面板与警报系统。
Disclaimer: This indicator is a tool for supplementary macro analysis and is intended to provide a reference for market sentiment. It does not constitute any investment advice. All trading decisions should be based on your own research and risk assessment. Happy trading!
免责声明: 本指标是辅助宏观分析的工具,旨在提供市场情绪的参考,不构成任何投资建议。所有交易决策都应基于您自己的研究和风险判断。祝您交易顺利!
First Opposite Candle After 3+ (Yellow & Streak Alerts)This overlay tracks consecutive candle direction: when three or more bars run the same way, the very next opposite-color candle is spotlighted in yellow. Two built-in alert events keep you hands-free:
“First Opposite Candle After 3+” – fires the moment that yellow reversal prints.
“3+ Candle Streak” – pings every bar while a bullish-or-bearish run is ≥ 3 candles long.
Forex Monday RangeForex Monday Range. Refers to the price range (high to low) established during Monday's trading session, typically measured from midnight Sunday to midnight Monday (New York time).