Distribution Day Grading [Blk0ut]Distribution Day Grading
This script is designed to give traders and investors a fast, objective, and modern read on market health by analyzing distribution days, and stall days, two forms of institutional selling that often begin to appear before trend weakness, failed breakouts, and sharp corrections.
The goal of this script isn’t to predict tops or bottoms, but instead, it measures the character of the tape in a way that’s simple, visual, and immediately actionable.
While distribution analysis has existed for decades, my implementation is, I think, a little more adaptive. Traditional rules for identifying distribution days, coming from CANSLIM methodology, were built for markets which had lower volatility, different liquidity profiles, and slower institutional rotation. This script updates the traditional method with modernized thresholds, recency-weighted decay, stall-day logic, and dynamic presets tuned uniquely for the personality of each major U.S. index (you can change the values yourself as well).
The results are displayed as a compact letter-grade that quantitatively reflects a measure of how much institutional supply has been hitting the market, as well as how recently. This helps determine whether conditions are supportive of breakouts, mean reversion trades, aggressive trend trades, or whether caution and lighter sizing are warranted.
__________________________________________________________________________________
How It Works
The script evaluates each bar for two conditions:
1. Distribution Day
A bar qualifies as distribution when:
- Price closes down beyond a threshold (default 0.30%, adjustable)
- Volume is higher than the prior session (optional toggle)
Distribution days typically represent active institutional selling .
2. Stall Day
A softer form of supply:
-Price remains flat to slightly negative within a small threshold
-Close < open
-Volume higher than prior day
Stall days represent a passive distribution or hidden supply .
Each distribution day is counted as 1 unit by the script, each stall day as 0.5 units.
Recency Weighting
The script applies an optional half-life decay so that fresh distribution matters more than old distribution. This mimics the “aging out” effect that professional traders use, but does it in a smoother, more mathematically consistent way.
The script then produces:
A weighted distribution score
A raw distribution + stall count
A letter grade from A → F
Let's talk about the letters...
_________________________________________________________________________________
Letter Grade Meaning
A — Very Healthy Tape
Minimal institutional selling.
Breakouts behave better, momentum holds, pullbacks are shallow, upside targets are hit more consistently.
B — Healthy / Slight Caution
Some isolated supply but nothing structural.
Conditions remain favorable for trend trades, pullbacks, and breakout continuation.
C — Mixed / Caution Warranted
Distribution is building.
Breakouts begin to fail faster, candles widen, rotation becomes unstable, and risk/reward compresses.
D — Weak / Risk Elevated
Institutional selling is becoming persistent.
Failed breakouts, sharp reversals, and failed rallies become more common. Position sizing should tighten.
F — Clear Deterioration
Broad, repeated institutional distribution.
This is where major tops, deeper pullbacks, and corrections often begin to form underneath the surface.
_________________________________________________________________________________
Index-Tuned Presets (Auto Mode)
Market structure varies dramatically across indices.
To address this, the script includes auto-detect presets for:
SPY / SPX equivalents
QQQ / NASDAQ-100 equivalents
IWM / Russell 2000 equivalents
DIA / Dow 30 equivalents
Each preset contains optimized values based on volatility, liquidity, noise, and institutional behavior:
SPY / SPX
Low noise, deep liquidity → classic thresholds work well.
Distribution thresholds remain conservative.
QQQ
Higher volatility → requires a slightly larger down-percentage filter to avoid false signals.
IWM
Noisiest of the major indices → requires much stricter thresholds to filter out junk signals.
DIA
Slowest-moving index → tighter conditions catch real distribution earlier.
The script automatically detects which symbol family you’re viewing and loads the appropriate preset unless manual overrides are enabled.
__________________________________________________________________________________
How to Interpret This Indicator
Grade A–B:
Breakouts have higher odds of clean continuation
Mean reversion is smoother
Position sizing can be more assertive
Grade C:
Start tightening risk
Focus on A- setups, not B- or C- risk ideas
Grade D–F:
Expect lower win rates
Expect breakout failures
Favor countertrend plays or reduced exposure
Take faster profits
____________________________
This indicator should help traders prevent themselves from fighting the tape or sizing aggressively when the underlying environment is deteriorating through:
- Modernized distribution logic, not the 1990s thresholds
- Recency-weighted decay instead of the old 5-week “aging out”
- Stall-day detection for subtle institutional supply
- Auto-presets tuned per index, adjusting thresholds to match volatility and liquidity
- Unified letter-grade scoring for visual clarity
- Independent application for any trading style, it helps with trend, momentum, mean reversion, and options
_________________________________________________________________________________
Keep in mind: This script is provided strictly for educational and informational purposes.
Nothing in this indicator constitutes financial advice, trading advice, investment guidance, or a recommendation to buy or sell any security, option, cryptocurrency, or financial instrument.
No indicator should ever be used as the sole basis for a trading or investment decision.
Markets carry risk. Past performance does not predict future results.
Always perform your own analysis, use proper risk management, and consult a licensed professional if you need advice specific to your financial situation.
Happy Trading!
Blk0uts
تحليل الاتجاه
Holy MondayHoly Monday Indicator — Visualize the true Monday candle (UTC) to understand weekly market structure. The indicator displays high, low, open, close, and midpoint for the current Monday and the previous three Mondays, with shaded boxes, extended lines, and labeled midpoints. Color-coding reflects weekly bullish or bearish bias, with customizable colors and semi-transparent active Monday highlights. Ideal for spotting key liquidity zones, weekly bias, and potential reaction levels in Forex, Crypto, and Index markets.
5m EMA + CCI + MACD + RSI + 1H/4H + Exhaustion (Clean)This Strategy Proves Profitable on the Back Test uses 5 Minute Chart Only Any asset Plots Buy sell and Exhaustion on chart uses 3 ema 50 110 and 260 CCI and MACD do not blindly follow the signals confirm fist
Dresteghamat-Multi timeframe Regime & Exhaustion**Dresteghamat-Multi timeframe Regime & Exhaustion**
This script is a custom decision-support dashboard that aggregates volatility, momentum, and structural data across multiple timeframes to filter market noise. It addresses the problem of "Analysis Paralysis" by automating the correlation between lower timeframe momentum and higher timeframe structure using a weighted scoring algorithm.
### 🔧 Methodology & Calculation Logic
The core engine does not simply overlay indicators; it normalizes their outputs into a unified score (-100 to +100). The logic is hidden (Protected) to preserve the proprietary weighting algorithm, but the underlying concepts are as follows:
**1. Adaptive Timeframe Selection (Context Engine)**
Instead of static monitoring, the script detects the user's current chart timeframe (`timeframe.multiplier`) and dynamically assigns two relevant Higher Timeframes (HTF) as anchors.
* *Logic:* If Current TF < 5min, the script analyzes 15m and 1H data. If Current TF < 1H, it shifts to 4H and Daily data. This ensures the analysis is contextually relevant.
**2. Regime & Volatility Filter (ATR Based)**
We use the Average True Range (ATR) to determine the market regime (Trend vs. Range).
* **Calculation:** We compare the current Swing Range (High-Low lookback) against a smoothed ATR. A high Ratio (> 2.0) indicates a Trend Regime, activating Trend-Following logic. A low ratio dampens the signals.
**3. Directional Bias (Structure + Flow)**
Direction is not determined by a single crossover. It is a fusion of:
* **Swing Structure:** Using `ta.pivothigh/low` to identify Higher Highs/Lower Lows.
* **Volume Flow:** Calculating the cumulative delta of candle bodies over a lookback period.
* **Micro-Bias:** A short-term (default 5-bar) momentum filter to detect immediate order flow changes.
**4. Exhaustion Logic (Mean Reversion Warning)**
To prevent buying at tops, the script calculates an "Exhaustion Score" based on:
* **RSI Divergence:** Detecting discrepancies between price peaks and momentum.
* **Volatility Extension:** Identifying when price has deviated significantly from its volatility mean (VRSD logic).
* **Volume Anomalies:** Detecting low volume on new highs (Supply absorption).
### 📊 How to Read the Dashboard
The table displays the raw status of each timeframe. The **"MODE"** row is the output of the algorithmic decision tree:
* **BUY/SELL ONLY:** Generated when the Current TF momentum aligns with the dynamically selected HTF structure AND the Exhaustion Score is below the threshold (default 70).
* **PULLBACK:** Triggered when the HTF Structure is bullish, but Current Momentum is bearish (indicating a corrective phase).
* **HTF EXHAUST:** A safety warning triggered when the HTF Volatility or RSI metrics hit extreme levels, overriding any entry signals.
* **WAIT:** Default state when volatility is low (Range Regime) or signals conflict.
### ⚠️ Disclaimer
This tool provides algorithmic analysis based on historical price action and volatility metrics. It does not guarantee future results.
Dresteghamat-Multi timeframe Regime & Exhaustion**Dresteghamat-Multi timeframe Regime & Exhaustion**
This script is a custom decision-support dashboard that aggregates volatility, momentum, and structural data across multiple timeframes to filter market noise. It addresses the problem of "Analysis Paralysis" by automating the correlation between lower timeframe momentum and higher timeframe structure using a weighted scoring algorithm.
### 🔧 Methodology & Calculation Logic
The core engine does not simply overlay indicators; it normalizes their outputs into a unified score (-100 to +100). The logic is hidden (Protected) to preserve the proprietary weighting algorithm, but the underlying concepts are as follows:
**1. Adaptive Timeframe Selection (Context Engine)**
Instead of static monitoring, the script detects the user's current chart timeframe (`timeframe.multiplier`) and dynamically assigns two relevant Higher Timeframes (HTF) as anchors.
* *Logic:* If Current TF < 5min, the script analyzes 15m and 1H data. If Current TF < 1H, it shifts to 4H and Daily data. This ensures the analysis is contextually relevant.
**2. Regime & Volatility Filter (ATR Based)**
We use the Average True Range (ATR) to determine the market regime (Trend vs. Range).
* **Calculation:** We compare the current Swing Range (High-Low lookback) against a smoothed ATR. A high Ratio (> 2.0) indicates a Trend Regime, activating Trend-Following logic. A low ratio dampens the signals.
**3. Directional Bias (Structure + Flow)**
Direction is not determined by a single crossover. It is a fusion of:
* **Swing Structure:** Using `ta.pivothigh/low` to identify Higher Highs/Lower Lows.
* **Volume Flow:** Calculating the cumulative delta of candle bodies over a lookback period.
* **Micro-Bias:** A short-term (default 5-bar) momentum filter to detect immediate order flow changes.
**4. Exhaustion Logic (Mean Reversion Warning)**
To prevent buying at tops, the script calculates an "Exhaustion Score" based on:
* **RSI Divergence:** Detecting discrepancies between price peaks and momentum.
* **Volatility Extension:** Identifying when price has deviated significantly from its volatility mean (VRSD logic).
* **Volume Anomalies:** Detecting low volume on new highs (Supply absorption).
### 📊 How to Read the Dashboard
The table displays the raw status of each timeframe. The **"MODE"** row is the output of the algorithmic decision tree:
* **BUY/SELL ONLY:** Generated when the Current TF momentum aligns with the dynamically selected HTF structure AND the Exhaustion Score is below the threshold (default 70).
* **PULLBACK:** Triggered when the HTF Structure is bullish, but Current Momentum is bearish (indicating a corrective phase).
* **HTF EXHAUST:** A safety warning triggered when the HTF Volatility or RSI metrics hit extreme levels, overriding any entry signals.
* **WAIT:** Default state when volatility is low (Range Regime) or signals conflict.
### ⚠️ Disclaimer
This tool provides algorithmic analysis based on historical price action and volatility metrics. It does not guarantee future results.
100+ BTC Tracker + Sleepy ProxyThis lightweight Pine Script v6 indicator gives you four key on-chain metrics in real time — no paid subscription, no N/A, no NaN, no Glassnode required.
What it shows (daily timeframe recommended)
Orange line → Number of Bitcoin addresses holding ≥100 BTC right now
(Currently ~15,800–16,200 addresses)
Blue line → Total BTC sitting in those ≥100 BTC wallets
(Currently ~3.1–3.3 million BTC)
Purple table row → % of all Bitcoin supply held by long-term holders (Santiment’s LTH metric)
(Currently ~68–72%)
Teal line & table row → Approximate amount of BTC owned by long-term holders (the best free “sleepy/dormant” proxy)
(Currently ~13.5–14.2 million BTC)
Data sources (100% free & public – November 2025)
≥100 BTC wallets & supply → CryptoQuant (public symbols)
Sleepy proxy → Santiment “% of total supply held by long-term holders” (free tier)
Why this matters
Watch whale accumulation/distribution in real time
See how much Bitcoin is truly “sleeping” (LTH coins rarely move in bear markets)
Spot potential supply shocks when the teal line starts dropping fast → long-term holders are selling/waking up
Key advantages
Works on any free TradingView account
No errors, no missing data, no paid add-ons
Updates daily (as fast as free on-chain data gets)
Super clean table with latest values in the top-right corner
Fully open-source and ready to fork/customize
BOSS_DELTA_XRAYBOSS DELTA XRAY is a momentum-classification system designed to quantify short-term rate-of-change (ΔROC) behavior using a structured, 7-zone intensity model. The indicator measures 5-bar ROC and maps it into clearly defined thresholds to identify acceleration, deceleration, and momentum degradation with high precision.
The goal of BOSS DELTA XRAY is to provide a continuous, color-coded representation of momentum strength to support trade management, continuation assessment, and early detection of weakening trend velocity. This makes it suitable for intraday trading, momentum confirmation, and exit-timing decisions.
Mathematical Basis
The core metric is a 5-period Rate of Change:
𝑅
𝑂
𝐶
5
=
𝐶
𝑙
𝑜
𝑠
𝑒
−
𝐶
𝑙
𝑜
𝑠
𝑒
5
𝐶
𝑙
𝑜
𝑠
𝑒
5
×
100
ROC
5
=
Close
5
Close−Close
5
×100
This 5-bar ΔROC value is compared against three threshold tiers on both positive and negative sides, creating a symmetric 7-zone classification.
Zone Definitions (Absolute ROC%)
Zone ROC Threshold Classification Color
+3 / –3 > 0.20% High-Intensity Momentum Bright Green
+2 / –2 0.10%–0.20% Moderate Momentum Light Green
+1 / –1 0.05%–0.10% Low Momentum Yellow
0 < 0.05% Neutral / No Significant Δ Tan
The system applies the same structure to positive and negative ROC, maintaining symmetry for upward and downward momentum events.
Indicator Output
A continuously-colored histogram representing real-time ΔROC magnitude.
Color transitions reflect zone boundaries, enabling rapid interpretation of momentum intensity.
A zero-line reference is included for structural orientation.
Intended Use Cases
BOSS DELTA XRAY is designed for:
Momentum verification during trend continuation setups
Exit timing, identifying when momentum begins to degrade
Filtering low-energy environments where continuation probability decreases
Monitoring momentum integrity on breakdowns, pullbacks, and retracement legs
Confirming trade validity based on sustained ΔROC structure
Key Advantages
Objective classification of short-term trend velocity
Fast identification of momentum failure or deceleration
High clarity in intraday environments where momentum shifts rapidly
Supports disciplined, systematic trade management
Minimizes discretionary interpretation by relying on defined ΔROC thresholds
Technical Summary
BOSS DELTA XRAY provides a mathematically precise and visually interpretable momentum framework. By quantifying short-term rate-of-change into discrete operational zones, the indicator enables traders to assess momentum strength, weakness, and transition states with consistency and reliability.
Price Distance from SMA (% with StdDev)Measures the % distance of current price from given sma and how it compares to historic.
EMA 8/21/50Triple EMA Indicator (8/21/50)
A technical analysis tool that displays three Exponential Moving Averages simultaneously on your chart. The fast EMA (8-period) responds quickly to price changes, the medium EMA (21-period) provides intermediate trend identification, and the slow EMA (50-period) shows longer-term trend direction.
Customizable Source Method:
Choose which price point to calculate the EMAs from:
Close (default) - Most common, uses closing prices
Open - Uses opening prices for each period
High - Calculates based on period highs
Low - Calculates based on period lows
This flexibility allows traders to adapt the indicator to different trading strategies and market conditions. The three EMAs together help identify trend strength, potential support/resistance levels, and crossover signals for entry/exit points.
Luxy Sector & Industry RS AnalyzerEver wonder why some stocks soar while others in the same sector barely move? Or why your perfectly timed entry still loses money? Possibly the answer can be found in Relative Strength.
The Luxy Sector & Industry RS Analyzer solves a critical problem that most traders overlook: picking strong stocks in strong sectors AND strong industries . It's not enough for a stock to go up - you want stocks that are crushing their competition at both the sector AND industry level. This indicator does the heavy lifting by automatically comparing your stock against its sector ETF, industry ETF, the broader market, sector leader, and industry leader, giving you a complete multi-level picture of relative performance.
What makes this different?
- Automatic sector AND industry detection - no manual setup required
- Multi-level hierarchy analysis: Market → Sector → Industry → Stock
- Multi-timeframe analysis (1 month to 1 year) in one glance
- Industry ETF mapping (30+ industries covered)
- Clear 0-100 scoring system with letter grades (A+ to F)
- Works on stocks, crypto, forex, and commodities
- Real-time updates with anti-repaint protection
Think of it as your performance dashboard - instantly showing you if you're trading a champion or a laggard at every level of the market hierarchy.
METHODOLOGY & ATTRIBUTION
This indicator is based on classical Relative Strength (RS) analysis principles from technical analysis. RS methodology compares an asset's price performance against a benchmark to identify relative outperformance or underperformance. This concept has been used by professional traders and institutions for decades.
Key Concepts Used:
Relative Strength (RS) - Classical technical analysis concept measuring comparative performance
Multi-Level Hierarchy Analysis - Market → Sector → Industry → Stock comparison
Sector Rotation Analysis - Identifying which sectors are leading or lagging the market
Industry Rotation Analysis - Identifying which industries are leading within their sectors
Multi-period Performance Analysis - Evaluating strength across multiple timeframes
Beta Calculation - Standard statistical measure of volatility relative to a benchmark
DISCLAIMER: This indicator is for educational and informational purposes only. It should not be considered financial advice or a recommendation to buy or sell. Past performance does not guarantee future results. Trading involves risk and may not be suitable for all investors. Always do your own research and consult with a financial advisor before making investment decisions.
with all rows visible - capture when stock has strong RS score (70+) so users can see what a "good" setup looks like]
WHAT THE INDICATOR SHOWS
1. AUTOMATIC ASSET TYPE DETECTION
The indicator automatically identifies what you're analyzing and adjusts accordingly:
Stocks - Compares to sector ETF (XLK, XLF, XLV, etc.) and SPY
Crypto - Compares to Total Crypto Market Cap and Bitcoin
Forex - Compares to relevant currency index (DXY, EXY, etc.)
Commodities - Compares to Gold (GLD) as benchmark
Indices - Compares to broader market indices
How it works: The indicator reads your chart's asset type and ticker, then automatically maps it to the correct sector or benchmark. For stocks, it uses intelligent sector detection (looking at the sector field) to match you with the right sector ETF. For example:
- Technology stocks get compared to XLK (Technology Select Sector SPDR)
- Financial stocks get compared to XLF (Financial Select Sector SPDR)
- Healthcare stocks get compared to XLV (Health Care Select Sector SPDR)
This happens instantly when you add the indicator to any chart - no configuration needed.
2. SECTOR & MARKET BENCHMARKS
What is a Sector ETF?
A sector ETF is an exchange-traded fund that tracks a specific industry group. For example, XLK contains all major technology companies. By comparing your stock to its sector ETF, you can see if your stock is outperforming or underperforming its peers.
The indicator shows three key comparison points:
Stock vs Sector (Benchmark)
This tells you how your stock performs compared to companies in the same industry. Positive numbers mean your stock is beating the sector average. Negative numbers mean it's lagging behind.
Stock vs Market (SPY)
This shows performance against the broader S&P 500 index. This is important because even if a stock beats its sector, the entire sector might be weak. You want stocks that beat both their sector AND the market.
Sector vs Market
This reveals "sector rotation" - whether money is flowing into or out of this sector. When this number is positive, the whole sector is hot and leading the market. This is powerful because strong sectors tend to lift all boats, making it easier to find winners.
3. MULTI-PERIOD PERFORMANCE ANALYSIS
The indicator calculates performance across four timeframes simultaneously:
1 Month (1M) - Recent short-term momentum
3 Months (3M) - Medium-term trend strength
6 Months (6M) - Longer-term positioning
1 Year (1Y) - Full-cycle performance view
Why multiple periods matter:
A stock might look great over 1 month but terrible over 6 months - that's a red flag. The best stocks show consistent strength across all timeframes . When you see positive RS (Relative Strength) values across all four periods, you've found a stock with sustained outperformance.
Each row in the table shows:
- Raw performance percentage for that period
- RS value (the difference compared to benchmark)
- Color coding: Green for positive, red for negative, white for neutral
4. SECTOR LEADER COMPARISON
The indicator automatically identifies and compares your stock to the sector leader - the dominant stock in that industry.
Sector leaders by industry:
Technology: Apple (AAPL)
Healthcare: UnitedHealth (UNH)
Financial: JPMorgan Chase (JPM)
Energy: ExxonMobil (XOM)
Consumer Discretionary: Amazon (AMZN)
Consumer Staples: Walmart (WMT)
And more...
Why this matters:
Comparing to the leader shows you if you're trading a champion or a follower. If your stock consistently beats the sector leader, you've found something special. If it's lagging the leader, you might want to trade the leader instead.
Optional Custom Leader:
You can override the automatic leader and compare to any stock you choose. This is useful if you want to benchmark against a specific competitor or reference stock.
NEW! INDUSTRY ANALYSIS (STOCKS ONLY)
The indicator now provides multi-level analysis by automatically detecting and comparing your stock to its specific industry , not just the broad sector.
Why Industry matters:
Technology sector (XLK) contains many different industries: Software, Semiconductors, Hardware, etc. A software stock might beat the broad tech sector but lag behind other software companies. Industry analysis provides this granular view.
Industry ETF Mapping (30+ industries):
Software/Applications: IGV (iShares Software ETF)
Semiconductors: SMH (VanEck Semiconductor ETF)
Biotech: IBB (iShares Biotechnology ETF)
Pharmaceuticals: XPH (SPDR Pharmaceuticals ETF)
Banks: KBE (SPDR S&P Bank ETF)
Regional Banks: KRE (SPDR Regional Banking ETF)
Oil & Gas Exploration: XOP (SPDR Oil & Gas Exploration ETF)
Homebuilders: XHB (SPDR Homebuilders ETF)
Retail: XRT (SPDR S&P Retail ETF)
Aerospace & Defense: ITA (iShares U.S. Aerospace & Defense ETF)
And many more...
Industry Leader Mapping:
The indicator also identifies the leader within each industry:
Software: Microsoft (MSFT)
Semiconductors: NVIDIA (NVDA)
Biotech: Amgen (AMGN)
Pharmaceuticals: Eli Lilly (LLY)
Banks: JPMorgan (JPM)
Oil Exploration: ConocoPhillips (COP)
And more...
New Table Rows for Stocks:
Industry ETF Performance - How the specific industry performed (green background)
Industry Leader Performance - How the top stock in the industry performed
vs Industry RS - Your stock's outperformance vs its industry ETF
Industry vs Sector RS - Is this industry hot or cold within its sector?
vs Industry Leader RS - Your stock's performance vs the industry's best
Why this is powerful:
A stock that beats both its sector AND its industry is showing strength at every level. This indicates true relative strength, not just riding sector-wide momentum.
Optional Custom Industry:
You can override automatic detection for both Industry ETF and Industry Leader in settings.
5. RS SCORE & GRADING SYSTEM (0-100)
The heart of the indicator is the RS Score - a weighted calculation that distills all the performance data into one clear number from 0 to 100.
How the score is calculated:
FOR STOCKS (with Industry data):
The indicator splits the weight between Sector (60%) and Industry (40%):
SECTOR RS (60% of total weight):
1 Month RS: 24% weight (40% × 0.6)
3 Month RS: 18% weight (30% × 0.6)
6 Month RS: 12% weight (20% × 0.6)
1 Year RS: 6% weight (10% × 0.6)
INDUSTRY RS (40% of total weight):
1 Month RS: 16% weight (40% × 0.4)
3 Month RS: 12% weight (30% × 0.4)
6 Month RS: 8% weight (20% × 0.4)
1 Year RS: 4% weight (10% × 0.4)
FOR OTHER ASSETS (Crypto, Forex, Commodities):
Uses full 100% weight on benchmark:
1 Month RS: 40% weight
3 Month RS: 30% weight
6 Month RS: 20% weight
1 Year RS: 10% weight
It starts at 50 (neutral) and adds or subtracts points based on your asset's relative strength in each period.
Bonus points:
+5 points if the sector is outperforming the market (sector rotation is bullish)
+5 points if the industry is outperforming its sector (hot industry) - STOCKS ONLY
+5 points if RS momentum is improving (getting stronger over time)
-5 points if RS momentum is declining (getting weaker)
The final score is capped between 0-100.
Letter Grade System:
90-100: A+ - Elite performer, crushing the sector
85-89: A - Excellent, strong outperformer
80-84: A- - Very good, above average
75-79: B+ - Good, solid performer
70-74: B - Above average, decent strength
65-69: B- - Slightly above average
60-64: C+ - Average, neutral strength
55-59: C - Below average
50-54: C- - Weak, slight underperformance
45-49: D+ - Concerning weakness
40-44: D - Poor, significant underperformance
0-39: F - Failing, avoid this stock
What scores mean for trading:
- RS Score above 70: Strong stocks worth considering for long positions
- RS Score 50-70: Average stocks, better opportunities elsewhere
- RS Score below 50: Weak stocks, avoid or consider for shorts
6. CONSISTENCY SCORE
This metric shows what percentage of time periods show positive RS .
For STOCKS (with Industry data):
Counts both Sector RS periods AND Industry RS periods (up to 8 total periods):
- If a stock beats both sector and industry in all 4 periods each: Consistency = 100% (8/8)
- If it beats in 6 out of 8 total periods: Consistency = 75%
- If it beats in 4 out of 8 total periods: Consistency = 50%
For OTHER ASSETS:
Counts benchmark periods only (4 total):
- If it beats benchmark in all 4 periods (1M, 3M, 6M, 1Y): Consistency = 100%
- If it beats in 3 out of 4 periods: Consistency = 75%
- If it beats in 2 out of 4 periods: Consistency = 50%
Why consistency matters:
A high RS Score with low consistency might indicate a recent spike that could fade. The best stocks show both high RS Score AND high consistency - they're strong now AND have been strong historically at both the sector AND industry level.
Look for stocks with:
Consistency above 75%: Very reliable strength across all levels
Consistency 50-75%: Decent but check other metrics
Consistency below 50%: Weak or erratic, proceed with caution
7. BETA CALCULATION (Volatility Measure)
Beta measures how much more volatile your stock is compared to its sector.
Beta > 1.2 : High volatility - stock moves more aggressively than sector (marked as "High")
Beta 0.8-1.2 : Normal volatility - moves roughly in line with sector
Beta < 0.8 : Low volatility - stock is more stable than sector (marked as "Low")
Formula used:
Beta = Correlation(Stock, Sector) × (Standard Deviation of Stock / Standard Deviation of Sector)
This uses a 20-period calculation for reliability.
How to use Beta:
- High Beta stocks offer bigger gains but also bigger risks - good for aggressive traders
- Low Beta stocks are more defensive - good for conservative positions
- Match Beta to your risk tolerance and strategy
8. DAYS ABOVE/BELOW SECTOR
This tracks consecutive periods (bars) where your stock outperforms or underperforms its sector.
Days Above Sector:
Counts how many bars in a row your stock has beaten the sector.
10+ days: Strong sustained strength (shown in bright green)
5-9 days: Building momentum (shown in yellow)
1-4 days: Early strength (shown in white)
0 days: Not currently outperforming
Days Below Sector:
Counts how many bars in a row your stock has lagged the sector.
10+ days: Sustained weakness (shown in bright red)
5-9 days: Losing momentum (shown in orange)
1-4 days: Minor weakness (shown in white)
0 days: Not underperforming (this is good!)
Why this matters:
Long streaks show trend persistence. A stock with 15+ days above sector is riding strong momentum. A stock with 15+ days below sector is in a sustained downtrend relative to peers.
9. PRICE VS 52-WEEK HIGH
Shows where current price sits relative to its 52-week high (or equivalent for your timeframe).
95%+ (green) : Stock is near all-time highs - strong positioning
80-94% (yellow) : Stock is in a pullback but still relatively strong
Below 80% : Stock has pulled back significantly from highs
Why this matters:
The strongest stocks stay near their highs. When you see a stock with high RS Score AND price near 52W high, you've found a stock with institutional support and strong buying pressure.
10. RELATIVE VOLUME
Compares current volume to the 20-period average volume.
1.5x+ (green) : High volume - significant interest and participation
Around 1.0x : Average volume - normal trading activity
Below 1.0x : Low volume - less interest or inactive period
Why volume matters:
High relative volume confirms price moves. When a stock makes a strong move on 2x or 3x normal volume, it's more likely to sustain. Low volume moves are often just noise.
11. AVERAGE RS STRENGTH
This calculates the average absolute value of all RS readings across the four timeframes.
It shows the magnitude of divergence from the sector, regardless of direction. A high number means the stock moves very differently from its sector (could be much stronger or much weaker). A low number means it tracks closely with the sector.
High Average RS: Stock has strong character, moves independently
Low Average RS: Stock follows sector closely, lacks individual strength
12. SECTOR ROTATION SIGNAL
This indicator automatically detects when a sector is experiencing bullish rotation - meaning money is flowing into the sector and it's outperforming the broader market.
Condition for bullish rotation:
Sector must be beating SPY (market) in both 1-month AND 3-month periods.
Why this matters:
Stocks in hot sectors tend to perform better because they have tailwinds from sector-wide buying. When sector rotation is bullish and your stock has a high RS Score, you've found an ideal setup.
The indicator adds +5 bonus points to the RS Score when sector rotation is bullish.
13. MOMENTUM DETECTION
The indicator compares 1-month RS to 3-month RS to detect if momentum is improving or declining.
RS Momentum Improving: 1M RS is better than 3M RS - stock is getting stronger (adds +5 to score)
RS Momentum Declining: 1M RS is worse than 3M RS - stock is getting weaker (subtracts -5 from score)
Why momentum matters:
You want to catch stocks as momentum is building, not after it's already peaked. Improving momentum suggests the strength is accelerating, not fading.
14. OVERALL ASSESSMENT & RECOMMENDATION
The indicator provides two quick summary rows:
Overall Rating:
Based on grade and RS Score, you get an instant quality rating:
Strong Leader (A/A+) - Top tier stock, crushing it
Above Average (A-/B+) - Solid performer, better than most
Average (B/B-) - Middle of the pack
Below Average (C/C+) - Struggling, watch carefully
Underperformer (D/F) - Weak stock, underperforming badly
Trading Signal:
Combines multiple factors to give setup quality:
STRONG BUY SETUP - RS Score 70+, Consistency 75+, AND sector rotation bullish. This is the perfect storm - strong stock, consistent strength, hot sector.
BULLISH - RS Score 60+, Consistency 50+. Good quality stock worth considering.
NEUTRAL - RS Score 50+. Okay but not exciting, better opportunities exist.
WEAK - RS Score 40-49. Below average, risky.
AVOID - RS Score below 40. Stay away, too weak.
IMPORTANT: These are educational signals only, not financial advice. Always do your own analysis and risk management.
KEY FEATURES
1. AUTOMATIC EVERYTHING
- Auto-detects asset type (stock, crypto, forex, commodity, index)
- Auto-maps stocks to correct sector ETF (11 sectors covered)
- Auto-maps stocks to correct industry ETF (30+ industries covered)
- Auto-identifies sector leader AND industry leader
- Auto-selects appropriate market benchmark
- Zero configuration required - just add to chart
2. MULTI-ASSET SUPPORT
Works on all asset classes:
US Stocks - Compares to sector ETFs (XLK, XLF, XLV, etc.)
Crypto - Compares to Total Crypto Market Cap
Forex - Compares to currency indices (DXY, EXY, etc.)
Commodities - Compares to Gold (GLD)
Indices - Compares to broader market benchmarks
3. FLEXIBLE DISPLAY
9 table positions (top/middle/bottom, left/center/right)
4 size options (tiny, small, normal, large)
Show/hide table completely
Real-time indicator toggle
4. TIMEFRAME FLEXIBILITY
Choose your analysis timeframe:
Chart Timeframe (default) - Uses whatever timeframe your chart is on
Fixed: 1 Hour, 4 Hours, Daily, Weekly - Forces calculations to specific timeframe
This means you can be on a 5-minute chart but analyze RS on Daily timeframe if you prefer.
5. RS SCORE FILTERING
Set a minimum RS Score threshold to only see strong stocks:
Set to 0 - Shows all stocks
Set to 70 - Only displays stocks with RS Score 70+ (strong stocks only)
Warning message displays if stock doesn't meet threshold
Perfect for screening - quickly scan multiple charts and the indicator only shows tables for stocks that pass your quality filter.
6. CUSTOM LEADER COMPARISON
Override automatic leader detection:
Compare to any ticker you choose
Benchmark against specific competitors
Use your own reference stocks
7. COMPREHENSIVE TOOLTIPS
Every input parameter and every table row has detailed tooltips explaining:
What the metric measures
How to interpret the values
What thresholds indicate strength/weakness
Why it matters for trading
Hover over any element to learn - it's like having a trading coach built in.
8. SMART ALERTS
Built-in alert system for key events:
Divergence Alerts:
Get notified when your stock diverges significantly from its sector.
Bullish Divergence: Stock beating sector by threshold percentage
Bearish Divergence: Stock losing to sector by threshold percentage
Set your threshold (default 5%) - this determines how big a divergence triggers the alert.
RS Score Alerts:
Get notified when RS Score crosses your threshold:
Crossed Above: RS Score went from below to above your threshold (bullish)
Crossed Below: RS Score dropped from above to below threshold (bearish)
Set your threshold (default 70) to focus on strong stocks.
Sector Rotation Alert:
Fires when sector shows bullish rotation (outperforming market).
HOW TO USE THE INDICATOR
FOR SWING TRADERS:
1. Add indicator to your watchlist stocks
2. Look for RS Score 70+ with Consistency 75%+
3. Check if sector rotation is bullish (bonus!)
4. Verify price is near 52W high (95%+)
5. Wait for entry setup on your chart
6. Use stop loss below key support
Example Setup:
Stock shows:
- RS Score: 82 (Grade: A-)
- Consistency: 100% (strong across all periods)
- Sector Rotation: Bullish
- Price vs 52W High: 96%
- Days Above Sector: 12 days
- Relative Volume: 1.8x
This is a textbook strong stock in a hot sector near highs - ideal for swing long.
FOR POSITION TRADERS:
1. Focus on 6-month and 1-year RS values
2. Look for sustained outperformance (Consistency 75%+)
3. Prefer lower Beta stocks (less volatility)
4. Check Days Above Sector for trend persistence
5. Monitor RS Score monthly, exit if drops below 60
FOR ACTIVE TRADERS:
1. Use on intraday timeframes (1H or 4H)
2. Set RS Score filter to 60+ for quick screening
3. Enable Divergence Alerts
4. Watch for momentum improving signal
5. Higher Beta stocks offer more movement
FOR SHORT SELLERS:
1. Look for RS Score below 40 (Grade: D or F)
2. Check for declining momentum
3. Verify Days Below Sector is increasing (10+)
4. Sector rotation should be bearish
5. Price should be well off 52W high
WHAT MAKES A PERFECT SETUP:
The holy grail combination:
RS Score: 75+ (A- or better)
Consistency: 80%+ (strong across time - beats sector AND industry)
Sector Rotation: Bullish (hot sector)
Industry vs Sector: Positive (hot industry within sector)
Days Above Sector: 10+ (sustained strength)
Momentum: Improving (getting stronger)
Price vs 52W High: 90%+ (near highs)
Relative Volume: 1.5x+ (volume confirmation)
When you find this combination, you've located a stock with every advantage in its favor - strong at the stock level, industry level, AND sector level. That's multi-level confirmation of relative strength.
IMPORTANT NOTES
Data Reliability:
All calculations use lookahead=off for anti-repaint protection
Historical values will never change
Real-time indicator toggle only affects the visual clock icon, not data reliability
All security requests are properly configured to prevent future data leakage
Sector Mapping Notes:
Sector detection uses TradingView's sector field
Some stocks may not have sector data - indicator will adapt
Sector ETFs used: XLK, XLF, XLV, XLE, XLY, XLP, XLI, XLB, XLRE, XLU, XLC
Major market ETFs (SPY, QQQ, DIA) are treated as market benchmarks, not stocks
Multi-Asset Notes:
Crypto compares to CRYPTOCAP:TOTAL (total crypto market cap)
Forex compares to relevant currency index based on base currency
Commodities compare to Gold (GLD) as primary commodity benchmark
Custom leaders can be set for any asset type
FREQUENTLY ASKED QUESTIONS
Q: What does RS Score of 75 actually mean?
A: It means your stock is strongly outperforming its sector across multiple timeframes. The score is weighted toward recent performance (1-month gets 40% weight), so 75 indicates sustained relative strength with emphasis on current momentum.
Q: My stock has high RS Score but is going down. Why?
A: RS Score measures relative performance (vs sector/market), not absolute price direction. A stock can fall 5% while its sector falls 10% - that's still positive relative strength. In bear markets or sector corrections, high RS stocks often fall less than peers.
Q: Should I only trade stocks with RS Score above 70?
A: For long positions, yes - focus on 70+ scores. These stocks have proven they can beat their sector. However, for pairs trading or relative value plays, you might also short stocks with scores below 40 while longing stocks above 70.
Q: What if my stock doesn't have a sector?
A: The indicator handles this gracefully. If no sector is detected, it will compare directly to the market (SPY for stocks). Some rows may show N/A, but the indicator will still provide useful market-relative data.
Q: Why does the sector sometimes show N/A?
A: This happens when: 1) Your asset has no sector classification, 2) The stock IS the sector ETF itself, 3) You're analyzing a non-stock asset (crypto, forex, commodity). The indicator adapts by focusing on market-relative metrics instead.
Q: Can I use this on cryptocurrencies?
A: Yes! The indicator automatically detects crypto and compares to the Total Crypto Market Cap (CRYPTOCAP:TOTAL). You can also set a custom leader like Bitcoin (BTCUSD) to compare against the dominant crypto.
Q: What's the difference between RS Score and Consistency?
A: RS Score is the weighted average of how much you're beating the sector (magnitude). Consistency is what percentage of time periods show outperformance (reliability). You want both high - that means strong AND consistent.
Q: Do the alerts repaint?
A: No. All alerts fire only on bar close (barstate.isconfirmed) and use properly configured data with lookahead=off. Once an alert fires, it's final and won't change.
Q: What timeframe should I use?
A: For swing trading: Daily or Weekly. For day trading: 1H or 4H. For position trading: Weekly. Use "Chart Timeframe" mode and switch your chart timeframe to change the analysis period easily.
Q: Why is Days Above Sector showing 0?
A: This means your stock is not currently outperforming its sector. If Days Below Sector is also 0, it means the RS is exactly neutral (very rare). Check the actual RS values to see current standing.
Q: Can I compare to a different market benchmark than SPY?
A: Currently the indicator uses SPY (S&P 500) as the default US stock market benchmark. For crypto it uses CRYPTOCAP:TOTAL, for forex it uses currency indices, etc. The benchmark auto-adjusts based on asset type.
Q: What's a good Beta value?
A: It depends on your strategy. Aggressive traders prefer Beta above 1.2 (more volatility = bigger moves). Conservative traders prefer Beta 0.8-1.0 (more stable). Beta is neutral - it's about matching your risk tolerance.
Q: How often does the table update?
A: With Real-time Indicator enabled: Every tick (constant updates). With it disabled: Only on bar close. Either way, the underlying data is identical and non-repainting - the toggle only affects update frequency and the clock icon display.
Q: My stock is showing "AVOID" but it's up 50% this year. Is the indicator wrong?
A: Not necessarily. The indicator measures RELATIVE performance. If your stock is up 50% but the sector is up 100%, your stock is actually underperforming by 50%. The indicator helps you identify when you should switch to stronger stocks in the same sector.
Q: What does "Strong Buy Setup" really mean?
A: It means three things aligned: 1) RS Score above 70 (strong stock), 2) Consistency above 75% (reliable strength), 3) Sector rotation is bullish (hot sector). This combination historically correlates with stocks that continue outperforming. However, this is NOT financial advice - always do your own analysis.
Q: Can I use this for options trading?
A: Yes! High RS Score stocks make good candidates for call options (bullish bets) while low RS Score stocks may work for puts (bearish bets). Higher Beta stocks will have more volatile options (higher premiums but more movement).
Q: Why is my crypto showing N/A for sector?
A: Cryptocurrencies don't have "sectors" like stocks do. Instead, the indicator compares crypto to the total crypto market cap. This is normal and expected behavior.
Q: What happens if I'm analyzing an ETF?
A: If you're analyzing a sector ETF (like XLK), it will compare to SPY (market). If you're analyzing SPY itself, some comparisons won't be available (can't compare SPY to itself). The indicator intelligently adapts to avoid circular comparisons.
Q: What if my stock doesn't have industry data?
A: Not all stocks are mapped to specific industries (only 30+ major industries are covered). If no industry is detected, the indicator will still work using only sector analysis. The RS Score calculation will use 100% sector weight instead of the 60%/40% split.
Q: Why does Industry vs Sector matter?
A: Industry vs Sector shows if your specific industry is hot or cold within its broader sector. For example, Semiconductors (SMH) might be outperforming Technology sector (XLK) even though both are up. This helps you find not just strong sectors, but the strongest industries within those sectors.
Q: Can I disable Industry analysis?
A: Yes! In the "Industry Analysis" settings group, you can toggle off "Show Industry Analysis in Table" to hide all industry rows. However, even when hidden, industry data still contributes to the RS Score calculation for stocks.
Q: Why is my Consistency Score lower for stocks than other assets?
A: For stocks with industry data, Consistency counts 8 periods (4 Sector + 4 Industry periods) instead of just 4. This means the bar is higher - your stock needs to beat both sector AND industry consistently. A stock that beats sector in all 4 periods but lags industry in 2 periods will show 75% consistency (6/8), not 100%.
BEST PRACTICES
Use as a screening tool - Set RS Score filter to 70+ and quickly scan your watchlist. Only strong stocks will show the table.
Combine with technical analysis - RS Score tells you WHAT to trade, your chart tells you WHEN to enter.
Check multiple timeframes - Switch between Daily and Weekly to see if strength holds across different time horizons.
Monitor sector rotation - When sector goes from bearish to bullish rotation, it's often a great time to enter stocks in that sector.
Watch Industry vs Sector - Stocks in hot industries within hot sectors have double tailwinds. Prioritize Industry vs Sector positive values.
Pay attention to consistency - High RS Score with low consistency might be a spike that fades. Look for 70%+ consistency across BOTH sector and industry.
Use the leader comparison - If your stock consistently beats both sector leader AND industry leader, you may have found the next champion.
Watch days above/below sector - Long streaks (15+ days) indicate strong trends. Look for these in conjunction with high RS Score.
Set alerts on key stocks - Enable RS Score alerts at 70 threshold to get notified when watchlist stocks become strong.
Consider Beta for position sizing - Size smaller positions in high Beta stocks, larger in low Beta stocks for balanced risk.
Exit when RS Score drops - If a stock's RS Score falls below 60, consider reducing or exiting - the strength may be fading.
Leverage industry-level insight - If Industry ETF is weak but stock is strong, that's standout strength. If Industry is hot but stock is lagging, consider switching to the industry leader instead.
SETTINGS EXPLAINED
Display Settings:
Show Performance Table - Master on/off switch for the table
Table Position - 9 positions available (corners, edges, center)
Table Size - 4 sizes (tiny, small, normal, large) for different screen sizes
Timeframe Settings:
Chart Timeframe (recommended) - Dynamic, uses whatever chart TF you're on
Fixed Timeframes - Locks analysis to 1H, 4H, Daily, or Weekly regardless of chart
Filtering Settings:
Minimum RS Score - Set threshold (0-100) for displaying table
Show Warning - When enabled, displays message if stock doesn't meet filter
Alert Settings:
Divergence Alerts - Enable alerts when stock diverges from sector
Threshold (%) - How big a divergence triggers alert (default 5%)
RS Score Alerts - Enable alerts when RS Score crosses threshold
Threshold - What RS Score level triggers alert (default 70)
Sector Analysis Settings:
Use Custom Sector ETF - Override automatic sector ETF detection
Sector ETF Symbol - Enter any sector ETF to compare against
Use Custom Sector Leader - Override automatic sector leader detection
Sector Leader Symbol - Enter any ticker as sector leader
Industry Analysis Settings:
Use Custom Industry ETF - Override automatic industry ETF detection
Industry ETF Symbol - Enter specific industry ETF (e.g., IGV, SMH)
Use Custom Industry Leader - Override automatic industry leader detection
Industry Leader Symbol - Enter specific industry leader
Show Industry Analysis - Toggle all industry rows on/off
Display Settings:
Show Real-time Indicator - Toggle clock icon in header (doesn't affect data)
WHAT THIS INDICATOR DOESN'T DO
To set proper expectations:
Does NOT provide entry/exit signals - this is a strength analyzer, not a trading system
Does NOT predict future price movement - shows current and historical relative strength
Does NOT guarantee profits - strong RS stocks can still decline
Does NOT replace your own analysis - use as one tool among many
Does NOT work on stocks with no sector data - will adapt but some rows show N/A
This indicator is a decision support tool . It helps you identify which stocks are showing relative strength so you can make more informed trading decisions. You still need your own entry strategy, risk management, and position sizing rules.
SUPPORT & CONTACT
Questions or feedback? Use the comments section below or send me a message.
If you find this indicator useful, please give it a boost and share with other traders who might benefit from relative strength analysis.
FINAL REMINDER
This indicator is a tool for analyzing relative strength - it shows you which stocks are outperforming their sector and market. It does NOT provide financial advice or trade signals. Always conduct your own research, manage your risk appropriately, and consult with a financial advisor before making investment decisions.
Past performance of relative strength does not guarantee future results. Strong stocks can become weak, and sectors rotate in and out of favor. Use this indicator as part of a comprehensive trading strategy, not as a standalone decision-making system.
Trade smart, manage risk, and may your RS Scores stay high!
If you got till here and you like my work a BOOST and a COMMENT would make me happy
HTF Candles Pro by MurshidFx# HTF Candles Pro by MurshidFx
## Professional Trading Indicator for Multi-Timeframe Market Structure Analysis
**HTF Candles Pro** is an advanced, open-source trading indicator that synthesizes Higher Timeframe (HTF) candle visualization with CISD (Change in State of Delivery) detection, providing comprehensive market structure analysis across multiple timeframes. Designed for traders at all experience levels—from scalpers to swing traders—this tool enables precise alignment of trades with higher timeframe momentum while identifying critical market structure transitions.
---
## Core Functionality
This indicator integrates three essential analytical frameworks:
- **HTF Candle Visualization** – Inspired by the innovative work of Fadi x MMT's MTF Candles indicator
- **CISD Detection System** – Algorithmic identification of significant market structure reversals
- **Intelligent Session Level Management** – Automated consolidation of overlapping session markers for enhanced chart clarity
The result is a sophisticated yet streamlined analytical tool that delivers actionable market insights with minimal visual complexity.
---
## Feature Set
### Higher Timeframe Candle Analysis
Monitor higher timeframe price action seamlessly without chart switching. The indicator employs automatic HTF selection based on current timeframe, with manual override capability.
**Components:**
- **Primary HTF Display**: Automatically positioned adjacent to current price action
- **Secondary HTF Display**: Optional dual-timeframe analysis capability
- **Adaptive Time Labeling**: Context-aware formatting (intraday times, day names, week numbers)
- **Real-Time Countdown**: Optional timer displaying remaining time until HTF candle close
- **Customizable Color Schemes**: Full color customization for bullish and bearish candles
### CISD Detection (Change in State of Delivery)
The CISD system identifies critical inflection points where market structure undergoes directional change, signaling potential trend reversals or continuations.
**Mechanism:**
- **Market Structure Monitoring**: Continuous tracking of swing highs and lows
- **Liquidity Sweep Detection**: Identification of stop-hunt patterns preceding reversals
- **Reversal Confirmation**: Validation-based CISD level plotting upon structure break confirmation
- **Clear Visual Signals**: Bullish CISD (blue) and bearish CISD (red) demarcation
- **Optimized Display**: Default 5-bar line length (adjustable) minimizes chart clutter
**Technical Definition:**
CISD occurs when price breaches structure in one direction—typically sweeping liquidity and triggering stops—then reverses to break structure in the opposite direction, indicating a fundamental shift in market delivery bias.
### Intelligent Session Level Management
Eliminates visual clutter caused by overlapping session opens at identical price levels through automated consolidation.
**Functionality:**
- **Automatic Consolidation**: Merges multiple concurrent session opens into single reference lines
- **Combined Labeling**: Creates unified labels (e.g., "Week-Day Open," "4H-Day-Week Open")
- **Enhanced Clarity**: Maintains professional chart aesthetics while preserving all relevant information
**Supported Session Intervals:**
- 30-Minute Opens
- 4-Hour Opens
- Daily Opens
- Weekly Opens
- Monthly Opens
### Advanced Market Structure Tools
**Liquidity Sweep Identification:**
Highlights price wicks extending beyond previous HTF extremes that close within range—characteristic liquidity grab patterns.
**HTF Midpoint Reference:**
Displays the 50% retracement level of the most recent completed HTF candle, serving as a key reference for entries and profit targets.
**HTF Opening Price:**
Tracks current HTF candle open price, frequently functioning as dynamic support or resistance.
**Interval Demarcation:**
Visual separators defining HTF period boundaries for enhanced temporal clarity.
### Information Dashboard
Compact, customizable dashboard displaying:
- Current symbol and active timeframe
- HTF candle countdown timer
- Active trading session (Asia/London/New York)
- Current date and time
Flexible positioning: configurable for any chart corner.
---
## Default Configuration
Optimized settings for immediate professional-grade chart presentation:
- **Secondary HTF**: Disabled (enable for multi-timeframe comparative analysis)
- **CISD Bullish Color**: Blue (#0080ff) – optimal visibility with reduced eye strain
- **CISD Line Width**: 1 pixel – subtle yet discernible
- **CISD Line Length**: 5 bars – balanced visibility without excessive clutter
- **Session Opens**: Smart consolidation enabled – eliminates overlapping labels
---
## Application Strategies
### Trend Following
1. Monitor CISD confirmations aligned with HTF trend direction
2. Utilize HTF candle color for directional bias confirmation
3. Execute entries on pullbacks to HTF midpoint or open price levels
### Reversal Trading
1. Identify counter-trend CISD formations
2. Await HTF candle close confirming new directional bias
3. Use session opens as secondary confirmation levels
### Scalping
1. Trade exclusively in HTF candle direction
2. Employ lower timeframe CISD signals for precise entry timing
3. Target HTF midpoint or subsequent session open levels
### Structure-Based Trading
1. Mark liquidity sweep levels as potential reversal zones
2. Monitor CISD formations at key session opens
3. Confirm trend changes via HTF candle closes
---
## Customization Parameters
Comprehensive customization options:
- **Color Schemes**: Independent control of bull/bear candles, borders, CISD signals, session levels
- **Dimensional Settings**: Candle width, line thickness, label sizing
- **Display Quantities**: HTF candle count (1-10 range)
- **Positioning**: Candle offset, dashboard placement, label positioning
- **Line Styles**: Solid, dashed, or dotted rendering
- **Timeframe Selection**: Manual secondary HTF specification
---
## Attribution
**HTF Candle Visualization:**
The HTF candle rendering methodology draws inspiration from Fadi x MMT's "MTF Candles" indicator. Their elegant implementation of multi-timeframe candle visualization provided valuable reference for this development. Recognition and appreciation to their contribution to the TradingView community.
**CISD Detection:**
Proprietary CISD detection algorithm engineered to identify market structure transitions with high signal clarity and reduced false positive rate.
**Session Level Consolidation:**
Custom-developed intelligent grouping system addressing the common challenge of overlapping session labels at coincident price levels.
---
## Open Source License
This indicator is released as open source for the TradingView community. Permitted uses include:
- Implementation in live trading
- Educational study for Pine Script learning
- Personal modification and customization
- Distribution among trading communities
Community contributions, improvements, and derivative works are welcomed and encouraged.
---
## Implementation Guide
1. **Installation**: Click "Add to Chart"
2. **Configuration Access**: Open indicator settings panel
3. **Initial Use**: Default settings provide optimal starting configuration
4. **Optional Features**: Enable secondary HTF for multi-timeframe analysis
5. **Theme Integration**: Adjust color schemes to match chart aesthetics
---
## Best Practices
**Timeframe Optimization:**
- 1-5 minute charts: Optimal with 15m or 1H HTF
- 15-30 minute charts: Effective with 4H HTF
- 1-4 hour charts: Suitable for Daily HTF
- Daily charts: Best utilized with Weekly/Monthly HTF
**CISD Trading Guidelines:**
- Require CISD confirmation before position entry
- Prioritize CISD signals at significant levels (session opens, HTF midpoints)
- Confirm CISD direction aligns with HTF candle bias
- Apply contextual filtering—not all CISD signals warrant trades
**Session Open Strategy:**
- Weekly opens typically provide robust support/resistance
- Daily opens offer reliable intraday reference points
- 4-Hour opens effective for short-term scalping
- Consolidated labels (e.g., "Week-Day Open") indicate confluence zones with elevated significance
---
## Technical Specifications
**Performance Optimization:**
- Intelligent object management prevents TradingView rendering limits
- Efficient array processing for session consolidation
- Proper memory management through systematic object deletion
- Consistent performance across all timeframe ranges
**Compatibility:**
- Universal timeframe support
- Optimized for all market types (forex, stocks, crypto, futures)
- Minimal computational overhead
---
## Support & Development
**Feedback Channels:**
- Comment section for user feedback and suggestions
- Bug reports and feature requests welcomed
- Community-driven enhancement consideration
**Documentation:**
- Well-commented source code for learning purposes
- Clear section organization for easy navigation
- Comprehensive type definitions for structural clarity
- Educational value for market structure concept understanding
---
## Version Information
**Version:** 1.0 (Initial Release)
**License:** Open Source
**Category:** Multi-Timeframe Analysis | Market Structure
**Compatibility:** All Timeframes
**Language:** Pine Script v5
---
**For optimal results:**
- Provide feedback through comments
- Share with trading communities
- Submit enhancement suggestions
- Report technical issues for resolution
**Professional Support:**
Available through comment section for technical inquiries, implementation questions, and feature requests.
---
*Developed for the TradingView trading community | Professional-grade market structure analysis | Open source contribution*
BG Trix Trend signalovides dynamic long and short signals based on a multi-timeframe candle averaging method. It calculates a four-step average of recent candles to determine the trend and changes candle color accordingly (green for upward, red for downward).
Features:
Multi-Timeframe Candle Analysis: Combines current and previous candle data to smooth price action.
Optional TRIX Filter: Adds a TRIX-based trend filter from a separate timeframe. Only triggers signals when TRIX confirms the trend.
Optional Keltner Channel Filter: Prevents signals when the price is inside the Keltner channel. Long signals only trigger above the upper band; short signals only trigger below the lower band. Separate MTF and MA type can be selected for the channel.
Visual Signals: Long and short signals are displayed as arrows on the chart. Candle color reflects trend direction.
Fully Customizable: Users can enable/disable TRIX and Keltner filters and select MA types and timeframes independently.
This indicator is ideal for traders who want clear trend signals while filtering out trades inside key price channels. No exit management is included—signals are purely for entry visualization.
SMC Lite + PVSRA + MA Combo HELL 1great trading tool what you see is what you get supply and resistance pvsra candles
[PickMyTrade] Trendline Strategy# PickMyTrade Advanced Trend Following Strategy for Long Positions | Automated Trading Indicator
**Optimize Your Trading with PickMyTrade's Professional Trend Strategy - Auto-Execute Trades with Precision**
---
## Table of Contents
1. (#overview)
2. (#why-this-strategy-makes-money)
3. (#key-features)
4. (#how-it-works)
5. (#strategy-settings--configuration)
6. (#pickmytrade-integration)
7. (#advanced-features)
8. (#risk-management)
9. (#best-practices)
10. (#performance-optimization)
11. (#getting-started)
12. (#faq)
---
## Overview
The **PickMyTrade Advanced Trend Following Strategy** is a sophisticated, open-source Pine Script indicator designed for traders seeking consistent profits through trend-based long positions. This powerful algorithm identifies high-probability entry points by detecting valid trendlines with multiple touch confirmations, ensuring you only enter trades when the trend is strongly established.
### What Makes This Strategy Unique?
- **Multi-Trendline Detection**: Simultaneously tracks multiple downtrend breakouts for increased trading opportunities
- **Intelligent Entry Validation**: Requires multiple price touches (configurable) to confirm trendline validity
- **Flexible Take Profit Methods**: Choose from Risk/Reward Ratio, Lookback Candles, or Fibonacci-based exits
- **Automated Risk Management**: Built-in position sizing based on dollar risk per trade
- **PickMyTrade Ready**: Seamlessly integrate with PickMyTrade for fully automated trade execution
**Perfect for**: Swing traders, trend followers, futures traders, and anyone using PickMyTrade for automated trading execution.
---
## Why This Strategy Makes Money
### 1. **Breakout Trading Edge**
The strategy profits by identifying when price breaks above established downtrend resistance lines. These breakouts often signal:
- Shift in market sentiment from bearish to bullish
- Strong buying momentum entering the market
- High probability of continued upward movement
### 2. **Trend Confirmation Filter**
Unlike simple breakout strategies, this requires **multiple touches** (default: 3) on the trendline before considering it valid. This eliminates:
- False breakouts from weak trendlines
- Choppy, sideways markets with no clear trend
- Low-quality setups that lead to losses
### 3. **Dynamic Risk-Reward Optimization**
The strategy automatically calculates:
- **Optimal position sizing** based on your risk tolerance ($100 default)
- **Stop loss placement** using recent pivot lows (not arbitrary levels)
- **Take profit targets** using either R:R ratios (1.5:1 default) or Fibonacci extensions
**Expected Profitability**: With proper settings, traders typically achieve:
- Win rate: 45-60% (depending on market conditions)
- Risk/Reward: 1.5:1 to 2.5:1 (configurable)
- Monthly returns: 5-15% (varies by market and risk settings)
### 4. **Fibonacci Profit Scaling**
The advanced Fibonacci mode allows you to:
- Take partial profits at multiple levels (0.618, 1.0, 1.312, 1.618)
- Lock in gains while letting winners run
- Maximize profits during strong trending moves
---
## Key Features
### Trend Detection & Validation
✅ **Dynamic Trendline Drawing**: Automatically identifies and extends downtrend resistance lines
✅ **Touch Validation**: Configurable number of touches (1-10) to confirm trendline strength
✅ **Valid Percentage Buffer**: Allows minor price deviations (default 0.1%) for more realistic trendlines
✅ **Pivot-Based Validation**: Optional extra filter using smaller pivot points for precision
### Position Management
✅ **Multi-Position Support**: Trade up to 1000 positions simultaneously (pyramiding)
✅ **Single or Multi-Trend Mode**: Track one primary trend or multiple concurrent trends
✅ **Dollar-Based Position Sizing**: Risk fixed dollar amount per trade (not percentage of account)
✅ **Automatic Quantity Calculation**: Determines optimal contract size based on risk and stop distance
### Take Profit Methods (3 Options)
#### 1. **Risk/Reward Ratio** (Recommended for Beginners)
- Set desired R:R (default 1.5:1)
- Simple, consistent profit targets
- Works well in trending markets
#### 2. **Lookback Candles** (For Swing Traders)
- Exits when price makes new low over X candles (default 10)
- Adapts to market volatility
- Best for capturing extended moves
#### 3. **Fibonacci Extensions** (For Advanced Traders)
- Up to 4 profit targets: 61.8%, 100%, 131.2%, 161.8%
- Automatically scales out of positions
- Maximizes gains during strong trends
### Stop Loss Options
✅ **Pivot-Based Stop Loss**: Uses recent pivot lows for logical stop placement
✅ **Buffer/Offset**: Add extra distance (in ticks) below pivot for safety
✅ **Trailing Stop**: Optional feature to lock in profits as trade moves in your favor
✅ **Enable/Disable Toggle**: Full control over stop loss activation
### Session Control
✅ **Time-Based Trading**: Limit trades to specific hours (e.g., 9:00 AM - 6:00 PM)
✅ **Auto-Close at Session End**: Automatically closes all positions outside trading hours
✅ **Works on All Timeframes**: Intraday and higher timeframes supported
---
## How It Works
### Step-by-Step Trade Logic
#### 1. **Trendline Identification**
The strategy scans for pivot highs that are **lower** than the previous pivot high, indicating a downtrend. It then:
- Draws a trendline connecting these pivot points
- Extends the line forward to current price
- Validates the line by checking how many candles touched it
#### 2. **Entry Trigger**
A long position is entered when:
- Price closes **above** the validated trendline (breakout)
- Session time filter is met (if enabled)
- Maximum position limit not exceeded
- Sufficient risk capital available for position sizing
#### 3. **Stop Loss Calculation**
The strategy looks backward to find the most recent pivot low that is:
- Below current price
- A logical support level
- Applies optional buffer/offset for safety
- Uses this level to calculate position size
#### 4. **Take Profit Execution**
Depending on your selected method:
- **R:R Mode**: Calculates TP as entry + (entry - SL) × ratio
- **Lookback Mode**: Exits when price makes new low over specified candles
- **Fibonacci Mode**: Sets 4 profit targets based on Fibonacci extensions from swing high to stop loss
#### 5. **Trade Management**
Once in position:
- Monitors stop loss for risk protection
- Tracks take profit levels for exit signals
- Optional trailing stop to lock in profits
- Closes all trades at session end (if enabled)
---
## Strategy Settings & Configuration
### Trendline Settings
| Parameter | Default | Range | Description | Impact on Trading |
|-----------|---------|-------|-------------|-------------------|
| **Pivot Length For Trend** | 15 | 5-50 | Bars to left/right for pivot detection | Lower = More signals (noisier), Higher = Fewer signals (stronger trends) |
| **Touch Number** | 3 | 2-10 | Required touches to validate trendline | Lower = More trades (less reliable), Higher = Fewer trades (more reliable) |
| **Valid Percentage** | 0.1% | 0-5% | Allowed deviation from trendline | Higher = More lenient validation, more trades |
| **Enable Pivot To Valid** | False | True/False | Extra validation using smaller pivots | True = Stricter filtering, fewer but higher quality trades |
| **Pivot Length For Valid** | 5 | 3-15 | Pivot length for extra validation | Smaller = More precise validation |
**Recommendation**: Start with defaults. In choppy markets, increase touch number to 4-5. In strongly trending markets, reduce to 2.
### Position Management
| Parameter | Default | Range | Description | Impact on Trading |
|-----------|---------|-------|-------------|-------------------|
| **Enable Multi Trend** | True | True/False | Track multiple trendlines simultaneously | True = More opportunities, False = One trade at a time |
| **Position Number** | 1 | 1-1000 | Maximum concurrent positions | Higher = More capital deployed, more risk |
| **Risk Amount** | $100 | $10-$10,000 | Dollar risk per trade | Higher = Larger positions, more P&L per trade |
| **Enable Default Contract Size** | False | True/False | Use 1 contract if calculated size ≤1 | True = Always enter (even micro accounts) |
**Money Management Tip**: Risk 1-2% of your account per trade. If you have $10,000, set Risk Amount to $100-$200.
### Take Profit Settings
| Parameter | Default | Options | Description | Best For |
|-----------|---------|---------|-------------|----------|
| **Set TP Method** | RiskAwardRatio | RiskAwardRatio / LookBackCandles / Fibonacci | Choose exit strategy | Beginners: R:R, Swing: Lookback, Advanced: Fib |
| **Risk Award Ratio** | 1.5 | 1.0-5.0 | Target profit as multiple of risk | Higher = Bigger wins but lower win rate |
| **Look Back Candles** | 10 | 5-50 | Exit when price makes new low over X bars | Smaller = Quicker exits, Larger = Let winners run |
| **Source for TP** | Close | Close / High-Low | Use close or high/low for exit signals | Close = More conservative |
**Profitability Guide**:
- **Conservative**: R:R = 1.5, Lookback = 10
- **Balanced**: R:R = 2.0, Lookback = 15
- **Aggressive**: R:R = 2.5, Fibonacci mode with 1.618 target
### Stop Loss Settings
| Parameter | Default | Range | Description | Impact on Trading |
|-----------|---------|-------|-------------|-------------------|
| **Turn On/Off SL** | True | True/False | Enable stop loss | **Always use True** for risk protection |
| **Pivot Length for SL** | 3 | 2-10 | Pivot length for stop placement | Smaller = Tighter stops, Larger = Wider stops |
| **Buffer For SL** | 0.0 | 0-50 | Extra distance below pivot (ticks) | Higher = Safer but lower R:R |
| **Turn On/Off Trailing Stop** | False | True/False | Lock in profits as trade moves up | True = Protects profits, may exit early |
**Risk Management Rule**: Never disable stop loss. Use buffer in volatile markets (5-10 ticks).
### Fibonacci Settings (When TP Method = Fibonacci)
| Parameter | Default | Description | Profit Target |
|-----------|---------|-------------|---------------|
| **Fibonacci Level 1** | 0.618 | First profit target | 61.8% of swing range |
| **Fibonacci Level 2** | 1.0 | Second profit target | 100% of swing range |
| **Fibonacci Level 3** | 1.312 | Third profit target | 131.2% extension |
| **Fibonacci Level 4** | 1.618 | Fourth profit target | 161.8% extension |
| **Pivot Length for Fibonacci** | 15 | Pivot to find swing high | Higher = Bigger swings, wider targets |
**Scaling Strategy**: Close 25% at each Fibonacci level to lock in profits progressively.
### Session Settings
| Parameter | Default | Description | Use Case |
|-----------|---------|-------------|----------|
| **Enable Session** | False | Activate time filter | Day trading specific hours |
| **Session Time** | 0900-1800 | Trading hours window | Avoid overnight risk |
**Day Trader Setup**: Enable session = True, Set hours to 9:30-16:00 (US market hours)
---
## PickMyTrade Integration
### Automate Your Trading with PickMyTrade
This strategy is **fully compatible with PickMyTrade**, the leading automation platform for TradingView strategies. Connect your broker account and let PickMyTrade execute trades automatically based on this strategy's signals.
### Why Use PickMyTrade?
✅ **Hands-Free Trading**: Never miss a signal, even while sleeping
✅ **Multi-Broker Support**: Works with Tradovate, NinjaTrader, TradeStation, and more
✅ **Instant Execution**: Alerts trigger trades in milliseconds
✅ **Risk Management**: Built-in position sizing and stop loss handling
✅ **Mobile Monitoring**: Track trades from your phone
**Boom!** Your strategy is now fully automated. Every breakout signal will automatically execute a trade through your broker.
### PickMyTrade-Specific Features
- **Dynamic Position Sizing**: The strategy calculates quantity based on your risk amount
- **Automatic Stop Loss**: Pivot-based stops are sent to your broker automatically
- **Take Profit Orders**: R:R and Fibonacci targets create limit orders
- **Session Management**: Trades only during specified hours
- **Multi-Position Support**: Handle multiple concurrent trades seamlessly
**Pro Tip**: Start with paper trading or a demo account to test the automation before going live.
---
## Advanced Features
### 1. Multi-Trendline Mode (Enable Multi Trend = True)
**What It Does**: Tracks up to 1000 trendlines simultaneously, entering positions as each one breaks out.
**Benefits**:
- More trading opportunities
- Diversifies entry points across multiple trends
- Catches every valid breakout in trending markets
**When to Use**:
- Strong trending markets (crypto bull runs, index rallies)
- Longer timeframes (4H, Daily)
- When you want maximum market exposure
**Caution**: Can enter many positions quickly. Set appropriate Position Number limit and Risk Amount.
### 2. Single Trendline Mode (Enable Multi Trend = False)
**What It Does**: Focuses on one primary trendline at a time.
**Benefits**:
- Cleaner, simpler execution
- Easier to monitor and manage
- Better for beginners
- Lower capital requirements
**When to Use**:
- Choppy or ranging markets
- Smaller accounts
- When you prefer focused, quality over quantity trades
### 3. Fibonacci Profit Scaling
**How It Works**:
1. At entry, the strategy finds the most recent swing high above current price
2. Calculates the range from swing high to stop loss
3. Projects 4 Fibonacci extensions: 61.8%, 100%, 131.2%, 161.8%
4. Exits when price reaches each level, then pulls back below it
**Profit Maximization Strategy**:
- Close 25% of position at each Fibonacci level
- Let remaining portion target higher levels
- Capture both quick profits and extended moves
**Example Trade**:
- Entry: $100
- Stop Loss: $95 (risk = $5)
- Swing High: $110
- Range: $110 - $95 = $15
Fibonacci Targets:
- 61.8% = $95 + ($15 × 0.618) = $104.27 (+4.27%)
- 100% = $95 + ($15 × 1.0) = $110 (+10%)
- 131.2% = $95 + ($15 × 1.312) = $114.68 (+14.68%)
- 161.8% = $95 + ($15 × 1.618) = $119.27 (+19.27%)
**Result**: Even if only first two targets hit, you lock in +7% average gain vs. -5% risk = 1.4:1 R:R
### 4. Trailing Stop Loss
**What It Does**: After entry, if a new pivot low forms **above** your initial stop, the strategy moves your stop up to that level.
**Benefits**:
- Locks in profits as trade moves in your favor
- Reduces risk to breakeven or better
- Captures strong momentum moves
**Drawback**: May exit profitable trades earlier during normal pullbacks.
**Best Practice**: Use in strongly trending markets. Disable in choppy conditions.
### 5. Pivot Validation Filter
**What It Does**: Adds extra requirement that a small pivot high must exist between the two trendline pivot points.
**Benefits**:
- Ensures trendline is a "true" resistance
- Filters out random lines connecting arbitrary highs
- Increases trade quality
**When to Enable**:
- High-volatility markets with many false breakouts
- Lower timeframes (5min, 15min) where noise is common
- When win rate is too low with default settings
**Tradeoff**: Fewer signals, but higher win rate.
### 6. Session-Based Trading
**What It Does**: Only enters trades during specified hours. Auto-closes all positions outside session.
**Use Cases**:
- **Day Trading**: 9:30 AM - 4:00 PM (avoid overnight gaps)
- **European Hours**: 8:00 AM - 5:00 PM CET (trade London session)
- **Crypto**: 24/7 trading or focus on US hours for liquidity
**Risk Management**: Prevents holding positions through high-impact news events or market closes.
---
## Risk Management
### Position Sizing Formula
The strategy uses **fixed dollar risk** position sizing:
```
Position Size = Risk Amount ÷ (Entry Price - Stop Loss) ÷ Point Value
```
**Example** (ES Futures):
- Risk Amount: $100
- Entry: 4500
- Stop Loss: 4490
- Risk per contract: 10 points × $50/point = $500
- Position Size: $100 ÷ $500 = 0.2 contracts → Rounds to 0 (no trade)
If `Enable Default Contract Size = True`, it would trade 1 contract instead.
### Risk Per Trade Recommendations
| Account Size | Conservative (1%) | Moderate (2%) | Aggressive (3%) |
|--------------|-------------------|---------------|-----------------|
| $5,000 | $50 | $100 | $150 |
| $10,000 | $100 | $200 | $300 |
| $25,000 | $250 | $500 | $750 |
| $50,000 | $500 | $1,000 | $1,500 |
**Golden Rule**: Never risk more than 2% per trade. Even with 10 losses in a row, you'd only be down 20%.
### Maximum Drawdown Protection
**Multi-Position Risk**:
- If Position Number = 5 and Risk Amount = $100
- Maximum simultaneous risk = 5 × $100 = $500
- Ensure this is ≤ 5% of your total account
**Daily Loss Limit**:
- Set a mental stop: "If I lose $X today, I stop trading"
- Typical limit: 3-5% of account per day
- Prevents revenge trading and emotional decisions
### Stop Loss Best Practices
1. **Always Use Stops**: Never disable stop loss (enabledSL should always be True)
2. **Buffer in Volatile Markets**: Add 5-10 tick buffer to avoid stop hunts
3. **Respect Your Stops**: Don't manually override or move stops further away
4. **Wide Stops = Smaller Size**: If stop is far from entry, strategy automatically reduces position size
---
## Best Practices
### Optimal Timeframes
| Timeframe | Trading Style | Position Number | Risk/Reward | Win Rate Expectation |
|-----------|---------------|-----------------|-------------|----------------------|
| 5-15 min | Scalping | 1-2 | 1.5:1 | 50-55% |
| 30 min - 1H | Intraday | 2-3 | 2:1 | 55-60% |
| 4H | Swing Trading | 3-5 | 2.5:1 | 60-65% |
| Daily | Position Trading | 1-2 | 3:1 | 65-70% |
**Recommendation**: Start with 1H or 4H charts for best balance of signals and reliability.
### Ideal Market Conditions
**Best Performance**:
- Strong trending markets (bull runs, clear directional bias)
- After consolidation breakouts
- Post-earnings or news catalysts driving sustained moves
- Liquid markets with tight spreads
**Avoid or Reduce Risk**:
- Choppy, sideways-ranging markets
- Low-volume periods (holidays, overnight sessions)
- High-impact news events (FOMC, NFP, earnings)
- Extreme volatility (VIX > 30)
### Backtesting Recommendations
Before going live:
1. **Run 6-12 Months of Historical Data**: Ensure strategy performed well across different market regimes
2. **Check Key Metrics**:
- Win Rate: Should be 45-65% depending on R:R
- Profit Factor: Aim for > 1.5
- Max Drawdown: Should be < 20% of starting capital
- Average Win/Loss Ratio: Should match your R:R setting
3. **Stress Test**: Test during known volatile periods (March 2020, Jan 2022, etc.)
4. **Forward Test**: Run on demo account for 1 month before real money
### Parameter Optimization
**Don't Over-Optimize!** Avoid curve-fitting to past data. Instead:
1. **Start with Defaults**: Use recommended settings first
2. **Change One Parameter at a Time**: Isolate what improves performance
3. **Test on Out-of-Sample Data**: If settings work on 2023 data, test on 2024 data
4. **Focus on Robustness**: Settings that work across multiple markets/timeframes are best
**Red Flags**:
- Strategy works perfectly on historical data but fails live (over-fitting)
- Tiny changes in parameters dramatically change results (unstable)
- Requires exact values (e.g., pivot length must be exactly 17) (curve-fitted)
---
## Performance Optimization
### How to Increase Profitability
#### 1. Optimize Risk/Reward Ratio
- **Current**: 1.5:1 (default)
- **Test**: 2:1, 2.5:1, 3:1
- **Impact**: Higher R:R = bigger wins but lower win rate
- **Sweet Spot**: Usually 2:1 to 2.5:1 for trend strategies
#### 2. Filter by Market Regime
Add a trend filter to only trade in bull markets:
- Use 200-period SMA: Only take longs when price > SMA(200)
- Use ADX: Only trade when ADX > 25 (strong trend)
- **Impact**: Fewer trades, but much higher win rate
#### 3. Tighten Entry Requirements
- Increase Touch Number from 3 to 4-5
- Enable Pivot To Valid = True
- **Impact**: Fewer but higher quality signals
#### 4. Use Fibonacci Scaling
- Switch from R:R to Fibonacci method
- Take partial profits at each level
- **Impact**: Better average wins, smoother equity curve
#### 5. Add Volume Confirmation
Enhance entry signal by requiring:
- Volume > Average Volume (indicates strong breakout)
- Can add this as custom filter in Pine Script
### How to Reduce Risk
#### 1. Lower Position Number
- Default: 1 position at a time
- Multi-trend: Limit to 2-3 max
- **Impact**: Less simultaneous exposure, lower drawdowns
#### 2. Reduce Risk Amount
- Start with $50 per trade (0.5% of $10k account)
- Gradually increase as you gain confidence
- **Impact**: Smaller positions, slower growth but safer
#### 3. Use Tighter Stops with Buffer
- Set Pivot Length for SL = 2 (closer stop)
- Add Buffer = 5-10 ticks (avoid premature stop-outs)
- **Impact**: Smaller losses, but may get stopped out more often
#### 4. Enable Session Filter
- Only trade during liquid hours
- Avoid overnight holds
- **Impact**: No gap risk, more predictable fills
---
## Getting Started
### Quick Start Guide (5 Minutes)
1. **Copy the Strategy Code**
- Open the `.txt` file provided
- Copy all code to clipboard
2. **Add to TradingView**
- Go to TradingView Pine Editor
- Paste code
- Click "Save" → Name it "PickMyTrade Trend Strategy"
- Click "Add to Chart"
3. **Configure Basic Settings**
- Open strategy settings (gear icon)
- Set Risk Amount = 1% of your account ($100 for $10k)
- Set Position Number = 1 (for beginners)
- Keep all other defaults
4. **Backtest on Your Market**
- Choose your instrument (ES, NQ, AAPL, BTC, etc.)
- Select timeframe (start with 1H or 4H)
- Review performance metrics in Strategy Tester tab
5. **Optimize (Optional)**
- Adjust Touch Number (2-5) to balance signals vs. quality
- Try different TP methods (R:R vs. Fibonacci)
- Test on multiple timeframes
6. **Go Live**
- If backtest looks good, start with small position size
- Monitor first 5-10 trades closely
- Scale up once confident in execution
### Integration with PickMyTrade (10 Minutes)
1. **Sign Up for PickMyTrade**
- Visit (pickmytrade.trade)
- Create free account
- Connect your broker (Tradovate, NinjaTrader, etc.)
2. **Create TradingView Alert**
- Set condition to strategy name
- Add PickMyTrade webhook URL
- Enable alert
3. **Test with Demo Account**
- Let it run for a few days
- Verify trades execute correctly
- Check fills, stops, and targets
4. **Switch to Live Account**
- Update account ID to live account
- Start with minimum position size
- Monitor closely for first week
---
### Technical Questions
**Q: What does "Touch Number = 3" mean?**
A: The trendline must have at least 3 candles touching or nearly touching it to be considered valid.
**Q: Why am I getting no trades?**
A: Trendline requirements may be too strict. Try:
- Reduce Touch Number to 2
- Increase Valid Percentage to 0.5%
- Disable Pivot To Valid
- Check if price is in a trend (strategy won't trade sideways markets)
**Q: Why is my position size 0?**
A: Risk Amount is too small for the stop distance. Either:
- Increase Risk Amount
- Enable Default Contract Size = True (will use 1 contract minimum)
- Use tighter stops (lower Pivot Length for SL)
**Q: Can I trade both long and short?**
A: Current code is long-only. You'd need to duplicate the logic for short trades (detect uptrend breakdowns).
**Q: How do I change from TradingView strategy to indicator?**
A: Change line 5 from `strategy(...)` to `indicator(...)`. Replace `strategy.entry()` and `strategy.exit()` with `alert()` calls.
### Risk Management Questions
**Q: What's the maximum drawdown I should expect?**
A: Typically 10-20% depending on settings. If experiencing > 25%, reduce position size or tighten filters.
**Q: Should I risk more to make more money?**
A: No. Risking 2% vs. 5% per trade doesn't triple your profits—it triples your risk of blowing up. Stick to 1-2% per trade.
**Q: What if I hit 5 losses in a row?**
A: Normal. Even with 60% win rate, losing streaks happen. Don't increase position size to "win it back." Stick to your risk plan.
**Q: Do I need to watch the screen all day?**
A: No, especially with PickMyTrade automation. Check positions 1-2 times per day. Overtrading kills profits.
---
## Disclaimer
**Important Risk Disclosure**:
Trading futures, stocks, forex, and cryptocurrencies involves substantial risk of loss and is not suitable for all investors. Past performance is not indicative of future results. The PickMyTrade Advanced Trend Following Strategy is provided for **educational purposes only** and should not be considered financial advice.
**Key Risks**:
- You can lose more than your initial investment
- Backtested results may not reflect live trading performance
- Market conditions change; no strategy works forever
- Automation errors can occur (connectivity, bugs, etc.)
**Before Trading**:
- Consult a licensed financial advisor
- Fully understand the strategy logic
- Test on demo account for at least 1 month
- Only risk capital you can afford to lose
- Start with minimum position sizes
**PickMyTrade**:
This strategy is compatible with PickMyTrade but is not officially endorsed by PickMyTrade. The author is not affiliated with PickMyTrade. For PickMyTrade support, visit their official website.
**License**: This strategy is open-source under Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). You may modify and share, but not for commercial use.
---
**Ready to automate your trading with PickMyTrade? Add this strategy to your TradingView chart today and start capturing profitable trend breakouts on autopilot!**
Pivot crossThis script is simple way of seeing the trend using two pivots, one with lower time frame and other with higher timeframe. When the lower crosses above higher, its bullish, when lower crosses below higher pivot then bearish. Works on any timeframes for intraday and swing trading.
ATR Trend + RSI Pullback Strategy [Profit-Focused]This strategy is designed to catch high-probability pullbacks during strong trends using a combination of ATR-based volatility filters, RSI exhaustion levels, and a trend-following entry model.
Strategy Logic
Rather than relying on lagging crossovers, this model waits for RSI to dip into oversold zones (below 40) while price remains above a long-term EMA (default: 200). This setup captures pullbacks in strong uptrends, allowing traders to enter early in a move while controlling risk dynamically.
To avoid entries during low-volatility conditions or sideways price action, it applies a minimum ATR filter. The ATR also defines both the stop-loss and take-profit levels, allowing the model to adapt to changing market conditions.
Exit logic includes:
A take-profit at 3× the ATR distance
A stop-loss at 1.5× the ATR distance
An optional early exit if RSI crosses above 70, signaling overbought conditions
Technical Details
Trend Filter: 200 EMA – must be rising and price must be above it
Entry Signal: RSI dips below 40 during an uptrend
Volatility Filter: ATR must be above a user-defined minimum threshold
Stop-Loss: 1.5× ATR below entry price
Take-Profit: 3.0× ATR above entry price
Exit on Overbought: RSI > 70 (optional early exit)
Backtest Settings
Initial Capital: $10,000
Position Sizing: 5% of equity per trade
Slippage: 1 tick
Commission: 0.075% per trade
Trade Direction: Long only
Timeframes Tested: 15m, 1H, and 30m on trending assets like BTCUSD, NAS100, ETHUSD
This model is tuned for positive P&L across trending environments and volatile markets.
Educational Use Only
This strategy is for educational purposes only and should not be considered financial advice. Past performance does not guarantee future results. Always validate performance on multiple markets and timeframes before using it in live trading.
Liquidity & inducementsHi all!
This indicator will show liquidity and inducements.
I will continue to try to add different types of liquidity and inducements, at this moment it contains 6 kinds of liquidity/inducement, they are:
• Grabs
• Big grabs
• Sweeps
• Turtle soups
• Equal highs/lows (liquidity and inducement)
• BSL & SSL
And 1 type of inducement:
• Retracement
This description will contain indicator examples of each individual liquidity and inducement. They will all be with the default settings.
Settings
First you will find settings for the market structure (BOS/CHoCH/CHoCH+). Select left and right pivot lengths and if the pivots should have a label or not.
This is the base foundation of this indicator and is possible with my library 'PriceAction' ().
You will see solid lines for break of structures (BOS), change of characters (CHoCH) and change of character plus (CHoCH+).
The pivots found will be the core of this indicator and will show you when the closing price breaks it. When that happens a break of structure (BOS) or a change of character (CHoCH or CHoCH+) will be created. The latest 5 pivots found within the current trend will be kept to take action on.
A break of structure is removed if an earlier pivot within the same trend is broken and the pivot's high price for a bullish trend or low price for a bearish trend is more extreme than the BOS pivot's price.
You are able to show the pivots that are used. "HH" (higher high), "HL" (higher low), "LH" (lower high), "LL" (lower low) and "H"/"L" (for pivots (high/low) when the trend has changed) are the labels used.
In the next section ('Liquidity ($$$)') you can select which types of liquidity you want to see. Note that 'Equal highs/lows' can also show inducement (more on that later).
In the section afterwards ('Inducement (IDM)') you can select if you want retracement inducements to be visible or not. More information on what they are later on.
The section for each individual liquidity and/or inducement can first contain a line named 'Pivot', where you can set the pivot lengths (first left, then right). Then you can set the 'Lookback', which means that the 'Lookback' number of past pivots is to take action on. After that you set the 'Timeframe' for the pivots used. That means that all available liquidity/inducements will be from your desired timeframe. Lastly you set the color of the liquidity/inducement (either a single color or bullish followed by bearish colors).
Lastly in the settings you can select the font sizes for the market structure and liquidity/inducements and what style liquidity/inducements lines will have. The sizes defaults to 7 and has a dotted line look.
Grabs
Liquidity grabs and liquidity sweeps are very similar. It all depends on if the current bar closed above/below the liquidity pivot and on if its a continuation or reversal. In a liquidity grab the bar that's above or below the liquidity pivot was not closed above or below it. Like this:
Or
The visual feedback will be a dotted line between the liquidity pivot and liquidity grab bar and a linefill between the high of the liquidity grab bar and the liquidity pivot.
Indicator example:
Big grabs
This is another 'grabs' option. You can show an additional grab if you want to. I suggest having this grab from a higher timeframe or with larger pivot lengths than the other grab.
The default is with the chart timeframe and 10/10 as pivot lengths.
Indicator example:
Sweeps
A liquidity sweep is like a liquidity grab but with the difference that price closes above/below and has a continuation instead of a reversal. If the liquidity pivot was at the same bar as a BOS/CHoCH/CHoCH+ it will not be a liquidity grab but a structural break instead.
They can look like this:
Indicator example;
Turtle soups
If only one candle is beyond the pivot it could be a liquidity grab. It's a grab if price didn't close beyond the liquidity pivot, if so it's invaliditet. Turtle soups are basically false breakouts that takes liquidity (is a false breakout from a pivot with the lengths and timeframe from the settings).
The turtle soup can have a confirmation in the terms of a change of character (CHoCH). You can enable this in the settings section for 'Turtle soups' through the 'Confirmation' checkbox (enabled by default). The turtle soup strategy usually comes with some sort of confirmation, in this case a CHoCH, but it can also be a market structure shift (MSS) or a change in state of delivery (CISD).
The addition of turtle soups is possible through my script 'Turtle soup' ().
The drawing will be a dotted line between the liquidity pivot and the last bar of the false breakout and a box from the start of the false breakout to the end of it.
Indicator example:
Equal highs/lows
Equal highs/lows will always show liquidity, but might also show inducement. Inducement will be shown on equal lows if the trend is bullish and on equal highs if it's bearish, like this:
Or
Equal highs can only be created if the second pivot is lower than the first one. Equal lows can only be created if the second pivot is higher than the first one. If that is not the case it could be a liquidity grab.
When equal highs or equal lows are find that produces inducement (equal lows in a bullish trend and equal highs in a bearish trend), the indicator will first display inducement and will show liquidity once traders are induced to enter the security. Stop loss placement, for liquidity, is 0.1 * the average true range (ATR, of length 14). They will look like this:
Only inducement:
Inducement and liquidity:
Indicator example:
Equal highs/lows inducements can not be triggered after a BOS/CHoCH/CHoCH+. They are cleared upon a structural break.
BSL & SSL
Buyside liquidity (BSL) and sellside liquidity (SSL) will be shown. A pivot that's been mitigated (touched by price) can never be BSL or SSL. The BSL/SSL available will be dynamic while price moves (work in Replay and lower timeframes that moves fast) and pick the latest pivot/s (with left and right lengths from the 'Market structure' section). You can define how many BSL/SSL you want to see with a default value of 1, meaning only 1 BSL and 1 SSL can be shown. If there is no unmitigated high (BSL) or low (SSL), no BSL/SSL will be available to show. If there are BSL/SSL available they're very useful to use as targets for entering a trade.
The will look like this when available;
And without BSL available:
Or
And without SSL available:
Note that the examples without BSL/SSL available could have liquidity available from previous price legs.
This can be an example of a BSL/SSL sequence:
First both buyside and sellside liquidity is available:
Then a new low appears and new sellside liquidity is available:
Then buyside liquidity is mitigated, so only sellside liquidity is available:
A new high pivot appears and buyside liquidity is available again:
Lastly a bearish CHoCH happens and sellside liquidity is mitigated, only buyside liquidity is available:
Retracement
The first retracement after a BOS/CHoCH/CHoCH+ is considered an inducement with the mission to get traders into a trade prematurely to get stopped out. This level is shown and look like this:
Or
A retracement inducement is removed when a new BOS/CHoCH/CHoCH+ appears and it's not triggered.
---------------------------
As of now there aren't any alerts available. You cannot use the Pine Screener from Tradingview either to see new liquidity/inducement events. I have this planned for future updates though.
I hope that this long description makes sense, let me know otherwise! Also let me know if you experience any bugs or have a feature request or just want to share good settings to use.
Best of trading luck!
Bitcoin AHR999 Indicator
AHR999 Indicator
The AHR999 Indicator is created by a Weibo user named ahr999. It assists Bitcoin investors in making investment decisions based on a timing strategy. This indicator implies the short-term returns of Bitcoin accumulation and the deviation of Bitcoin price from its expected valuation.
When the AHR999 index is < 0.45 , it indicates a buying opportunity at a low price.
When the AHR999 index is between 0.45 and 1.2 , it is suitable for regular investment.
When the AHR999 index is > 1.2 , it suggests that the coin price is relatively high and not suitable for trading.
In the long term, Bitcoin price exhibits a positive correlation with block height. By utilizing the advantage of regular investment, users can control their short-term investment costs, keeping them mostly below the Bitcoin price.
20 Day Range High/Low (Turtle Soup)This indicator identifies the Highest High and Lowest Low of the last 20 periods (customizable) and projects horizontal support/resistance lines to the right.
Unlike standard Donchian Channels or other High/Low indicators that clutter the chart with historical "steps" or extend lines infinitely to the left, this script focuses on chart cleanliness.
Key Features:
Pivot-Point Start: The lines do not span the whole chart. They start exactly at the candle where the High or Low occurred.
Right Extension: Lines extend only to the future, providing a clear visual for potential breakouts or support levels.
No Historical Clutter: It does not draw the past movement of the High/Low, keeping your chart clean for price action analysis.
Dynamic: As new Highs or Lows are made, the lines instantly update to the new positions.
How to Use:
Trend Identification: Use the High line as a resistance/breakout level (similar to Turtle Trading strategies).
Stop Loss Placement: The Low line of the last 20 days often acts as a trailing stop location for long-term trends.
Timeframes: While designed for the classic "20-Day" lookback on the Daily chart, this script works on any timeframe (e.g., finding the 20-hour range on a 1H chart).
Settings:
Length: Default is 20 bars. You can change this in the settings to any lookback period you prefer (e.g., 50, 100).
Bollinger Bands Regression Forecast [BigBeluga]🔵 OVERVIEW
The Bollinger Bands Regression Forecast combines volatility envelopes from Bollinger Bands with a linear regression-based projection model .
It visualizes both current and future price zones by extrapolating the Bollinger channel forward in time, giving traders a statistical forecast of probable support and resistance behavior.
🔵 CONCEPTS
Classic Bollinger Bands use a moving average (basis) and standard deviation (deviation) to form dynamic envelopes around price.
This indicator enhances them with linear regression slope detection , allowing it to forecast how the band may expand or contract in the future.
Regression is applied to both the band’s basis and deviation components to predict their trajectory for a user-defined number of Forecast Bars .
The resulting forecast creates a smoothed, funnel-shaped projection that dynamically adapts to volatility.
▲ and ▼ markers highlight potential mean reversion points when price crosses the outer bounds of the bands.
🔵 FEATURES
Forecast Engine : Uses linear regression to project Bollinger Band movement into the future.
Dynamic Channel Width : Adapts standard deviation and slope for realistic volatility modeling.
Auto-Labeled Levels : Displays live upper and lower forecast values for quick reference.
Cross Signals : Marks potential overbought and oversold zones with ▲/▼ signals when price exits the band.
Trend-Adaptive Basis Color : Basis line automatically switches color to represent short-term trend direction.
Customizable Colors and Widths for complete visual control.
🔵 HOW TO USE
Apply the indicator to visualize both current Bollinger structure and its forward projection.
Use ▲/▼ breakout markers to identify short-term reversals or volatility shifts.
When price consistently rides the upper band forecast, the trend is strong and likely continuing.
When regression shows narrowing bands ahead, expect a volatility contraction or consolidation period.
For range traders, outer projected bands can be used as potential mean reversion entry points .
Combine with volume or momentum filters to confirm whether breakouts are genuine or fading.
🔵 CONCLUSION
Bollinger Bands Regression Forecast transforms classic Bollinger analysis into a predictive forecasting model .
By merging volatility dynamics with regression-based extrapolation, it provides traders with a forward-looking visualization of likely price boundaries — revealing not only where volatility is but also where it’s heading next.
Smoothed VWAP Bands + EMAsSmoothed VWAP bands
With my script, you take the raw standard deviation and apply an EMA (exponential moving
Advantages:
1. Less noise:
* The bands don’t jump around with every tiny price spike.
* Makes it easier to judge real price extremes.
2. Better zone visualization:
* Inner and outer bands are smoother and more visually “stable.”
* Easier to see meaningful trends, support/resistance, and breakout zones.
3. Fewer fakeouts:
* Traders can filter out small false signals because smoothed bands only move when volatility actually changes.
4. Dynamic to volatility:
* EMA smoothing keeps the bands adaptive:
* In quiet periods, bands tighten.
* In volatile periods, bands expand.
* But it avoids extreme jitter caused by every micro-move.
Safe Zone Rules
1. Long entries (green zone):
* Price above VWAP (trend bullish).
* Price inside inner band ±1σ (not touching outer extremes).
* Optional: candle close confirmation (price fully above inner band).
2. Short entries (red zone):
* Price below VWAP (trend bearish).
* Price inside inner band ±1σ.
* Optional: candle close confirmation.
3. Outer bands (±2σ):
* Considered overextended zones → avoid entries to reduce fakeouts.
4. Visual cues:
* Safe zones shaded lightly green/red inside inner band.
* Outer bands remain unshaded (for context).
Here’s a cheat sheet for trading the Smoothed VWAP Bands + EMAs that shows safe entry zones and trend alignment clearly.
Smoothed VWAP Bands + EMAs Cheat Sheet
Price Action Relative to Bands & EMAs
+2σ (Outer Upper Band)
----------------
Extreme volatility zone
Avoid entries here
+1σ (Inner Upper Band)
----------------
Safe zone limit for longs
Consider profit taking here
VWAP Line (Green = Bullish, Red = Bearish)
==================
Core trend indicator
Only trade in VWAP trend direction
-1σ (Inner Lower Band)
----------------
Safe zone limit for shorts
Good for entries in trend direction
-2σ (Outer Lower Band)
----------------
Extreme volatility zone
Avoid entries here
1️⃣ Trend Direction with VWAP & EMAs
* VWAP → shows the overall session trend.
* Price above VWAP → bullish
* Price below VWAP → bearish
* EMA 5 (blue) → short-term momentum
* EMA 20 (orange) → medium-term trend
Rule: Only take trades in the direction of the trend:
* Long trades → price > VWAP and EMA 5 > EMA 20
* Short trades → price < VWAP and EMA 5 < EMA 20
This prevents chasing trades against the trend and reduces fakeouts.
2️⃣ Entry Zones Using Smoothed VWAP Bands
* Inner band (±1σ) → “safe entry zone”
* Outer band (±2σ) → volatility extremes → avoid entries here
Rule: Enter longs inside the inner band above VWAP and shorts inside the inner band below VWAP.
Best used on intraday timeframes.
15, 5, 2, 1 min charts.
Previous Day Levels @darshaksscThis indicator provides intraday traders and analysts with immediate visual reference to the previous day's high, low, and close. These historical price levels are frequently watched by market participants for potential reaction, context, and session structure.
How to Add the Indicator:
Open any chart on TradingView.
Click the Indicators button at the top.
Search for “Previous Day Levels @darshakssc” in the Public Library.
Click the ★ Favorite icon if you wish to save it for quick access in the future.
Click the indicator’s name to add it to your chart.
The lines and labels will appear automatically on any intraday timeframe.
What You Will See:
Previous day’s High (red line and label: “Previous High”).
Previous day’s Low (green line and label: “Previous Low”).
Previous day’s Close (blue line and label: “Previous Close”).
These are drawn automatically at each new session and remain visible throughout today’s trading.
Usage:
Use these levels as reference points for context, risk placement, or understanding shifts in session structure.
Watch for price interactions, rejections, or consolidations around these lines—they often act as support/resistance for many trading strategies.
No signals or trade advice are provided by this tool. All decisions are made manually by the trader.
Features:
Persistent, color-coded horizontal lines and clear, small labels.
No alerts, buy/sell arrows, or any indication of trading performance.
Fully automated for each new session—no action required from the user after adding.
Disclaimer:
This indicator is intended for informational and charting purposes only. It is not financial advice or a buy/sell recommendation. Always perform your own due diligence before making trading decisions.






















