Smart Pattern Scanner ProSmart Pattern Scanner Pro — Trainer’s Guide (Step-by-Step)
1) What this tool does
Smart Pattern Scanner Pro (SPS Pro) scans multiple timeframes at once for classic candlestick patterns, filters them by trend, and presents everything in a clean table with price, signal direction, volume context, a “Vol Strength” progress bar, and a human-friendly timestamp. It also composes a single alert message when one or more patterns are found on the latest bar close.
________________________________________
2) The table at a glance (how to read one row)
Each row = one timeframe (e.g., 5m, 15m, 1h, 4h, Daily, Weekly)
• Timeframe – Shown with a readable name (“5 Minutes”, “1 Hour”, “Daily”, etc.).
• Price – The latest close at the moment the pattern is confirmed on that timeframe.
• Pattern – The first qualifying pattern detected on the last confirmed bar of that timeframe (or “—” if none).
• Signal –
o 🟢 ▲ = Bullish
o 🔴 ▼ = Bearish
o 🔵 ◆ = Neutral (e.g., Doji/Spinning Top)
• Buy Vol / Sell Vol (optional) – A rough split of volume for the most recent closed candle on that timeframe (up-close volume vs. down-close volume).
• Vol Strength (optional) – A 10-block text bar showing Total Volume ÷ SMA(Volume); quick read:
o ~0–1.0: muted activity
o 1.0: above average
o 1.5: notably elevated
• Time – The end time of the bar in your selected Timezone (Exchange by default).
If a timeframe shows “—” under Pattern, it simply means no eligible pattern was confirmed on the last completed candle for that TF.
________________________________________
3) Inputs & customization (what each section controls)
📊 Table Settings
• Table Position – Choose where the table sits on the chart (Top/Middle/Bottom + Left/Center/Right).
• Table Size – Controls the text size for all table cells.
• Show Volume Analysis – Toggles Buy Vol / Sell Vol columns.
• Show Progress Indicators – Toggles the Vol Strength column.
• Timezone – Set to Exchange, or override it to view timestamps in your local preference.
🎨 Color Theme
• Bullish / Bearish / Neutral colors – Control signal and highlight accents.
• Volume Up / Volume Down colors – Control the colors of the volume numbers and the Vol Strength bar.
• Backgrounds, borders, and text use a professional dark palette for contrast and readability.
⏱️ Timeframes
• Timeframes (comma-separated) – e.g., 5,15,60,240,1D,1W
Valid entries: 1,3,5,15,30,60,120,240,480,720,1D/D,1W/W,1M/M,3M
The scanner will create one row per timeframe.
📈 Technical Analysis
• Detect Trend Based on SMA – If on, patterns are trend-qualified using an SMA gate:
o Uptrend (uTrd) = close > SMA(maLen)
o Downtrend (dTrd) = close < SMA(maLen)
• SMA Length (maLen) – Length for the trend SMA gate (default 50).
• Volume MA Length (volMaLen) – SMA length used to compute Vol Strength.
🕯️ Pattern Selection
• Pattern Type – Scan Bullish, Bearish, or Both.
• Checkboxes – Turn specific patterns on/off (Engulfing, Morning/Evening Stars, Three Soldiers/Crows, Doji family, Hammers, Tasuki Gaps, Windows, Harami, Piercing/Dark Cloud, etc.).
Tip: For faster performance, disable patterns you don’t use.
________________________________________
4) How detection actually works (under the hood)
1. Per-timeframe scanning
The script iterates through your list of timeframes. For each TF it calls the detection engine via request.security(…tf…, main(true)) so that the logic runs natively on that timeframe.
2. Trend qualifier (optional)
If Detect Trend Based on SMA is enabled:
o Bullish patterns often require the recent context to be at/after downtrend (e.g., a reversal) or during an uptrend depending on the pattern.
o Bearish patterns similarly check for uTrd/dTrd.
You’ll notice some checks use offsets like , , to ensure the trend context existed before the current bar, making signals more realistic.
3. First-match wins
Inside each TF scan, patterns are checked in a fixed order. The code assigns the first eligible pattern to the row and ignores subsequent ones for that bar. This keeps rows clean and avoids double-signaling.
4. Confirmed bar only
The script saves a pattern only when the bar is confirmed (barstate.isconfirmed), reducing the “painting” of signals that vanish before close.
Important: For higher TFs, the table won’t update that TF’s row until its bar closes. E.g., a Daily pattern appears only after the daily candle closes.
5. Volume context
o BuyVol = TF volume if that TF bar closed up, else 0
o SellVol = TF volume if that TF bar closed down, else 0
o VolRatio = TF total volume ÷ SMA(volume, volMaLen)
That ratio feeds the Vol Strength bar for quick “is today active?” context.
6. Time formatting
The time shown is the end time of the TF bar, formatted to your Timezone input (Exchange by default). Intraday TFs show HH:mm; higher TFs show a clean date or time per your settings.
________________________________________
5) Alerts — how they’re built and how to use them
• On each bar close, SPS Pro assembles one multiline alert if any timeframe reported a pattern.
Example format:
• 🎯 Pattern Alert - NIFTY
• ├ 15: Engulfing (Bull) @ 24650.20
• ├ 60: Dark Cloud (Bear) @ 24580.90
• └─────────────
• To receive alerts in TradingView:
1. Add the indicator to your chart.
2. Click Create Alert.
3. In the Condition, choose “Any alert() function call” for this script.
4. Set “Once per bar close” (recommended, matches the script).
5. Choose your delivery channels and save.
________________________________________
6) Practical workflows (for new traders)
A) Intraday momentum trade (scalp/day trade)
1. Set TFs to 5,15,60.
2. Enable Engulfing, Hammer/Hanging Man, Morning/Evening Star, Shooting Star, Doji.
3. Keep Trend Based on SMA ON (SMA 50).
4. Wait for 5m + 15m to align in the same direction (both 🟢 or both 🔴).
5. Prefer entries when Vol Strength > 1.0 on the entry TF.
6. Place stop beyond the pattern’s invalidation (e.g., below Hammer low for long).
7. Scale out near prior intraday S/R; trail stops.
B) Swing reversal trade
1. Use higher TFs: 60,240,1D,1W.
2. Focus on Rising/Falling Three Methods, Morning/Evening (Doji) Stars, Three Soldiers/Crows.
3. Look for a fresh pattern on 4h or Daily, ideally with Vol Strength > 1.3.
4. Confirm confluence with structure (trendlines, weekly levels).
5. Plan wider stops and multi-day hold; review news/catalysts.
C) News avoidance & confirmation
• If Vol Strength spikes without a clean pattern, consider standing aside or waiting for the next bar to avoid whipsaw.
• When a pattern appears with a strong Vol Strength bar, it often signals attention-worthy activity—still validate with your own plan.
________________________________________
7) Best-practice interpretation tips
• Confluence beats single signals. Two TFs pointing the same way + decent Vol Strength is more reliable than a lone 5m signal.
• Neutral patterns (Doji/Spinning Top) are context markers, not trade triggers by themselves. Wait for follow-through.
• Trend gate matters. Keeping SMA gating ON reduces counter-trend noise.
• Bars must close. Remember: higher-TF rows only change after that TF bar closes.
• “First-match wins” means the order of checks matters. You can reorder or disable patterns to fit your style.
________________________________________
8) Performance & limits (TradingView realities)
• You’re scanning several TFs, running many pattern checks. Disable unused patterns or trim TFs if you hit resource limits.
• dynamic_requests=true helps, but extreme combinations (lots of TFs + all patterns + small chart TF) can still be heavy.
• If an exchange symbol’s volume behaves oddly, re-check Volume MA Length and your Timezone for clarity.
________________________________________
9) Common FAQs & troubleshooting
• “Why do I see ‘—’ on some rows?”
No qualifying pattern on the last closed bar of that TF, or your trend gate filtered it out.
• “Why are some signals late?”
Signals appear only on bar close (by design). That’s deliberate to avoid premature triggers.
• “My alert didn’t fire.”
Make sure the chart has an active alert set to “Any alert() function call” for this script and your alert frequency is Once per bar close.
• “Can I change the strength thresholds?”
Yes—edit the line that colors Vol Strength (currently >1.5 = stronger). Adjust to your preference.
• “I want more than one pattern per TF.”
This version stores one (the first match). You can adapt the logic to collect multiple, but keep the UI readable.
________________________________________
10) Suggested training exercises for new traders
1. Replay Mode drill – On a liquid symbol, step through 2 weeks of 5m/15m data. Log which SPS signals would you take/skip and why.
2. Confluence journal – Require at least two TFs aligned. Track outcomes for 20 trades.
3. Vol Strength filter – Only act when Vol Strength > 1.2. Compare results vs. no filter.
4. Pattern-specific week – Trade only Engulfing setups for one week (paper trading), then only Stars next week. Learn the nuances.
5. Risk practice – Fix risk at 0.5–1R per trade. Journal adherence to stops and take-profits.
________________________________________
11) Advanced customization ideas (optional)
• Re-order pattern checks to favor your preferred setups.
• Tighten/loosen trend gates (e.g., require uTrd and uTrd around breakout patterns).
• Add a score column (e.g., +2 for multi-TF alignment, +1 for Vol Strength >1.3, −1 if Neutral on higher TF).
• Map “Body/Header/Title” text sizes to table sizes if you want more granular typography (current code uses the overall Table Size).
________________________________________
12) Strict disclaimer (aiTrendview)
aiTrendview Educational Notice & Risk Warning
• This scanner is provided strictly for education and research. It is not investment advice, a recommendation, or a solicitation to buy/sell any security, derivative, or cryptocurrency.
• Candlestick patterns and volume context are imperfect and can fail. Past performance does not guarantee future results.
• Markets involve substantial risk. You can lose more than your principal, especially with margin, options, or leveraged products.
• Signals are generated after bar close and may be delayed at higher timeframes or due to data/vendor issues.
• Always validate with your own analysis, risk management rules, and, where appropriate, consult a qualified financial advisor.
• By using this tool, you agree not to misuse it for unlawful activity, spam alerts, or to represent it as a guaranteed system. You accept full responsibility for any trades taken and outcomes incurred.
________________________________________
13) Quick setup checklist
• Add SPS Pro to your chart.
• Configure Timeframes you actually trade.
• Toggle Show Volume and Vol Strength as desired.
• Keep SMA Trend Gate ON for cleaner signals (tune maLen to your market).
• Create a TradingView alert for “Any alert() function call” → Once per bar close.
• Paper-trade a sample of signals before going live.
Penunjuk Breadth
Recommendation Indicatorالوصف بالعربية
استراتيجية تداول مبنية على ٦ مؤشرات تأكيدية لرصد حركة السوق واتجاهه.
تعتمد على عدّ الشموع الصاعدة والهابطة المتتالية كعامل أساسي، وتدمج معها مؤشرات إضافية للتأكيد.
عند توافق المؤشرات معًا، يتم توليد إشارة شراء (BUY) أو بيع (SELL) واضحة على الرسم البياني.
هذا يعزز دقة الإشارات ويقلل من التذبذبات أو الإشارات الكاذبة، مما يجعلها مناسبة للمتداولين الباحثين عن قوة الاتجاه وتأكيده قبل الدخول في الصفقة.
🔎 ملاحظات الاستخدام
الاستراتيجية تحتوي على ٦ أدوات تأكيد مجتمعة لضمان إشارات أدق.
يُفضل استخدامها مع اختبار رجعي (Backtesting) قبل التداول الفعلي.
يمكن تعديل إعدادات المؤشرات لتناسب السوق أو الإطار الزمني المستخدم.
لا تعتبر توصية مالية مباشرة، وإنما أداة تعليمية وتجريبية.
---
📌 Description in English
A trading strategy built on 6 confirmation indicators to track market movements and trends.
It uses consecutive up and down bars as the core logic, combined with additional indicators for confirmation.
When all confirmations align, the strategy generates clear BUY or SELL signals on the chart.
This approach improves signal accuracy, reduces noise, and helps traders confirm market direction before entering a trade.
🔎 Usage Notes
The strategy incorporates 6 confirmation tools working together for higher accuracy.
Backtesting is recommended before applying it to live trading.
Indicator parameters can be adjusted to fit different markets and timeframes.
This is not financial advice, but an educational and experimental tool.
HTH - WD Gann Square Root LevelsHTH - WD Gann Square Root Levels will plot lines for support and resistance
Smart Moving Concepts [GILDEX]This all-in-one indicator displays real-time market structure (internal & swing BOS / CHoCH), order blocks, premium & discount zones, equal highs & lows, and much more...allowing traders to automatically mark up their charts with widely used price action methodologies. Following the release of our Fair Value Gap script, we received numerous requests from our community to release more features in the same category.
"Smart Money Concepts" (SMC) is a fairly new yet widely used term amongst price action traders looking to more accurately navigate liquidity & find more optimal points of interest in the market. Trying to determine where institutional market participants have orders placed (buy or sell side liquidity) can be a very reasonable approach to finding more practical entries & exits based on price action.
The indicator includes alerts for the presence of swing structures and many other relevant conditions.
Features
This indicator includes many features relevant to SMC, these are highlighted below:
Full internal & swing market structure labeling in real-time
Break of Structure (BOS)
Change of Character (CHoCH)
Order Blocks (bullish & bearish)
Equal Highs & Lows
Fair Value Gap Detection
Previous Highs & Lows
Premium & Discount Zones as a range
Options to style the indicator to more easily display these concepts
Settings
Mode: Allows the user to select Historical (default) or Present, which displays only recent data on the chart.
Style: Allows the user to select different styling for the entire indicator between Colored (default) and Monochrome.
Color Candles: Plots candles based on the internal & swing structures from within the indicator on the chart.
Internal Structure: Displays the internal structure labels & dashed lines to represent them. (BOS & CHoCH).
Confluence Filter: Filter non-significant internal structure breakouts.
Swing Structure: Displays the swing structure labels & solid lines on the chart (larger BOS & CHoCH labels).
Swing Points: Displays swing points labels on chart such as HH, HL, LH, LL.
Internal Order Blocks: Enables Internal Order Blocks & allows the user to select how many most recent Internal Order Blocks appear on the chart.
Swing Order Blocks: Enables Swing Order Blocks & allows the user to select how many most recent Swing Order Blocks appear on the chart.
Equal Highs & Lows: Displays EQH/EQL labels on chart for detecting equal highs & lows.
Bars Confirmation: Allows the user to select how many bars are needed to confirm an EQH/EQL symbol on chart.
Fair Value Gaps: Displays boxes to highlight imbalance areas on the chart.
Auto Threshold: Filter out non-significant fair value gaps.
Timeframe: Allows the user to select the timeframe for the Fair Value Gap detection.
Extend FVG: Allows the user to choose how many bars to extend the Fair Value Gap boxes on the chart.
Highs & Lows MTF: Allows the user to display previous highs & lows from daily, weekly, & monthly timeframes as significant levels.
Premium/Discount Zones: Allows the user to display Premium, Discount, and Equilibrium zones on the chart
ELITE TRADER RSIName: RSI (Relative Strength Index)
Type: Momentum Oscillator
Default Length: 14 (periods)
Description:
Relative Strength Index (RSI) என்பது ஒரு momentum oscillator ஆகும். இது price movement-இன் வேகத்தையும் (speed) மாற்றங்களையும் (change) அளவிடுகிறது. RSI value 0–100 scale-இல் காணப்படும்.
RSI 70-க்கு மேல் சென்றால் அது Overbought நிலையை (விலை அதிகமாக உயர்ந்தது, sell வாய்ப்பு) குறிக்கும்.
RSI 30-க்கு கீழ் வந்தால் அது Oversold நிலையை (விலை அதிகமாக குறைந்தது, buy வாய்ப்பு) குறிக்கும்.
RSI-யை பயன்படுத்தி trend strength, divergence, reversal signals மற்றும் entry/exit points கண்டுபிடிக்கலாம்.
Formula (சுருக்கமாக):
RSI = 100 – (100 / (1 + RS))
இதில்,
RS = (Average Gain / Average Loss)
Usage:
Trend confirmation
Overbought / Oversold signals
Bullish & Bearish Divergence spotting
Support/Resistance confirmation
Default Settings:
RSI Length: 14
Overbought: 70
Oversold: 30
Perfect Buy Entry Checklist (SMC) v2 A title like "Perfect Buy Entry Checklist (SMC) v2" is great because it is descriptive. It tells users exactly what the indicator is designed to do.
2. Start with an overview
Briefly explain the purpose of your script. What problem does it solve? What trading concept is it based on?
Example: "This indicator automates a Smart Money Concepts (SMC) based checklist to find high-probability buy entries. It's designed to help traders identify a series of bullish market conditions in a single view."
3. List key features
Use a bulleted or numbered list to highlight the main components of your script. This makes it easy for users to quickly see what the indicator includes.
Example:
Liquidity Sweep Detection: Identifies a bearish liquidity grab followed by a bullish move.
Momentum Confirmation: Uses MACD and RSI to confirm bullish momentum.
Break of Structure (BOS): Signals when the price closes above a confirmed swing high.
Risk/Reward Calculation: Provides a basic ATR-based risk/reward check.
4. Explain how to use it
Provide simple, actionable steps on how a trader can use your indicator in their own analysis.
Example: "A 'Perfect Buy' signal is generated when all conditions in the checklist are met. You can use this signal as a final confirmation for your own trading ideas. Use it in conjunction with other price action analysis."
5. Include a disclaimer
It's important to state that the indicator is for informational purposes only and not financial advice.
Example: "Disclaimer: This indicator is for educational purposes only and should not be considered financial advice. Past performance is not indicative of future results. Always do your own research."
Reversal Radars — Berk v2.0 (Bottom & Top)1) Combined script (Dip+Tepe)
Title:
Reversal Radars — Berk v2.0 (Bottom & Top)
Description (EN):
What it does
Two high-probability reversal detectors in one indicator: a Bottom Reversal Radar (long bias) and a Top Reversal Radar (short/hedge bias). Each radar aggregates multiple conditions into a single score and triggers when Score ≥ Threshold.
How it works
RSI regime shift: Bottom = recovery after oversold (touched 30, crosses up 35). Top = roll-over from overbought (touched 70, crosses down 65).
MACD cross: Bull (up) for bottoms, Bear (down) for tops.
EMA8 filter: Close above (bottom) / below (top) EMA(8).
Structure break (BOS): Close above recent swing high / below recent swing low (lookbackBars, using precomputed highest/lowest to avoid inconsistencies).
EMA200 proximity: Price within a configurable band (default −5% … +2%).
Volume expansion: Volume ≥ SMA(20) × multiplier (default 1.5×).
Divergence: Pivot-confirmed (3/3) bullish (bottom) or bearish (top) RSI divergence.
Scoring: RSI shift +2, divergence +2, MACD +1, EMA8 +1, BOS +1, Volume +1, EMA200 band +1.
Signals & Alerts
Bottom: label “DÖNÜŞ↑” and alert “Dipten Dönüş — Ana Sinyal” when scoreLong ≥ thrLong.
Top: label “DÖNÜŞ↓” and alert “Tepeden Dönüş — Ana Sinyal” when scoreShort ≥ thrShort.
Use Once per bar close for stable alerts.
Inputs
lenRSI, rsiOS=30, rsiRecover=35, rsiOB=70, rsiFall=65, volLen=20, volMult=1.5, lookbackBars=5, ema200 band (−5…+2%), thrLong/thrShort, toggles for Bottom/Top.
Timeframes & tips
Best on Daily/4H. Tighten thresholds (e.g., 4) and raise volume multiplier (1.8–2.0×) on lower TFs or thin liquidity.
No-repaint note
Evaluated on bar close; pivot divergences confirm with a natural ~3-bar delay.
Disclaimer
Educational use only. Not financial advice.
Tags: reversal, divergence, rsi, macd, ema, volume, trend, screener, stocks, crypto, bist
2) Bottom-only (Dip)
Title:
Bottom Reversal Radar — Berk v1.4
Description (EN):
Purpose
Scores bottoming conditions and triggers when Score ≥ Threshold (default 3).
Components
RSI recovery after oversold (30→35), MACD bull cross, close above EMA8, BOS above recent swing high, near-EMA200 band (−5…+2%), volume ≥ SMA(20)×1.5, and pivot-confirmed (3/3) bullish RSI divergence. Weights: RSI +2, Divergence +2, others +1.
Usage
Add to chart, set alert “Dipten Dönüş — Ana Sinyal”, Once per bar close. Works on any timeframe (need ≥200 bars for EMA200). Daily/4H recommended.
No-repaint
Bar-close evaluation; divergence confirms with ~3 bars.
Tags: bottom, reversal, rsi, macd, ema, volume, divergence
3) Top-only (Tepe)
Title:
Top Reversal Radar — Berk v1.0
Description (EN):
Purpose
Detects topping risk and triggers when Score ≥ Threshold (default 3) for exits/hedges.
Components
RSI roll-over from overbought (70→65), MACD bear cross, close below EMA8, BOS below recent swing low, near-EMA200 band, volume ≥ SMA(20)×1.5, and pivot-confirmed (3/3) bearish RSI divergence. Weights: RSI +2, Divergence +2, others +1.
Usage
Add to chart, set alert “Tepeden Dönüş — Ana Sinyal”, Once per bar close. Daily/4H preferred; tighten thresholds on lower TFs.
No-repaint
Bar-close evaluation; divergence confirms with ~3 bars.
Tags: top, reversal, rsi, macd, ema, volume, divergence
TrendBreaks & MA Divergence v1.3 — couleurs perso (panel)clean and easy predictive mouvements and swing stratagy
ELITE TRADERS RSIELITE TRADERS RSI 7538859909
📊ELITE RSI Indicator
இந்த indicator இரண்டு RSI variations-ஐ ஒரே separate box (sub-panel)ல் காட்டும்:
✅ HSI RSI – Custom RSI calculation (default length: 13)
✅ AMP RSI – Alternate RSI calculation for momentum confirmation (default length: 13)
✨ Features:
- Overbought (70) & Oversold (30) levels
- Midline (50) for trend bias
- Extra dotted levels (73.78 & 24.59) for AMP RSI
- Color-coded RSI lines (Green for oversold, Red for overbought)
🎯 Use Case:
- Momentum overbought/oversold check
- Double RSI confirmation
- Entry/Exit timing refinement in trading strategies
⚠️ Disclaimer: இது purely technical analysis tool. Buy/Sell decisions செய்யும் முன்னால் உங்க risk management-ஐ follow பண்ணுங்க.
hirochan - CCI Zero-Cross Alerts (Long/Short)hirochan - CCI Zero-Cross Alerts (Long/Short) is an indicator that notifies you with an alert whenever the CCI crosses the zero line.
Hirochan 1.0— multisignt
Other natural variants:
• “An indicator that combines multiple methods to boost binary options win rates.”
• “A strategy-packed indicator designed to raise your binary options success rate.”
Sector Rotation & Money Flow Dashboard📊 Overview
The Sector Rotation & Money Flow Dashboard is a comprehensive market analysis tool that tracks 39 major sector ETFs in real-time, providing institutional-grade insights into sector rotation, momentum shifts, and money flow patterns. This indicator helps traders identify which sectors are attracting capital, which are losing favor, and where the next opportunities might emerge.
Perfect for swing traders, position traders, and investors who want to stay ahead of sector rotation and ride the strongest trends while avoiding weak sectors.
🎯 What This Indicator Does
Tracks 39 Major Sectors: From technology to utilities, cryptocurrencies to commodities
Calculates Multiple Timeframes: 1-week, 1-month, 3-month, and 6-month performance
Advanced Momentum Metrics: Proprietary momentum score and acceleration calculations
Relative Strength Analysis: Compare sector performance against any benchmark index
Money Flow Signals: Visual indicators showing where institutional money is moving
Smart Filtering: Pre-built strategy filters for different trading styles
Trend Detection: Emoji-based visual system for quick trend identification
💡 Key Features
1. Performance Metrics
Multiple timeframe analysis (1W, 1M, 3M, 6M)
Month-over-month change tracking
Relative strength vs benchmark index
2. Advanced Analytics
Momentum Score: Weighted composite of recent performance
Acceleration: Rate of change in momentum (second derivative)
Money Flow Signals: IN/OUT/TURN/WATCH indicators
3. Strategy Preset Filters
🎯 Swing Trade: High momentum opportunities
📈 Trend Follow: Established uptrends
🔄 Mean Reversion: Oversold bounce candidates
💎 Value Hunt: Deep value opportunities
🚀 Breakout: Emerging strength
⚠️ Risk Off: Sectors to avoid
4. Customization
All 39 sector ETFs can be customized
Adjustable benchmark index
Flexible display options
Multiple sorting methods
📋 Settings Documentation
Display Settings
Show Table (Default: On)
Toggles the entire dashboard display
Table Position (Default: Middle Center)
Choose from 9 positions on your chart
Options: Top/Middle/Bottom × Left/Center/Right
Rows to Show (Default: 15)
Number of sectors displayed (5-40)
Useful for focusing on top/bottom performers
Sort By (Default: Momentum)
1M/3M/6M: Sort by specific timeframe performance
Momentum: Weighted recent performance score
Acceleration: Rate of momentum change
1M Change: Month-over-month improvement
RS: Relative strength vs benchmark
Flow: IN First: Prioritize sectors with inflows
Flow: TURN First: Focus on reversal candidates
Recovery Plays: Oversold sectors recovering
Oversold Bounce: Deepest declines with positive signs
Top Gainers/Losers 3M: Best/worst quarterly performers
Best Acc + Mom: Combined strength score
Worst Acc (Topping): Sectors losing momentum
Filter Settings
Strategy Preset Filter (Default: All)
All: No filtering
🎯 Swing Trade: Mom >5, Acc >2, Money flowing in
📈 Trend Follow: Positive 1M & 3M, RS >0
🔄 Mean Reversion: Oversold but improving
💎 Value Hunt: Down >10% with recovery signs
🚀 Breakout: Rapid momentum surge
⚠️ Risk Off: Declining or topping sectors
Custom Flow Filter: Use manual flow filter
Custom Flow Signal Filter (Default: All)
Only active when Strategy Preset = "Custom Flow Filter"
IN Only: Strong inflows
TURN Only: Reversal signals
WATCH Only: Recovery candidates
OUT Only: Outflow sectors
Active Flows Only: Any non-neutral signal
Hide Low Volume ETFs (Default: Off)
Filters out illiquid sectors (future enhancement)
Visual Settings
Show Trend Emojis (Default: On)
🚀 Breakout (Strong 1M + High Acceleration)
🔥 Hot Recovery (From -10% to positive)
💪 Steady Uptrend (All timeframes positive)
➡️ Sideways/Ranging
⚠️ Warning/Topping (Up >15%, now slowing)
📉 Falling (Negative + declining)
🔄 Bottoming (Improving from lows)
Compact Mode (Default: Off)
Removes decimals for cleaner display
Useful when showing many rows
Min Data Points Required (Default: 3)
Minimum data points needed to display a sector
Prevents showing sectors with insufficient data
Relative Strength Settings
RS Benchmark Index (Default: AMEX:SPY)
Index to compare all sectors against
Can use SPY, QQQ, IWM, or any other index
RS Period (Days) (Default: 21)
Lookback period for RS calculation
21 days = 1 month, 63 days = 3 months, etc.
Sector ETF Settings (Groups 1-39)
Each sector has two inputs:
Symbol: The ticker (e.g., "AMEX:XLF")
Name: Display name (e.g., "Financials")
All 39 sectors can be customized to track different ETFs or markets.
📈 Column Explanations
Sector: ETF name/description
1M%: 1-month (21-day) performance
3M%: 3-month (63-day) performance
6M%: 6-month (126-day) performance
Mom: Momentum score (weighted average, recent-biased)
Acc: Acceleration (momentum rate of change)
Δ1M: Month-over-month change
RS: Relative strength vs benchmark
Flow: Money flow signal
↗️ IN: Strong inflows
🔄 TURN: Potential reversal
👀 WATCH: Recovery candidate
↘️ OUT: Outflows
—: Neutral
🎮 Usage Tips
For Swing Traders (3-14 days)
Use "🎯 Swing Trade" filter
Sort by "Acceleration" or "Momentum"
Look for Flow = "IN" and Mom >10
Confirm with positive RS
For Position Traders (2-8 weeks)
Use "📈 Trend Follow" filter
Sort by "RS" or "Best Acc + Mom"
Focus on consistent green across timeframes
Ensure RS >3 for market leaders
For Value Investors
Use "💎 Value Hunt" filter
Sort by "Recovery Plays" or "Top Losers 3M"
Look for improving Δ1M
Check for "WATCH" or "TURN" signals
For Risk Management
Regularly check "⚠️ Risk Off" filter
Sort by "Worst Acc (Topping)"
Review holdings for ⚠️ warning emojis
Exit sectors showing "OUT" flow
Market Regime Recognition
Bull Market: Many sectors showing "IN" flow, positive RS
Bear Market: Widespread "OUT" flows, negative RS
Rotation: Mixed flows, some "IN" while others "OUT"
Recovery: Multiple "TURN" and "WATCH" signals
🔧 Pro Tips
Combine Filters + Sorting: Filter first to narrow candidates, then sort to prioritize
Multi-Timeframe Confirmation: Best setups show alignment across 1M, 3M, and momentum
RS is Key: Sectors outperforming SPY (RS >0) tend to continue outperforming
Acceleration Matters: Positive acceleration often precedes price breakouts
Flow Transitions: "WATCH" → "TURN" → "IN" progression identifies new trends early
Regular Scans:
Daily: Check "Acceleration" sort
Weekly: Review "1M Change"
Monthly: Analyze "RS" shifts
Divergence Signals:
Price up but Acceleration down = Potential top
Price down but Acceleration up = Potential bottom
Sector Pairs Trading: Long sectors with "IN" flow, short sectors with "OUT" flow
⚠️ Important Notes
This indicator makes 40 security requests (maximum allowed)
Best used on Daily timeframe
Data updates in real-time during market hours
Some ETFs may show "—" if data is unavailable
🎯 Common Strategies
"Follow the Flow"
Only trade sectors showing "IN" flow with positive RS
"Rotation Catcher"
Focus on "TURN" signals in sectors down >15% from highs
"Momentum Rider"
Trade top 3 sectors by Momentum score, exit when Acceleration turns negative
"Mean Reversion"
Buy sectors in bottom 20% by 3M performance when Δ1M improves
"Relative Strength Leader"
Maintain positions only in sectors with RS >5
Not financial advice - always do additional research
MultiFactor Power Indicator v4 (No-Repaint) 📊 Strategy: Trend + Momentum + Signal Confirmation
This setup uses 3 layers so signals are reliable:
1. Trend Filter: 200 EMA → only take trades in trend direction.
2. Momentum Trigger: RSI + MACD combo to confirm momentum.
3. Entry/Exit Signal: Arrow on chart (Buy/Sell) with alerts — non-repainting because it only confirms on candle close.
Market Internal Strength (Nasdaq/S&P 500)### Summary
This indicator is a versatile tool designed to measure the "internal health" or "market breadth" of a major stock index. Instead of just looking at the index's price, it analyzes the percentage of its constituent stocks that are participating in the trend. Users can easily switch between the **Nasdaq 100** and the **S&P 500** directly from the settings.
The data is displayed as an oscillator (scaled 0-100), similar to the RSI, making it intuitive to identify broad market **Overbought** and **Oversold** conditions and spot potential **Divergences** against the index price.
---
### What does it measure?
The indicator plots three lines based on the selected index's market breadth data:
* **% > 20D MA (Blue Line):** The percentage of stocks trading above their 20-day moving average (short-term trend).
* **% > 50D MA (Orange Line):** The percentage of stocks trading above their 50-day moving average (medium-term trend).
* **% > 200D MA (Red Line):** The percentage of stocks trading above their 200-day moving average (long-term trend).
---
### How to Use and Interpret
**1. Overbought / Oversold Conditions:**
* **Approaching the Overbought Zone (Value > 80):** This indicates that a very high number of stocks are in an uptrend, suggesting the market may be overheated or in a state of "Greed." This can signal a potential pullback or consolidation ahead.
* **Approaching the Oversold Zone (Value < 20):** This indicates that a large number of stocks have been sold off heavily, suggesting the market may be in a state of "Extreme Fear." This could present an opportunity for a technical rebound.
**2. Trend Confirmation:**
* When an index (e.g., QQQ or SPY) is making new highs and the **% > 200D MA** line is also rising, it confirms that the uptrend is healthy and broadly supported by the majority of stocks.
**3. Divergence Signals:**
* **Bearish Divergence:** If the index price reaches a new high but the indicator (especially the 50D and 200D lines) forms a lower high, it's a warning sign. This suggests that fewer stocks are participating in the rally and the trend's foundation is weakening, which could precede a reversal.
* **Bullish Divergence:** Conversely, if the index price makes a new low but the indicator forms a higher low, it signals that selling pressure is exhausting. Fewer stocks are making new lows, which could be an early sign of a potential bottom and a reversal to the upside.
---
### Settings
* **Index:** Choose between the "Nasdaq 100" and "S&P 500" as your data source.
* **Timeframe:** Allows you to select the data's timeframe (Daily "D" is recommended as the minimum).
* **Overbought/Oversold Level:** Lets you customize the threshold for the OB/OS zones.
* **Line Visibility:** You can toggle the visibility of each of the three lines.
EdgePredict — SWING CLEAN (v2.1)easy and clean indicator for predictions
Ultra-simple reading
Colored candlesticks = context (above EMA → greenish, below → reddish).
Green/red halo = active swing signal.
Arrow = entry timing.
Activate the Score panel only if you want to validate the signal strength (showScorePane).
MACD BILE
📊 How to Interpret
Green histogram → strong bullish momentum, favoring buy/long setups.
Red histogram → strong bearish momentum, favoring sell/short setups.
MACD crossing above Signal → buy signal.
MACD crossing below Signal → sell signal.
Because the cycle is adaptive, the indicator becomes more responsive in volatile markets and more stable during sideways conditions, reducing noise compared to the standard fixed-period MACD.
🔑 Key Advantages over Standard MACD
Adaptive to market conditions → no need to manually choose fixed periods.
Reduces false signals during sideways or ranging markets.
Provides clearer trend detection, especially in highly volatile assets such as crypto, forex, and stocks.
MA8 vs MA55 Multi-TF Crossing Info (dengan Alert Text)//@version=5
indicator("MA8 vs MA55 Multi-TF Crossing Info (dengan Alert Text)", overlay=true, max_labels_count=500)
// --- Sumber harga MA ---
src = close
// --- Hitung per TF ---
ma8_1 = request.security(syminfo.tickerid, "1", ta.sma(src, 8))
ma55_1 = request.security(syminfo.tickerid, "1", ta.sma(src, 55))
bull_1 = ta.crossover(ma8_1, ma55_1)
bear_1 = ta.crossunder(ma8_1, ma55_1)
isBuy_1 = ma8_1 > ma55_1
ma8_5 = request.security(syminfo.tickerid, "5", ta.sma(src, 8))
ma55_5 = request.security(syminfo.tickerid, "5", ta.sma(src, 55))
bull_5 = ta.crossover(ma8_5, ma55_5)
bear_5 = ta.crossunder(ma8_5, ma55_5)
isBuy_5 = ma8_5 > ma55_5
ma8_15 = request.security(syminfo.tickerid, "15", ta.sma(src, 8))
ma55_15 = request.security(syminfo.tickerid, "15", ta.sma(src, 55))
bull_15 = ta.crossover(ma8_15, ma55_15)
bear_15 = ta.crossunder(ma8_15, ma55_15)
isBuy_15 = ma8_15 > ma55_15
ma8_60 = request.security(syminfo.tickerid, "60", ta.sma(src, 8))
ma55_60 = request.security(syminfo.tickerid, "60", ta.sma(src, 55))
bull_60 = ta.crossover(ma8_60, ma55_60)
bear_60 = ta.crossunder(ma8_60, ma55_60)
isBuy_60 = ma8_60 > ma55_60
ma8_240 = request.security(syminfo.tickerid, "240", ta.sma(src, 8))
ma55_240 = request.security(syminfo.tickerid, "240", ta.sma(src, 55))
bull_240 = ta.crossover(ma8_240, ma55_240)
bear_240 = ta.crossunder(ma8_240, ma55_240)
isBuy_240= ma8_240 > ma55_240
ma8_D = request.security(syminfo.tickerid, "D", ta.sma(src, 8))
ma55_D = request.security(syminfo.tickerid, "D", ta.sma(src, 55))
bull_D = ta.crossover(ma8_D, ma55_D)
bear_D = ta.crossunder(ma8_D, ma55_D)
isBuy_D = ma8_D > ma55_D
// --- Table pojok kanan atas ---
var table T = na
if barstate.isfirst
T := table.new(position.top_right, 1, 8, border_width=1)
// Helper tampilan status
f_row(tbl, row, tfName, isBuy) =>
bg = isBuy ? color.green : color.red
txt = tfName + " : " + (isBuy ? "BUY" : "SELL")
table.cell(tbl, 0, row, txt, text_color=color.white, bgcolor=bg)
f_row(T, 0, "1m", isBuy_1)
f_row(T, 1, "5m", isBuy_5)
f_row(T, 2, "15m", isBuy_15)
f_row(T, 3, "1h", isBuy_60)
f_row(T, 4, "4h", isBuy_240)
f_row(T, 5, "1D", isBuy_D)
// --- Info crossing terakhir ---
var string lastCross = "Tidak ada crossing baru"
if bull_1
lastCross := "CROSS UP di TF 1m"
if bear_1
lastCross := "CROSS DOWN di TF 1m"
if bull_5
lastCross := "CROSS UP di TF 5m"
if bear_5
lastCross := "CROSS DOWN di TF 5m"
if bull_15
lastCross := "CROSS UP di TF 15m"
if bear_15
lastCross := "CROSS DOWN di TF 15m"
if bull_60
lastCross := "CROSS UP di TF 1h"
if bear_60
lastCross := "CROSS DOWN di TF 1h"
if bull_240
lastCross := "CROSS UP di TF 4h"
if bear_240
lastCross := "CROSS DOWN di TF 4h"
if bull_D
lastCross := "CROSS UP di TF 1D"
if bear_D
lastCross := "CROSS DOWN di TF 1D"
// tampilkan baris khusus "INFO ALERT"
table.cell(T, 0, 6, "INFO: " + lastCross, text_color=color.yellow, bgcolor=color.black)
// --- Alert asli (untuk notifikasi) ---
if bull_1 or bear_1
alert(lastCross, alert.freq_once_per_bar_close)
if bull_5 or bear_5
alert(lastCross, alert.freq_once_per_bar_close)
if bull_15 or bear_15
alert(lastCross, alert.freq_once_per_bar_close)
if bull_60 or bear_60
alert(lastCross, alert.freq_once_per_bar_close)
if bull_240 or bear_240
alert(lastCross, alert.freq_once_per_bar_close)
if bull_D or bear_D
alert(lastCross, alert.freq_once_per_bar_close)
KRA Valuation ToolThe KRA valuation tool adds volume and market context (DXY) to RSI, making it more selective and potentially more reliable for reversals—but it trades fewer signals than a plain RSI. Essentially, it favors quality over quantity.
Pros:
Multi-factor confirmation – Combines RSI with volume and DXY trend to filter weak signals.
Contrarian alignment – Only triggers buys when RSI is oversold and DXY falling, sells when RSI is overbought and DXY rising, improving reversal accuracy.
Volume filter – Reduces false signals by ignoring low-volume periods.
50% midline – Helps identify neutral zones and trend shifts more clearly.
Visual signals – Bull/bear markers make it easier to spot setups at a glance.
Customizable – Inputs for RSI length, volume MA, and DXY symbol allow adaptation to different markets.
♨️盛天®MACD背離Ⓜ️速效TopDog版🕯📊功能概述
該指標整合了傳統 MACD(移動平均線收斂-發散指標)的核心功能,並新增了背離檢測、Top Dog Trading 的 MOM 和 DAD 模式、多時間框架支持以及靈活的視覺化和警報設置。
以下是其主要功能👇 :
1️⃣ MACD 核心計算MACD 線:由快速移動平均線(Fast MA)減去慢速移動平均線(Slow MA)計算得出,反映價格的短期與長期趨勢差異。
信號線:對 MACD 線進行平滑處理(通常使用 EMA 或 SMA),用於識別趨勢轉換點。
直方圖:MACD 線與信號線的差值,顯示動量的強弱和方向。
靈活性:用戶可選擇使用 EMA(指數移動平均線)或 SMA(簡單移動平均線)進行計算,並可設置快速均線、慢速均線和信號線的週期。
📊Feature Overview
This indicator integrates the core functionality of the traditional MACD (Moving Average Convergence-Divergence) indicator and adds divergence detection, Top Dog Trading's MOM and DAD modes, support for multiple time frames, and flexible visualization and alert settings.
Here are its key features:
1. MACD Core Calculation: The MACD Line is calculated by subtracting the Slow Moving Average (Slow MA) from the Fast Moving Average (Fast MA) and reflects the divergence between short-term and long-term price trends.
Signal Line: The MACD Line is smoothed (typically using an EMA or SMA) to identify trend reversals.
Histogram: The difference between the MACD Line and the Signal Line indicates the strength and direction of momentum.
Flexibility: Users can choose to use either EMA (Exponential Moving Average) or SMA (Simple Moving Average) for calculations, and can set the periods for the fast and slow moving averages, as well as the signal line.
2️⃣多時間框架支持通過 request.security 函數,允許用戶選擇不同的時間框架(例如 1 小時、日線等)來計算 MACD,適用於分析更高或更低時間框架的趨勢,無需改變圖表的當前時間框架。
2️⃣Multi-timeframe support is available through the request.security function, allowing users to select different timeframes (such as 1 hour, daily, etc.) to calculate the MACD. This is suitable for analyzing trends in higher or lower timeframes without changing the current timeframe of the chart.
3️⃣Top Dog Mode:
The Top Dog Mode is an advanced feature of the indicator that enhances the MACD's sensitivity to short-term momentum and its ability to identify long-term trends through specific moving average periods (5, 20, 30) and MOM/DAD visualization. It is particularly suitable for short-term traders, swing traders, and market participants who need fast momentum signals. Through crossover dots, MOM histograms, DAD direction alerts, and divergence detection, the Top Dog Mode provides traders with flexible signal generation tools suitable for various market environments.
The signal line period (30) is longer than the standard MACD's 9, which helps filter out short-term fluctuations and confirm long-term trends.
The Top Dog pattern is suitable for the following trading scenarios:
(🔵➤ Short-term trading scenario: In highly volatile markets (such as forex or cryptocurrencies), use the rapid crossover signals of the MOM and DAD to capture short-term price fluctuations.
Recommendation: Use this pattern on lower timeframes (such as the 5-minute or 15-minute timeframe) and set a stop-loss to control risk.
(🔵➤ Trend confirmation scenario: Use the direction of the DAD to confirm the long-term trend and combine it with the MOM histogram to determine entry points.
Recommendation: Use this pattern on higher timeframes (such as the 1-hour or 4-hour timeframe) and combine it with trendlines or moving averages.
(🔵➤ Reversal trading scenario: Combine the Top Dog pattern's divergence signals (labeled "divergence" or "hidden") to identify potential trend reversals.
Recommendation: Confirm divergence signals near key support/resistance levels to reduce the risk of false positives.
(🔵➤ Trend Continuation Scenarios: Using Hidden Divergences (labeled "Hidden") to Identify Trend Continuation Opportunities 👇
4. Divergence Detection: Regular Divergences (labeled "Divergence"): Bullish Divergence: When the price makes lower lows, but the MACD histogram or MACD line makes higher lows, it indicates weakening bearish momentum and may signal a reversal.
Bearish Divergence: When the price makes higher highs, but the MACD histogram or MACD line makes lower highs, it indicates weakening bullish momentum and may signal a reversal. 👇
Hidden Divergences (labeled "Hidden"): Hidden Bullish Divergence: When the price makes higher lows, but the MACD histogram or MACD line makes lower lows, it may signal the possibility of trend continuation.
Hidden Bearish Divergence: When the price makes lower highs, but the MACD histogram or MACD line makes lower highs, it may signal a reversal. The line has made a higher high, indicating the possibility of trend continuation👇
3️⃣Top Dog 模式:
Top Dog 模式是該指標的一個進階功能,通過特定的均線週期(5、20、30)和 MOM/DAD 的視覺化方式,增強了 MACD 對短期動量的敏感性和長期趨勢的確認能力。它特別適合短線交易者、波段交易者和需要快速動量信號的市場參與者。通過交叉圓點、MOM 直方圖、DAD 方向警報和背離檢測,Top Dog 模式為交易者提供了靈活的信號生成工具,適用於多種市場環境。
信號線週期(30)比標準 MACD 的 9 更長,有助於過濾短期波動,確認長期趨勢。
Top Dog 模式適用於以下交易場景:
(🔵➤短線交易場景:在高波動市場(如外匯或加密貨幣)中,利用 MOM 和 DAD 的快速交叉信號捕捉短期價格波動。
建議:在低時間框架(如 5 分鐘或 15 分鐘)使用,並設置止損以控制風險。
(🔵➤ 趨勢確認場景:利用 DAD 的方向確認長期趨勢,結合 MOM 直方圖判斷進場時機。
建議:在較高時間框架(如 1 小時或 4 小時)使用,結合趨勢線或移動平均線。
(🔵➤反轉交易場景:結合 Top Dog 模式的背離信號(標籤“背”或“隱”),識別潛在的趨勢反轉。
建議:在關鍵支撐/阻力位附近確認背離信號,降低假信號風險。
(🔵➤ 趨勢延續場景:利用隱藏背離(標籤“隱”)捕捉趨勢延續機會👇
4. Divergence Detection: Regular Divergence (labeled "Divergence"): Bullish Divergence: When prices make lower lows, but the MACD histogram or MACD line makes higher lows, it indicates weakening downside momentum and may signal a reversal.
Bearish Divergence: When prices make higher highs, but the MACD histogram or MACD line makes lower highs, it indicates weakening upside momentum and may signal a reversal.
4️⃣背離檢測常規背離(標籤為“背”):看漲背離:當價格創出更低低點,但 MACD 直方圖或 MACD 線創出更高低點,表明下跌動量減弱,可能預示反轉。
看跌背離:當價格創出更高高點,但 MACD 直方圖或 MACD 線創出更低高點,表明上漲動量減弱,可能預示反轉👇。
隱藏背離(標籤為“隱”):隱藏看漲背離:當價格創出更高低點,但 MACD 直方圖或 MACD 線創出更低低點,表明趨勢延續的可能。
隱藏看跌背離:當價格創出更低高點,但 MACD 直方圖或 MACD 線創出更高高點,表明趨勢延續的可能👇
5️⃣ Trend Coloring MACD Line: Based on the position of the MACD line relative to the signal line (crossing above for an uptrend, crossing below for a downtrend), you can choose whether to display the trend color (default green for uptrend, red for downtrend)👇.
5️⃣ 趨勢著色MACD 線:根據 MACD 線相對於信號線的位置(上穿為上升趨勢,下穿為下降趨勢),可選擇是否顯示趨勢顏色(默認綠色為上升,紅色為下降)👇 。
6️⃣ Crossover Dots:
When the MACD line crosses the signal line, a dot appears: Upward crossover (MACD line crosses above the signal line): a green dot.
Downward crossover (MACD line crosses below the signal line): a red dot. You can set whether to display the dot and its width.
6️⃣ 交叉圓點:
當 MACD 線與信號線交叉時,顯示圓點:上穿(MACD 線上穿信號線):綠色圓點。
下穿(MACD 線下穿信號線):紅色圓點。可設置是否顯示以及寬度👇 。
7️⃣ Display Flexibility: Users can choose whether to display the MACD line, signal line, histogram, histogram outline, MOM histogram (Top Dog pattern), crossover dots, and divergence labels.
Line widths (MACD line, signal line, histogram, dots) and color settings are adjustable.
7️⃣顯示靈活性用戶可選擇是否顯示 MACD 線、信號線、直方圖、直方圖外框、MOM 直方圖(Top Dog 模式)、交叉圓點和背離標籤。
可調整線條寬度(MACD 線、信號線、直方圖、圓點)和顏色設置👇 。
8️⃣警報功能:
MACD交叉警報:
🚨MACD 線上穿信號線(看漲信號)。
🚨MACD 線下穿信號線(看跌信號)。
🚨MACD > 0 且上穿(強看漲信號)。
🚨MACD < 0 且下穿(強看跌信號)。
背離警報:
🚨MACD 直方圖/MOM 的常規和隱藏看漲/看跌背離。
🚨MACD 線/DAD 的常規和隱藏看漲/看跌背離。
DAD 方向警報:
🚨DAD(信號線)方向改變(交叉前一根 K 線的信號線值)。
🚨DAD 向上(信號線上升)。
🚨DAD 向下(信號線下降)。
所有警報默認啟用,可通過 TradingView 的警報設置面板配置通知方式。
8️⃣Alert Features:
MACD Crossover Alerts:
🚨MACD Line crosses above Signal Line (bullish signal).
🚨MACD Line crosses below Signal Line (bearish signal).
🚨MACD > 0 and crosses upward (strong bullish signal).
🚨MACD < 0 and crosses downward (strong bearish signal).
Divergence Alerts:
🚨Regular and hidden bullish/bearish divergences of the MACD Histogram/MOM.
🚨Regular and hidden bullish/bearish divergences of the MACD Line/DAD.
DAD Direction Alerts:
🚨DAD (Signal Line) direction changes (crosses over the previous candlestick's Signal Line value).
🚨DAD up (Signal Line rising).
🚨DAD down (Signal Line falling).
All alerts are enabled by default, and notification methods can be configured through the TradingView Alerts panel.
Trend Duration (Top-Right) — Fixed//@version=5
indicator("Trend Duration (Top-Right) — Fixed", overlay=true)
// === Input ===
maLen = input.int(50, "MA Length", minval=1)
maType = input.string("EMA", "MA Type", options= )
showBox = input.bool(true, "Show status box (top-right)")
// === MA calculation ===
ma = maType == "EMA" ? ta.ema(close, maLen) : ta.sma(close, maLen)
plot(ma, "MA", color=color.orange, linewidth=2)
// === Trend detection ===
isUp = close > ma
isDown = close < ma
// === Persistent state ===
var string curTrend = "NONE"
var int startBarIndex = na
if barstate.isconfirmed
if isUp and curTrend != "UP"
curTrend := "UP"
startBarIndex := bar_index
else if isDown and curTrend != "DOWN"
curTrend := "DOWN"
startBarIndex := bar_index
// === Duration calculation ===
// Hitung jumlah bar sejak trend mulai
barsPassed = na(startBarIndex) ? 0 : bar_index - startBarIndex
// Konversi ke menit sesuai TF chart
minutesPassed = barsPassed * timeframe.multiplier
hours = math.floor(minutesPassed / 60)
mins = minutesPassed - hours * 60
durText = (hours > 0 ? str.tostring(hours) + "h " : "") + str.tostring(mins) + "m"
// === Build table (top-right) ===
var table t = table.new(position.top_right, 1, 2, border_width = 1)
if showBox
bg = curTrend == "UP" ? color.new(color.green, 0) : curTrend == "DOWN" ? color.new(color.red, 0) : color.new(color.gray, 0)
table.cell(t, 0, 0, "Trend: " + curTrend, text_color = color.white, bgcolor = bg, text_size = size.normal)
table.cell(t, 0, 1, "Duration: " + durText, text_color = color.white, bgcolor = bg, text_size = size.normal)
Nasdaq 100 Internal Strength### Summary
This indicator is designed to measure the "health" or "internal strength" of the Nasdaq 100 index. Instead of just looking at the index's price, it analyzes whether the majority of its constituent stocks are participating in the trend. The data is displayed as an oscillator (scaled 0-100), similar to the RSI, making it easy to identify broad market Overbought and Oversold conditions.
This tool is ideal for traders and investors who want a deeper perspective on market dynamics, helping to confirm trend strength or spot early warning signs of a potential reversal.
---
### What does it measure?
The indicator plots three lines based on the market breadth data for the Nasdaq 100 index:
* **% > 20D MA (Blue Line):** The percentage of Nasdaq 100 stocks trading above their 20-day moving average (short-term trend).
* **% > 50D MA (Orange Line):** The percentage of Nasdaq 100 stocks trading above their 50-day moving average (medium-term trend).
* **% > 200D MA (Red Line):** The percentage of Nasdaq 100 stocks trading above their 200-day moving average (long-term trend).
---
### How to Use and Interpret
**Overbought / Oversold Conditions:**
* **Approaching the Overbought Zone (Value > 80):** This indicates that a very high number of stocks are in an uptrend, suggesting the market may be overheated or in a state of "Greed." This can signal a potential pullback or consolidation ahead.
* **Approaching the Oversold Zone (Value < 20):** This indicates that a large number of stocks have been sold off heavily, suggesting the market may be in a state of "Extreme Fear." This could present an opportunity for a technical rebound.
**Trend Confirmation:**
* When the index (e.g., QQQ) is making new highs, and the `% > 200D MA` line is also rising and making new highs, it confirms that the uptrend is healthy and broadly supported by the majority of stocks.
**Divergence Signals:**
* **Bearish Divergence:** If the index price reaches a new high, but the indicator (especially the 50D and 200D lines) fails to reach a new high and forms a lower high instead, it's a warning sign. This suggests that fewer stocks are participating in the rally, and the trend's foundation is weakening, which could precede a reversal.
* **Bullish Divergence:** Conversely, if the index price makes a new low, but the indicator forms a higher low, it signals that selling pressure is exhausting. Fewer stocks are making new lows, which could be an early sign of a potential bottom and a reversal to the upside.
---
### Settings
* **Timeframe:** Allows you to select the data's timeframe (using the Daily "D" timeframe is recommended).
* **Overbought/Oversold Level:** Lets you customize the threshold for the OB/OS zones.
* **Show Lines:** You can toggle the visibility of each of the three lines.