TargetSniper (Core)TargetSniper – Technical Exit & Target Framework
Description
TargetSniper is a technical analysis tool designed to help traders structure their trade exits, stop-loss placement, and profit-target planning.
The script combines trend detection, breakout identification, and volatility-based projection levels into a single visual framework.
It does not attempt to predict market outcomes; instead, it organizes real-time data into clear reference points that can support discretionary decision-making.
How It Works (Conceptual Overview)
1. Trend Structure
The indicator measures short-term and mid-term price structure to determine the prevailing directional bias.
This is done by comparing recent price movement, slope changes, and dynamic support/resistance behavior.
Based on this, the chart displays a directional color signal.
2. Breakout Detection
When price moves beyond a locally defined structure — such as a pivot, compression range, or micro-trend line — the script highlights a potential breakout zone.
If conditions are met, a BUY or SELL label is plotted to mark the event.
These labels are informational only and do not guarantee trend continuation.
3. Stop-Loss Reference Line
The script draws a dynamic reference line derived from trend structure.
Traders may use this line as a potential area for stop-loss placement; this is only a structural guide, not a fixed rule.
4. Volatility-Based Target Levels (T1 / T2 / T3)
TargetSniper calculates three potential profit-taking levels using recent volatility expansion.
These projections adapt to the market environment and aim to provide traders with reference points for partial exits or risk-to-reward evaluation.
5. Risk-to-Reward Evaluation
Because the entry label typically appears near the trend structure, traders can visually estimate the distance between:
the suggested breakout level,
the stop-loss reference,
and the projected targets.
This can help assess whether a trade setup offers a favorable risk-to-reward ratio.
How to Use
Check the Trend Color
Identifies the current directional bias.
Monitor Breakout Signals
Labels appear when price breaks out of a local pattern based on the script's structure-detection logic.
Evaluate Stop-Loss Placement
Use the trend reference line as a potential SL guide.
Plan Exits Using Target Levels
T1, T2, and T3 provide volatility-based projection zones.
Assess Overall Trade Quality
Compare distance to SL vs. distance to target levels to understand potential risk-to-reward.
Notes
The script does not provide financial advice.
Market conditions can change rapidly, and past behavior does not guarantee future outcomes.
All signals and levels are technical references only and should be used with independent judgment.
趨勢分析
Fractal Levels Monitor w/ Trade Lines (ChadAnt) v2Small update. Prevents the break candle from getting another signal after the first buy/sell signal detected.
1. Fractal Level Detection
The indicator identifies Fractals, which are simply a series of bars where the center bar has the highest high (Bearish Fractal) or the lowest low (Bullish Fractal) compared to a set number of bars on either side (determined by the "Fractal Period" input, usually 2 to 5 bars).
Bullish Fractal Level (Support): The indicator plots a horizontal line at the lowest low of the most recently formed Bullish Fractal.
Bearish Fractal Level (Resistance): It plots a horizontal line at the highest high of the most recently formed Bearish Fractal.
2. The "Cross Candle" Event
The core idea isn't to trade the fractal itself, but the reaction after the fractal level is broken.
When the price breaks and closes through the established Bullish Level (support) or Bearish Level (resistance), that bar is marked as the Cross Candle.
This Cross Candle's High and Low are saved. This is the "setup" for the trade.
3. The Trade Signal (Entry Trigger)
A trade is only taken when the price breaks the extreme (High or Low) of the Cross Candle.
Buy Signal: The trade is entered long if the price breaks above the High of the Cross Candle.
Sell Signal: The trade is entered short if the price breaks below the Low of the Cross Candle.
Supply & Demand ZonesThis indicator detects high-probability supply and demand zones using a multi-step smart money concept approach:
Liquidity Sweep Detection: Identifies when price sweeps above a pivot high (supply setup) or below a pivot low (demand setup), capturing liquidity grabs by institutional traders.
Displacement Confirmation: Requires a strong displacement candle (measured by ATR and body percentage) or fair value gap (FVG/imbalance) in the opposite direction after the sweep.
Volume Confirmation: Optional filter ensures zones form only when volume exceeds the user-defined threshold, indicating institutional participation.
Smart Filtering: Built-in logic prevents overlapping zones, enforces minimum spacing between signals, and requires confirmation bars to eliminate false signals.
Zone Lifecycle Management: Zones are automatically removed when price closes through them with momentum. Breached zones can optionally "flip" to the opposite type when re-tested with strong displacement.
✨ Key Features
Clean Visual Display: Small "D" (Demand) and "S" (Supply) labels with shaded zone boxes
Non-Repainting: All signals use confirmed historical data—no lookahead or repainting
Volume Filter: Optional confirmation using volume spike detection
Zone Flip Logic: Breached demand zones can become supply (and vice versa) when violated
Overlap Prevention: Smart algorithm prevents clustered or duplicate zones
Confirmation Delay: Configurable wait period after sweep to confirm genuine setups
Customizable Inputs: Adjust pivot sensitivity, displacement thresholds, volume filters, and more
Alert Ready: Built-in alert conditions for new supply and demand zone formations
🎯 How to Add to Your Chart
Favorite the Indicator: Click the star icon to add this script to your favorites
Open Your Chart: Navigate to the asset and timeframe you want to trade (works best on 5m-1H intraday charts)
Add Indicator: Click "Indicators" at the top, search for "Supply & Demand Zones (Smart Filtered)", and add to chart
Customize Settings: Click the gear icon ⚙️ to adjust inputs based on your trading style and instrument volatility
Set Alerts: Right-click the indicator name → "Add alert" → Select "Supply Zone" or "Demand Zone" conditions
📖 How to Use
Demand Zones (Green "D" Labels):
Price swept below a swing low (liquidity grab)
Strong bullish displacement or imbalance followed
Trading Action: Look for LONG entries when price returns to the zone or on immediate continuation
Stop Loss: Place just below the zone or sweep low
Target: Next resistance level, supply zone, or risk-reward ratio target
Supply Zones (Red "S" Labels):
Price swept above a swing high (liquidity grab)
Strong bearish displacement or imbalance followed
Trading Action: Look for SHORT entries when price returns to the zone or on immediate continuation
Stop Loss: Place just above the zone or sweep high
Target: Next support level, demand zone, or risk-reward ratio target
Flipped Zones (Orange Labels):
Previous demand/supply zone was broken with strong momentum
Zone has flipped polarity and may now act as the opposite type
Trading Action: Exercise caution—wait for additional confirmation before trading flipped zones
🔍 What to Look For
High-Quality Setups:
Zone forms with above-average volume (check volume filter is enabled)
Clear liquidity sweep visible on the chart
Strong displacement candle with large body percentage
Zone aligns with overall market trend or key structure levels
Multiple timeframe confirmation (check higher timeframe for context)
Avoid These Setups:
Zones forming in choppy, low-volume conditions
Multiple overlapping zones in the same area (indicator filters these automatically)
Zones that appear immediately after news events (set confirmation bars higher)
Counter-trend zones without additional confluence
⚙️ Recommended Settings by Timeframe
5-Minute Charts (Scalping):
Pivot Lookback: 3/3
Min Displacement ATR: 0.9
Confirmation Bars: 1
Min Zone Spacing: 3-5 bars
Volume Threshold: 1.2x
15-Minute Charts (Intraday):
Pivot Lookback: 4/4 (default)
Min Displacement ATR: 1.0 (default)
Confirmation Bars: 2 (default)
Min Zone Spacing: 5-8 bars
Volume Threshold: 1.2x
1-Hour Charts (Swing Trading):
Pivot Lookback: 5/5
Min Displacement ATR: 1.2-1.5
Confirmation Bars: 3
Min Zone Spacing: 8-12 bars
Volume Threshold: 1.3x
💡 Trading Tips & Best Practices
Combine with Price Action: Use this indicator alongside candlestick patterns, support/resistance, and trendlines for confirmation
Multiple Timeframe Analysis: Check higher timeframes for overall bias and major zones
Volume is Key: Enable volume filter to focus on institutional-backed moves
Risk Management: Always use stop losses and proper position sizing
Backtesting: Test settings on your preferred instruments and timeframes before live trading
Context Matters: Consider market conditions, news events, and session times
Wait for Confirmation: Don't rush entries—wait for price reaction at the zone
⚠️ Important Disclaimers
Educational Purpose Only: This indicator is provided for educational and informational purposes. It does not constitute financial advice, investment recommendations, or trading signals.
No Guarantees: Past performance and backtested results do not guarantee future results. Trading involves substantial risk of loss.
Fractal Levels Monitor w/ Trade Lines (ChadAnt)1. Fractal Level Detection
The indicator identifies Fractals, which are simply a series of bars where the center bar has the highest high (Bearish Fractal) or the lowest low (Bullish Fractal) compared to a set number of bars on either side (determined by the "Fractal Period" input, usually 2 to 5 bars).
Bullish Fractal Level (Support): The indicator plots a horizontal line at the lowest low of the most recently formed Bullish Fractal.
Bearish Fractal Level (Resistance): It plots a horizontal line at the highest high of the most recently formed Bearish Fractal.
2. The "Cross Candle" Event
The core idea isn't to trade the fractal itself, but the reaction after the fractal level is broken.
When the price breaks and closes through the established Bullish Level (support) or Bearish Level (resistance), that bar is marked as the Cross Candle.
This Cross Candle's High and Low are saved. This is the "setup" for the trade.
3. The Trade Signal (Entry Trigger)
A trade is only taken when the price breaks the extreme (High or Low) of the Cross Candle.
Buy Signal: The trade is entered long if the price breaks above the High of the Cross Candle.
Sell Signal: The trade is entered short if the price breaks below the Low of the Cross Candle.
SOZAY Advanced Trend Lines v6“SOZAY Advanced Trend Lines v6”
It automatically draws on the chart:
Downtrends (pivot high → lower new high)
Uptrends (pivot low → higher new low)
It can place H (High) and L (Low) labels on pivot points.
The most recent trend line is solid, and older ones can be shown as dashed if you want.
To avoid too many lines, it only keeps the last X trends (you set this value).
What do the settings mean?
Left Bars / Right Bars
Defines how many bars to the left and right must be lower/higher for a bar to be considered a pivot.
Higher values = fewer but “bigger” trends.
Lower values = more frequent, shorter-term trends.
Maximum number of trends to draw
The maximum number of trend lines that will be kept on the chart (e.g. 50).
Show Pivot H / L labels
Turns the H and L labels on or off.
Draw downtrends (High)
Enables or disables downtrend lines that start from pivot highs.
Draw uptrends (Low)
Enables or disables uptrend lines that start from pivot lows.
Uptrend / Downtrend color
The colors of the lines (typically green for up, red for down).
Show old lines as dashed
The newest trend line is solid; the previous line(s) of the same type are shown as dashed.
In summary:
This script automatically draws all possible uptrends and downtrends using pivot logic so you don’t have to draw trend lines manually. You just use the settings to decide how selective it should be.
ICT/SMC DOL Detector PRO (Final)This indicator is designed to operate only on the 1-hour timeframe.
The ICT/SMC DOL Detector PRO is an educational indicator designed to identify and visualize Draw on Liquidity (DOL) levels across multiple time-frames. It tracks unmitigated daily highs and lows, clusters them into zones, and calculates confidence scores based on multiple factors including time decay, cluster size, and time-frame alignment.
This indicator is based on ICT (Inner Circle Trader) concepts and liquidity theory, which suggests that price tends to seek out areas of concentrated unfilled orders before reversing or continuing its trend.
What is a DOL (Draw on Liquidity)?
A Draw on Liquidity represents a daily high or low that has not been revisited (mitigated) by price. These levels act as "magnets" that draw price toward them because:
1. They represent untapped liquidity pools where unfilled orders exist
2. Market makers and institutions often target these levels to fill large orders
3. Price is drawn to these zones to clear pending orders
4. They can serve as potential reversal or continuation zones once liquidity is taken
Methodology
1. Level Tracking
The indicator monitors daily session highs and lows on the 1-hour time-frame, tracking:
- Session high price and time of formation
- Session low price and time of formation
- Whether each level has been breached (mitigated)
- Time elapsed since level formation
2. Clustering Algorithm
Unmitigated levels within a defined tolerance (default 0.5% of price) are grouped together to identify zones where multiple DOLs cluster. Larger clusters indicate stronger liquidity pools.
3. Confidence Scoring (The "AI" Logic)
Each DOL receives a confidence score (0-100%) based on three weighted factors. This is the core "AI" intelligence of the indicator:
**Factor 1: Cluster Size (50% weight)**
- Counts how many unmitigated levels exist within 0.5% of the price zone
- Formula: (levels_in_cluster / total_unmitigated_levels) × 50
- Logic: More unfilled orders clustered together = stronger liquidity pool = higher confidence
- Example: If 5 out of 10 total unmitigated levels cluster at 27,500, cluster score = (5/10) × 50 = 25%
**Factor 2: Time Decay (25% weight)**
- Calculates age of the level since formation
- Fresh levels (< 1 week old): Full 25% score
- Aging penalty: Loses 5% per week of age
- Maximum penalty: 25% (very old levels = 0% time score)
- Formula: max(0, 25 - (weeks_old × 5))
- Logic: Recent liquidity is more relevant than old liquidity that price has ignored for months
**Factor 3: Timeframe Alignment (25% weight)**
- Checks how many timeframes (1H, 4H, D1, W1) point in the same direction
- If multiple timeframes identify DOLs on the same side (all bullish or all bearish): Higher score
- If mixed signals: Lower score
- Formula: (aligned_timeframes / total_timeframes) × 25
- Logic: When multiple timeframes agree, the liquidity zone is validated across different time perspectives
**Total Confidence Score:**
```
Confidence = Cluster_Score + Time_Score + Alignment_Score
= (0-50%) + (0-25%) + (0-25%)
= 0-100%
```
**Example Calculation:**
```
DOL at 27,500:
- 6 out of 12 unmitigated levels cluster here → (6/12) × 50 = 25%
- Level is 2 weeks old → 25 - (2 × 5) = 15%
- 3 out of 4 timeframes bullish toward this level → (3/4) × 25 = 18.75%
- Total Confidence = 25% + 15% + 18.75% = 58.75% ≈ 59%
```
This mathematical approach removes subjectivity and provides objective, data-driven confidence scoring.
4. Multi-Timeframe Analysis
The indicator analyzes DOLs across four timeframes:
- **1H:** Intraday levels (fastest reaction)
- **4H:** Short-term swing levels
- **Daily:** Intermediate-term levels
- **Weekly:** Long-term structural levels
For each timeframe, it identifies:
- Highest confidence unmitigated high
- Highest confidence unmitigated low
- Directional bias (bullish if high > low confidence, bearish if low > high confidence)
5. Primary DOL Selection (AI Auto-Selection Logic)
When "Show AI DOL" is enabled, the indicator uses an automated selection algorithm to identify the most important targets:
**Step 1: Collect All Candidates**
The algorithm gathers all identified DOLs from all timeframes (1H, 4H, D1, W1) that meet minimum criteria:
- Must be unmitigated (not yet swept)
- Must have confidence score > 0%
- Must have at least 1 level in cluster
**Step 2: Calculate Confidence for Each**
Each candidate DOL receives its confidence score using the three-factor formula described above (Cluster + Time + Alignment).
**Step 3: Sort by Confidence**
All candidates are ranked from highest to lowest confidence score.
**Step 4: Select Primary and Secondary**
- **P1 (Primary DOL):** The DOL with the absolute highest confidence score
- **P2 (Secondary DOL):** The DOL with the second highest confidence score
**Why This Matters:**
Instead of manually scanning multiple timeframes and guessing which level is most important, the AI objectively identifies the two highest-probability liquidity targets based on quantifiable data.
**Example AI Selection:**
```
Available DOLs:
- 1H High: 27,400
- 4H High: 27,500
- D1 High: 27,500 ← P1 (Highest)
- W1 High: 27,650 ← P2 (Second Highest)
- 1H Low: 26,800
- D1 Low: 26,500
AI Selection:
P1 = 27,500 (Daily High with 92% confidence)
P2 = 27,650 (Weekly High with 88% confidence)
```
This provides a data-driven target selection rather than subjective manual interpretation. The AI removes emotion and bias, selecting targets based purely on mathematical probability.
Features
Why "AI" DOL?
The term "AI" in this indicator refers to the automated algorithmic selection process, not machine learning or neural networks. Specifically:
**What the AI Does:**
- Automatically evaluates all available DOLs across all timeframes
- Applies a weighted scoring algorithm (Cluster 50%, Time 25%, Alignment 25%)
- Objectively ranks DOLs by probability
- Selects the top 2 highest-confidence targets (P1 and P2)
- Removes human bias and emotion from target selection
**What the AI Does NOT Do:**
- It does not use machine learning or train on historical data
- It does not predict future price movements
- It does not adapt or "learn" over time
- It does not guarantee accuracy
The "AI" is simply an automated decision-making algorithm that applies consistent mathematical rules to identify the most statistically significant liquidity zones. Think of it as a "smart filter" rather than artificial intelligence in the traditional sense.
Visual Components
**Daily Level Lines:**
- Green lines: Unmitigated (not yet breached) levels
- Red lines: Mitigated (already breached) levels
- Dots at origin point showing where level was formed
- X marker when level gets breached
- Lines extend forward to show projection
**DOL Labels:**
- Display timeframe (1H, 4H, D1, W1) or "DOL" for AI selection
- Show confidence percentage in brackets
- Color-coded by timeframe:
- Lime: AI DOL (Smart selection)
- Aqua: 1-hour timeframe
- Blue: 4-hour timeframe
- Purple: Daily timeframe
- Orange: Weekly timeframe
**Info Box (Top Right):**
Displays comprehensive liquidity metrics:
- Total levels tracked
- Active (unmitigated) levels count
- Cleared (mitigated) levels count
- Flow direction (BID PRESSURE / OFFER PRESSURE)
- Most recent sweep
- Primary and Secondary DOL targets
- Multi-timeframe bias analysis
- Overall directional bias
Settings Explained
**Daily Levels Group:**
- Show Daily Highs/Lows: Toggle visibility of all daily level tracking
- Unbreached Color: Color for levels not yet hit
- Breached Color: Color for levels that have been swept
- Show X on Breach: Display marker when level is breached
- Show Dot at Origin: Display marker at level formation point
- Line Width: Thickness of level lines (1-5)
- Line Extension: How many bars forward to project (1-24)
- Max Days to Track: Historical lookback period (5-200 days)
**DOL Settings Group:**
- Cluster Tolerance %: Price range to group DOLs (0.1-2.0%)
- Show Price on Labels: Display actual price value on labels
- Backtest Mode: Only show recent labels for clean historical analysis
- Labels Lookback: Number of bars to show labels when backtesting (10-500)
**Info Box Group:**
- Show Info Box: Toggle info panel visibility
**DOL Toggles Group:**
- Show AI DOL: Display smart auto-selected primary target
- Show 1HR DOL: Display 1-hour timeframe DOLs
- Show 4HR DOL: Display 4-hour timeframe DOLs
- Show Daily DOL: Display daily timeframe DOLs
- Show Weekly DOL: Display weekly timeframe DOLs
**Advanced Group:**
- Manual Mode: Simplified display showing only daily high/low clusters
How to Use This Indicator
Educational Application
This indicator is intended for educational purposes to help traders:
1. **Understand Liquidity Concepts:** Visualize where unfilled orders may exist
2. **Identify Key Levels:** See where price may be drawn to
3. **Analyze Market Structure:** Understand how price interacts with liquidity
4. **Study Multi-Timeframe Alignment:** Observe when multiple timeframes agree
5. **Learn ICT Concepts:** Apply liquidity theory in practice
Interpretation Guidelines
**BID PRESSURE (Flow):**
When lows are being swept more than highs, it suggests:
- Sell-side liquidity being taken
- Potential for upward move to unfilled buy-side liquidity
- Market may be clearing the way for a bullish move
**OFFER PRESSURE (Flow):**
When highs are being swept more than lows, it suggests:
- Buy-side liquidity being taken
- Potential for downward move to unfilled sell-side liquidity
- Market may be clearing the way for a bearish move
**Confidence Scores:**
- 90-100%: Very high probability zone (strong cluster, recent, aligned)
- 80-89%: High probability zone (good cluster, relatively recent)
- 70-79%: Moderate probability zone (decent cluster or older)
- 60-69%: Lower probability zone (small cluster or very old)
- Below 60%: Weak zone (minimal confluence)
**Timeframe Analysis:**
- All timeframes LONG: Strong bullish alignment
- All timeframes SHORT: Strong bearish alignment
- Mixed: Conflicting signals, exercise caution
- Higher timeframes (D1, W1) carry more weight than lower (1H, 4H)
**DIRECTIONAL Indicator:**
- BULLISH: Overall bias suggests upward movement toward buy-side DOLs
- BEARISH: Overall bias suggests downward movement toward sell-side DOLs
- NEUTRAL: No clear directional bias, conflicting signals
Practical Application Examples
**Example 1: Bullish Setup**
```
Flow: BID PRESSURE (lows being swept)
P1: 27,500 (price above current market)
D1: LONG 27,500
W1: LONG 27,650
DIRECTIONAL: BULLISH
```
Interpretation: Price has cleared sell-side liquidity. High confidence buy-side DOL at 27,500. Daily and Weekly timeframes aligned bullish. Watch for move toward 27,500 target.
**Example 2: Bearish Setup**
```
Flow: OFFER PRESSURE (highs being swept)
P1: 26,200 (price below current market)
D1: SHORT 26,200
W1: SHORT 26,100
DIRECTIONAL: BEARISH
```
Interpretation: Price has cleared buy-side liquidity. High confidence sell-side DOL at 26,200. Daily and Weekly timeframes aligned bearish. Watch for move toward 26,200 target.
**Example 3: Mixed Signals - Wait**
```
Flow: BID PRESSURE
P1: 26,800
D1: LONG 27,000
W1: SHORT 26,200
DIRECTIONAL: NEUTRAL
```
Interpretation: Conflicting signals. Flow suggests up, but Weekly bias is down. Confidence scores moderate. Better to wait for clarity.
Important Considerations
This Indicator Does NOT:
- Predict the future
- Guarantee profitable trades
- Provide buy/sell signals
- Replace proper risk management
- Work in isolation without other analysis
This Indicator DOES:
- Visualize liquidity concepts
- Identify potential target zones
- Show timeframe alignment
- Calculate objective confidence scores
- Help understand market structure
Proper Usage:
1. Use as one component of a complete trading strategy
2. Combine with price action analysis
3. Confirm with other technical indicators
4. Consider fundamental factors
5. Always use proper risk management
6. Backtest any strategy before live trading
Risk Disclaimer
**FOR EDUCATIONAL PURPOSES ONLY**
This indicator is for educational purposes only. Trading financial markets involves substantial risk of loss. Past performance does not guarantee future results. Always conduct your own research and consult with a financial advisor before making trading decisions.
**Important Limitations:**
- No indicator is 100% accurate, including the AI selection
- The "AI" is an automated algorithm, not predictive artificial intelligence
- DOL levels can be swept and price can continue in the same direction
- Confidence scores are mathematical calculations, not predictions or probabilities of success
- High confidence does not mean guaranteed profit
- Markets can remain irrational longer than you can remain solvent
- Always use stop losses and proper position sizing
**Understanding the AI Component:**
The AI auto-selection feature uses a fixed mathematical formula to rank DOLs. It does not:
- Predict where price will go
- Learn from past performance
- Adapt to market conditions
- Guarantee any level of accuracy
The confidence score represents the mathematical strength of a liquidity cluster based on objective factors (cluster size, recency, timeframe alignment), NOT a probability of the trade succeeding.
**Risk Warning:**
Trading is risky. Most traders lose money. This indicator cannot change that fundamental reality. Use it as an educational tool to understand market structure, not as a trading signal or system.
Technical Requirements
- **Timeframe:** Best used on 1-hour charts (required for accurate daily level tracking)
- **Markets:** Works on any market (forex, crypto, stocks, futures, indices)
- **Updates:** Real-time calculation on each bar close
- **Resources:** Uses max 500 lines and 500 labels (TradingView limits)
Backtesting Features
The indicator includes "Backtest Mode" to keep historical charts clean:
- When enabled, only shows labels from recent bars
- Adjustable lookback period (10-500 bars)
- All lines remain visible
- Helps review past setups without clutter
To use:
1. Enable "Backtest Mode" in settings
2. Adjust "Labels Lookback" to desired period
3. Review historical price action
4. Disable for live trading
Credits and Methodology
This indicator implements concepts from:
- ICT (Inner Circle Trader) liquidity theory
- Smart Money Concepts (SMC)
- Order flow analysis
- Multi-timeframe analysis principles
The clustering algorithm, confidence scoring, and timeframe synthesis are original implementations designed to quantify and visualize these concepts.
Version History
**v1.0 - Initial Release**
- Multi-timeframe DOL detection
- Confidence scoring system
- Info box with liquidity metrics
- Backtest mode for clean charts
- Black/white professional theme
Support and Updates
For questions, feedback, or suggestions, please use the TradingView comments section. Updates and improvements will be released as needed based on user feedback and market evolution.
**Remember:** This is an educational tool. Successful trading requires knowledge, discipline, risk management, and continuous learning. Use this indicator to enhance your understanding of market structure and liquidity, not as a standalone trading system.
IMS 4H Structural Framework (MA / Pivot / MTF Levels)IMS 4H Structural Framework (MA / Pivot / MTF Levels)
✅ SHORT, COMPLIANT DESCRIPTION (Invite-Only Safe)
Description:
This tool visualizes a 4H Institutional Market Structure (IMS) framework by combining three workflow components into a single structural map—MA-based bias shifts, pivot-derived 4H trendlines, and multi-timeframe (1H/45m) structural levels.
It does not generate signals or performance claims.
The framework is designed purely for visual, discretionary analysis of structural flow, risk context, and higher-timeframe alignment.
Core Components:
• 4H Bias Shift (MA): Highlights directional bias transitions.
• 4H Trendlines (Pivot-Based): Shows structural slopes and reaction zones.
• MTF Levels (1H & 45m): Adds micro-structure inside the 4H box for refinement.
• Caution Zones: Marks potential reaction areas near support/resistance or trendlines.
• Dashboard: Displays bias context and educational guidance only.
Intended Use:
For traders who analyze 4H structural flow and wish to visualize bias, context, and multi-timeframe alignment—not for automation or signals.
________________________________________
✅ SHORT, SAFE DISCLAIMER (Invite-Only Approved)
Disclaimer:
This tool is for educational and informational purposes only.
It does not provide trading signals, financial advice, or performance guarantees.
All decisions remain solely with the user.
3 Band Volume matched Candles3 Band Volume matched Candles– is a clean, high-signal volume-based candle colouring system designed to highlight the extremes of market participation. Instead of using complex multi-band gradients, this simplified version focuses on what truly matters to scalpers and intraday traders:
🔵 Very Weak Volume (Exhaustion)
Shows when the market is running out of participation. These candles often appear near tops, stalled moves, fake breakouts, and areas where liquidity is drying up. Perfect for spotting potential reversals or rug-pull conditions.
⚪ Normal Volume (Baseline Flow)
Represents regular market activity. These neutral candles keep the chart clean and make the extremes stand out instantly.
🟥 Neon Hot-Red (High-Impact Volume)
Highlights moments of significant volume — intervention, aggression, absorption, stop hunts, or strong rejection wicks. These candles are critical for identifying real moves vs. fake ones, spotting wickbacks, and confirming momentum shifts.
Why This Tool Works
By focusing only on the very low and very high ends of market volume, the indicator cuts through noise and exposes the true behaviour behind each candle. Traders can instantly see:
When a move is losing strength
When a trend is topping or stalling
When big volume enters the market
When a wickback is driven by strong rejection
Whether a breakout is real or weak
When reversals are highly probable
This makes it ideal for scalpers, and anyone who trades fast-moving instruments
Customisation
Fully customisable weak/normal and normal/strong thresholds
User-defined colours for each band
Brightness control
Borders-only mode
Adjustable fill opacity
Optional corner legend for clarity
Golden Cross 50/200 EMATrend-following systems are characterized by having a low win rate, yet in the right circumstances (trending markets and higher timeframes) they can deliver returns that even surpass those of systems with a high win rate.
Below, I show you a simple bullish trend-following system with clear execution rules:
System Rules
-Long entries when the 50-period EMA crosses above the 200-period EMA.
-Stop Loss (SL) placed at the lowest low of the 15 candles prior to the entry candle.
-Take Profit (TP) triggered when the 50-period EMA crosses below the 200-period EMA.
Risk Management
-Initial capital: $10,000
-Position size: 10% of capital per trade
-Commissions: 0.1% per trade
Important Note:
In the code, the stop loss is defined using the swing low (15 candles), but the position size is not adjusted based on the distance to the stop loss. In other words, 10% of the equity is risked on each trade, but the actual loss on the trade is not controlled by a maximum fixed percentage of the account — it depends entirely on the stop loss level. This means the loss on a single trade could be significantly higher or lower than 10% of the account equity, depending on volatility.
Implementing leverage or reducing position size based on volatility is something I haven’t been able to include in the code, but it would dramatically improve the system’s performance. It would fix a consistent percentage loss per trade, preventing losses from fluctuating wildly with changes in volatility.
For example, we can maintain a fixed loss percentage when volatility is low by using the following formula:
Leverage = % of SL you’re willing to risk / % volatility from entry point to stop loss
And when volatility is high and would exceed the fixed percentage we want to expose per trade (if the SL is hit), we could reduce the position size accordingly.
Practical example:
Imagine we only want to risk 15% of the position value if the stop loss is triggered on Tesla (which has high volatility), but the distance to the SL represents a potential 23.57% drop. In this case, we subtract the desired risk (15%) from the actual volatility-based loss (23.57%):
23.57% − 15% = 8.57%
Now suppose we normally use $200 per trade.
To calculate 8.57% of $200:
200 × (8.57 / 100) = $17.14
Then subtract that amount from the original position size:
$200 − $17.14 = $182.86
In summary:
If we reduce the position size to $182.86 (instead of the usual $200), even if Tesla moves 23.57% against us and hits the stop loss, we would still only lose approximately 15% of the original $200 position — exactly the risk level we defined. This way, we strictly respect our risk management rules regardless of volatility swings.
I hope this clearly explains the importance of capping losses at a fixed percentage per trade. This keeps risk under control while maintaining a consistent percentage of capital invested per trade — preventing both statistical distortion of the system and the potential destruction of the account.
About the code:
Strategy declaration:
The strategy is named 'Golden Cross 50/200 EMA'.
overlay=true means it will be drawn directly on the price chart.
initial_capital=10000 sets the initial capital to $10,000.
default_qty_type=strategy.percent_of_equity and default_qty_value=10 means each trade uses 10% of available equity.
margin_long=0 indicates no margin is used for long positions (this is likely for simulation purposes only; in real trading, margin would be required).
commission_type=strategy.commission.percent and commission_value=0.1 sets a 0.1% commission per trade.
Indicators:
Calculates two EMAs: a 50-period EMA (ema50) and a 200-period EMA (ema200).
Crossover detection:
bullCross is triggered when the 50-period EMA crosses above the 200-period EMA (Golden Cross).
bearCross is triggered when the 50-period EMA crosses below the 200-period EMA (Death Cross).
Recent swing:
swingLow calculates the lowest low of the previous 15 periods.
Stop Loss:
entryStopLoss is a variable initialized as na (not available) and is updated to the current swingLow value whenever a bullCross occurs.
Entry and exit conditions:
Entry: When a bullCross occurs, the initial stop loss is set to the current swingLow and a long position is opened.
Exit on opposite signal: When a bearCross occurs, the long position is closed.
Exit on stop loss: If the price falls below entryStopLoss while a position is open, the position is closed.
Visualization:
Both EMAs are plotted (50-period in blue, 200-period in red).
Green triangles are plotted below the bar on a bullCross, and red triangles above the bar on a bearCross.
A horizontal orange line is drawn that shows the stop loss level whenever a position is open.
Alerts:
Alerts are created for:Long entry
Exit on bearish crossover (Death Cross)
Exit triggered by stop loss
Favorable Conditions:
Tesla (45-minute timeframe)
June 29, 2010 – November 17, 2025
Total net profit: $12,458.73 or +124.59%
Maximum drawdown: $1,210.40 or 8.29%
Total trades: 107
Winning trades: 27.10% (29/107)
Profit factor: 3.141
Tesla (1-hour timeframe)
June 29, 2010 – November 17, 2025
Total net profit: $7,681.83 or +76.82%
Maximum drawdown: $993.36 or 7.30%
Total trades: 75
Winning trades: 29.33% (22/75)
Profit factor: 3.157
Netflix (45-minute timeframe)
May 23, 2002 – November 17, 2025
Total net profit: $11,380.73 or +113.81%
Maximum drawdown: $699.45 or 5.98%
Total trades: 134
Winning trades: 36.57% (49/134)
Profit factor: 2.885
Netflix (1-hour timeframe)
May 23, 2002 – November 17, 2025
Total net profit: $11,689.05 or +116.89%
Maximum drawdown: $844.55 or 7.24%
Total trades: 107
Winning trades: 37.38% (40/107)
Profit factor: 2.915
Netflix (2-hour timeframe)
May 23, 2002 – November 17, 2025
Total net profit: $12,807.71 or +128.10%
Maximum drawdown: $866.52 or 6.03%
Total trades: 56
Winning trades: 41.07% (23/56)
Profit factor: 3.891
Meta (45-minute timeframe)
May 18, 2012 – November 17, 2025
Total net profit: $2,370.02 or +23.70%
Maximum drawdown: $365.27 or 3.50%
Total trades: 83
Winning trades: 31.33% (26/83)
Profit factor: 2.419
Apple (45-minute timeframe)
January 3, 2000 – November 17, 2025
Total net profit: $8,232.55 or +80.59%
Maximum drawdown: $581.11 or 3.16%
Total trades: 140
Winning trades: 34.29% (48/140)
Profit factor: 3.009
Apple (1-hour timeframe)
January 3, 2000 – November 17, 2025
Total net profit: $9,685.89 or +94.93%
Maximum drawdown: $374.69 or 2.26%
Total trades: 118
Winning trades: 35.59% (42/118)
Profit factor: 3.463
Apple (2-hour timeframe)
January 3, 2000 – November 17, 2025
Total net profit: $8,001.28 or +77.99%
Maximum drawdown: $755.84 or 7.56%
Total trades: 67
Winning trades: 41.79% (28/67)
Profit factor: 3.825
NVDA (15-minute timeframe)
January 3, 2000 – November 17, 2025
Total net profit: $11,828.56 or +118.29%
Maximum drawdown: $1,275.43 or 8.06%
Total trades: 466
Winning trades: 28.11% (131/466)
Profit factor: 2.033
NVDA (30-minute timeframe)
January 3, 2000 – November 17, 2025
Total net profit: $12,203.21 or +122.03%
Maximum drawdown: $1,661.86 or 10.35%
Total trades: 245
Winning trades: 28.98% (71/245)
Profit factor: 2.291
NVDA (45-minute timeframe)
January 3, 2000 – November 17, 2025
Total net profit: $16,793.48 or +167.93%
Maximum drawdown: $1,458.81 or 8.40%
Total trades: 172
Winning trades: 33.14% (57/172)
Profit factor: 2.927
7 EMA Cross StrategyKhanaal Traders.7 EMA Cross Strategy is a visual tool designed to display a structured group of seven Exponential Moving Averages (EMAs) and highlight moments when these averages form specific alignment conditions. The script supports two optional interpretation modes:
• A sequential alignment mode, where EMAs arrange themselves in order relative to one another.
• A multi-step pattern mode, where the chart price interacts with all EMAs while alignment is present.
The script includes adjustable periods for each EMA, customizable colors, and optional multi-timeframe filtering, allowing users to compare alignment conditions between a higher timeframe and the chart’s timeframe. It also provides optional markers that appear when alignment begins, when alignment is lost and regained, or when repetitive markers are allowed.
Additional features include:
• Individual EMA visibility toggles
• Background highlighting based on alignment conditions
• Optional retest-based marker behavior
• Optional alert conditions tied to alignment events
This tool is intended to help users observe EMA structure, visualize trend organization, and study how multiple EMAs behave together across different timeframes.
Major Crypto Relative Strength Portfolio System Majors RSPS - Relative Strength Portfolio System for Major Cryptocurrencies
Overview
Majors RSPS (Relative Strength Portfolio System) is an advanced portfolio allocation indicator that combines relative strength analysis, trend consensus, and macro risk factors to dynamically allocate capital across major cryptocurrency assets. The system leverages the NormalizedIndicators Library to evaluate both absolute trends and relative performance, creating an adaptive portfolio that automatically adjusts exposure based on market conditions.
This indicator is designed for portfolio managers, asset allocators, and systematic traders who want a data-driven approach to cryptocurrency portfolio construction with automatic rebalancing signals.
🎯 Core Concept
What is RSPS?
RSPS (Relative Strength Portfolio System) evaluates each asset on two key dimensions:
Relative Strength: How is the asset performing compared to other major cryptocurrencies?
Absolute Trend: Is the asset itself in a bullish trend?
Assets that show both strong relative performance AND positive absolute trends receive higher allocations. Weak performers are automatically filtered out, with capital reallocated to cash or stronger assets.
Dual-Layer Architecture
Layer 1: Majors Portfolio (Orange Zone)
Evaluates 14 major cryptocurrency assets
Calculates relative strength against all other majors
Applies trend filters to ensure absolute momentum
Dynamically allocates capital based on comparative strength
Layer 2: Cash/Risk Position (Navy Zone)
Evaluates macro risk factors and market conditions
Determines optimal cash allocation
Acts as a risk-off mechanism during adverse conditions
Provides downside protection through dynamic cash holdings
📊 Tracked Assets
Major Cryptocurrencies (14 Assets)
BTC - Bitcoin (Benchmark L1)
ETH - Ethereum (Smart Contract L1)
SOL - Solana (High-Performance L1)
SUI - Sui (Move-Based L1)
TRX - Tron (Payment-Focused L1)
BNB - Binance Coin (Exchange L1)
XRP - Ripple (Payment Network)
FTM - Fantom (DeFi L1)
CELO - Celo (Mobile-First L1)
TAO - Bittensor (AI Network)
HYPE - Hyperliquid (DeFi Exchange)
HBAR - Hedera (Enterprise L1)
ADA - Cardano (Research-Driven L1)
THETA - Theta (Video Network)
🔧 How It Works
Step 1: Relative Strength Calculation
For each asset, the system calculates relative strength by:
RSPS Score = Average of:
- Asset/BTC trend consensus
- Asset/ETH trend consensus
- Asset/SOL trend consensus
- Asset/SUI trend consensus
- ... (all 14 pairs)
- Asset's absolute trend consensus
Key Logic:
Each pair is evaluated using the eth_4d_cal() calibration from NormalizedIndicators
If an asset's absolute trend is extremely weak (≤ 0.1), it receives a penalty score (-0.5)
Otherwise, it gets the average of all its relative strength comparisons
Step 2: Trend Filtering
Assets must pass a trend filter to receive allocation:
Trend Score = Average of:
- Asset/BTC trend (filtered for positivity)
- Asset/ETH trend (filtered for positivity)
- Asset's absolute trend (filtered for positivity)
Only positive values contribute to the trend score, ensuring bearish assets don't receive allocation.
Step 3: Portfolio Allocation
Capital is allocated proportionally based on filtered RSPS scores:
Asset Allocation % = (Asset's Filtered RSPS Score / Sum of All Filtered Scores) × Main Portfolio %
Example:
SOL filtered score: 0.6
BTC filtered score: 0.4
All others: 0
Total: 1.0
SOL receives: (0.6 / 1.0) × Main% = 60% of main portfolio
BTC receives: (0.4 / 1.0) × Main% = 40% of main portfolio
Step 4: Cash/Risk Allocation
The system evaluates macro conditions across 6 factors:
Inverse Major Crypto Trends (40% weight)
When BTC, ETH, SOL, SUI, DOGE, etc. trend down → Cash allocation increases
Evaluates total market cap trends (TOTAL, TOTAL2, OTHERS)
Stablecoin Dominance (10% weight)
USDC dominance vs. major crypto dominances
Higher stablecoin dominance → Higher cash allocation
MVRV Ratios (10% weight)
BTC and ETH Market Value to Realized Value
High MVRV (overvaluation) → Higher cash allocation
BTC/ETH Ratio (15% weight)
Relative performance between two market leaders
Indicates market phase (BTC dominance vs. alt season)
Active Address Ratios (5% weight)
USDC active addresses vs. BTC/ETH active addresses
Network activity comparison
Macro Indicators (15% weight)
Global currency circulation (USD, EUR, CNY, JPY)
Treasury yield curve (10Y-2Y)
High yield spreads
Central bank balance sheets and money supply
Cash Allocation Formula:
Cash % = (Sum of Risk Factors × 0.5) / (Risk Factors + Majors TPI)
When risk factors are elevated, cash allocation increases, reducing exposure to volatile assets.
📈 Visual Components
Orange Zone (Majors Portfolio)
Fill: Light orange area showing aggregate portfolio strength
Line: Average trend power index (TPI) of allocated assets
Baseline: 0 level (neutral)
Interpretation:
Above 0: Bullish allocation environment
Rising: Strengthening portfolio momentum
Falling: Weakening portfolio momentum
Below 0: No allocation (100% cash)
Navy Zone (Cash Position)
Fill: Navy blue area showing cash allocation strength
Line: Risk-adjusted cash allocation signal
Baseline: 0 level
Interpretation:
Higher navy zone: Elevated risk-off signal → More cash
Lower navy zone: Risk-on environment → Less cash
Zero: No cash allocation (100% invested)
Performance Line (Orange/Blue)
Orange: Main portfolio allocation dominant (risk-on mode)
Blue: Cash allocation dominant (risk-off mode)
Tracks: Cumulative portfolio returns with dynamic rebalancing
Allocation Table (Bottom Left)
Shows real-time portfolio composition:
ColumnDescriptionAssetCryptocurrency nameRSPS ValuePercentage allocation (of main portfolio)CashDollar amount (if enabled)
Color Coding:
Orange: Active allocation
Gray: Weak signal (borderline)
Blue: Cash position
Missing: No allocation (filtered out)
⚙️ Settings & Configuration
Required Setup
Chart Symbol
MUST USE: INDEX:BTCUSD or similar major crypto index
Recommended Timeframe: 1D (Daily) or 4D (4-Day)
Why: System needs price data for all 14 majors, BTC provides stable reference
Hide Chart Candles
For clean visualization:
Right-click on chart
Select "Hide Symbol" or set candle opacity to 0
This allows the indicator fills and table to be clearly visible
User Inputs
plot_table (Default: true)
Enable/disable the allocation table
Set to false if you only want the visual zones
use_cash (Default: false)
Enable portfolio dollar value calculations
Shows actual dollar allocations per asset
cash (Default: 100)
Total portfolio size in dollars/currency units
Used when use_cash is enabled
Example: Set to 10000 for a $10,000 portfolio
💡 Interpretation Guide
Entry Signals
Strong Allocation Signal:
✓ Orange zone elevated (> 0.3)
✓ Navy zone low (< 0.2)
✓ Performance line orange
✓ Multiple assets in allocation table
→ Action: Deploy capital to allocated assets per table percentages
Risk-Off Signal:
✓ Orange zone near zero
✓ Navy zone elevated (> 0.4)
✓ Performance line blue
✓ Few or no assets in table (high cash %)
→ Action: Reduce exposure, increase cash holdings
Rebalancing Triggers
Monitor the allocation table for changes:
New assets appearing: Add to portfolio
Assets disappearing: Remove from portfolio
Percentage changes: Rebalance existing positions
Cash % changes: Adjust overall exposure
Market Regime Detection
Risk-On (Bull Market):
Orange zone high and rising
Navy zone minimal
Many assets allocated (8-12)
High individual allocations (15-30% each)
Risk-Off (Bear Market):
Orange zone near zero or negative
Navy zone elevated
Few assets allocated (0-3)
Cash allocation dominant (70-100%)
Transition Phase:
Both zones moderate
Medium number of assets (4-7)
Balanced cash/asset allocation (40-60%)
🎯 Trading Strategies
Strategy 1: Pure RSPS Following
1. Check allocation table daily
2. Rebalance portfolio to match percentages
3. Follow cash allocation strictly
4. Review weekly, act on significant changes (>5%)
Best For: Systematic portfolio managers, passive allocators
Strategy 2: Threshold-Based
Entry Rules:
- Orange zone > 0.4 AND Navy zone < 0.3
- At least 5 assets in allocation table
- Total non-cash allocation > 60%
Exit Rules:
- Orange zone < 0.1 OR Navy zone > 0.5
- Fewer than 3 assets allocated
- Cash allocation > 70%
Best For: Active traders wanting clear rules
Strategy 3: Relative Strength Overlay
1. Use RSPS for broad allocation framework
2. Within allocated assets, overweight top 3 performers
3. Scale position sizes by RSPS score
4. Use individual asset charts for entry/exit timing
Best For: Discretionary traders with portfolio focus
Strategy 4: Risk-Adjusted Position Sizing
For each allocated asset:
Position Size = Base Position × (Asset's RSPS Score / Max RSPS Score) × (1 - Cash Allocation)
Example:
- $10,000 portfolio
- SOL RSPS: 0.6 (highest)
- BTC RSPS: 0.4
- Cash allocation: 30%
SOL Size = $10,000 × (0.6/0.6) × (1-0.30) = $7,000
BTC Size = $10,000 × (0.4/0.6) × (1-0.30) = $4,667
Cash = $10,000 × 0.30 = $3,000
Best For: Risk-conscious allocators
📊 Advanced Usage
Multi-Timeframe Confirmation
Use on multiple timeframes for robust signals:
1D Chart: Tactical allocation (daily rebalancing)
4D Chart: Strategic allocation (weekly review)
Strong Confirmation:
- Both timeframes show same top 3 assets
- Both show similar cash allocation levels
- Orange zones aligned on both
Weak/Conflicting:
- Different top performers
- Diverging cash allocations
→ Wait for alignment or use shorter timeframe
Sector Rotation Analysis
Group assets by type and watch rotation:
L1 Dominance: BTC, ETH, SOL, SUI, ADA high → Layer 1 season
Alt L1s: TRX, FTM, CELO rising → Alternative platform season
Specialized: TAO, THETA, HYPE strong → Niche narrative season
Payment/Stable: XRP, BNB allocation → Risk reduction phase
Divergence Trading
Bullish Divergence:
Navy zone declining (less risk-off)
Orange zone flat or slightly rising
Few assets still allocated but strengthening
→ Early accumulation signal
Bearish Divergence:
Orange zone declining
Navy zone rising
Asset count decreasing in table
→ Distribution/exit signal
Performance Tracking
The performance line (overlay) shows cumulative strategy returns:
Compare to BTC/ETH: Is RSPS outperforming?
Drawdown analysis: How deep are pullbacks?
Correlation: Does it track market or provide diversification?
🔬 Technical Details
Data Sources
Price Data:
COINEX: Primary exchange for alt data
CRYPTO: Alternative price feeds
INDEX: Aggregated index prices (recommended for BTC)
Macro Data:
Dominance metrics (SUI.D, BTC.D, etc.)
MVRV ratios (on-chain valuation)
Active addresses (network activity)
Global money supply and macro indicators
Calculation Methodology
RSPS Scoring:
For each asset, calculate 14 relative trends (vs. all others)
Calculate asset's absolute trend
Average all 15 values
Apply penalty filter for extremely weak trends (≤ 0.1)
Trend Consensus:
Uses eth_4d_cal() from NormalizedIndicators library
Combines 8 normalized indicators per measurement
Returns value from -1 (bearish) to +1 (bullish)
Performance Calculation:
Daily Return = Σ(Asset ROC × Asset Allocation)
Cumulative Performance = Previous Perf × (1 + Daily Return / 100)
Assumes perfect rebalancing and no slippage (theoretical performance).
Filtering Logic
filter() function:
pinescriptfilter(input) => input >= 0 ? input : 0
This zero-floor filter ensures:
Only positive trend values contribute to allocation
Bearish assets receive 0 weight
No short positions or inverse allocations
Anti-Manipulation Safeguards
Null Handling:
All values wrapped in nz() to handle missing data
Prevents calculation errors from data gaps
Normalization:
Allocations always sum to 100%
Prevents over/under-allocation
Conditional Logic:
Assets need positive values on multiple metrics
Single metric cannot drive allocation alone
⚠️ Important Considerations
Required Timeframes
1D (Daily): Recommended for most users
4D (4-Day): More stable, fewer rebalances
Other timeframes: Use at your own discretion, may require recalibration
Data Requirements
Needs INDEX:BTCUSD or equivalent major crypto symbol
All 14 tracked assets must have available data
Macro indicators require specific TradingView data feeds
Rebalancing Frequency
System provides daily allocation updates
Practical rebalancing: Weekly or on significant changes (>10%)
Consider transaction costs and tax implications
Performance Notes
Theoretical returns: No slippage, fees, or execution delays
Backtest carefully: Validate on your specific market conditions
Past performance: Does not guarantee future results
Risk Warnings
⚠️ High Concentration Risk: May allocate heavily to 1-3 assets
⚠️ Volatility: Crypto markets are inherently volatile
⚠️ Liquidity: Some allocated assets may have lower liquidity
⚠️ Correlation: All assets correlated to BTC/ETH to some degree
⚠️ System Risk: Relies on continued availability of data feeds
Not Financial Advice
This indicator is a tool for analysis and research. It does not constitute:
Investment advice
Portfolio management services
Trading recommendations
Guaranteed returns
Always perform your own due diligence and risk assessment.
🎓 Use Cases
For Portfolio Managers
Systematic allocation framework
Objective rebalancing signals
Risk-adjusted exposure management
Performance tracking vs. benchmarks
For Active Traders
Identify strongest assets to focus trading on
Gauge overall market regime (risk-on/off)
Time entry/exit for portfolio shifts
Complement technical analysis with allocation data
For Institutional Allocators
Quantitative portfolio construction
Multi-asset exposure optimization
Drawdown management through cash allocation
Compliance-friendly systematic approach
For Researchers
Study relative strength dynamics in crypto markets
Analyze correlation between majors
Test macro factor impact on crypto allocations
Develop derived strategies and signals
🔧 Setup Checklist
✅ Chart Configuration
Set chart to INDEX:BTCUSD
Set timeframe to 1D or 4D
Hide chart candles for clean visualization
Add indicator from library
✅ Indicator Settings
Enable plot_table (see allocation table)
Set use_cash if tracking dollar amounts
Input your portfolio size in cash parameter
✅ Monitoring Setup
Bookmark chart for daily review
Set alerts for major allocation changes (optional)
Create spreadsheet to track allocations (optional)
Establish rebalancing schedule (weekly recommended)
✅ Validation
Verify all 14 assets appear in table (when allocated)
Check that percentages sum to ~100%
Confirm performance line is tracking
Test cash allocation calculation if enabled
📋 Quick Reference
Signal Interpretation
ConditionOrange ZoneNavy ZoneActionStrong BullHigh (>0.4)Low (<0.2)Full allocationModerate BullMid (0.2-0.4)Low-MidStandard allocationNeutralLow (0.1-0.2)Mid (0.3-0.4)Balanced allocationModerate BearVery Low (<0.1)Mid-HighReduce exposureStrong BearZero/NegativeHigh (>0.5)High cash/exit
Rebalancing Thresholds
Change TypeThresholdActionIndividual asset±5%Consider rebalanceIndividual asset±10%Strongly rebalanceCash allocation±10%Adjust exposureAsset entry/exitAnyAdd/remove position
Color Legend
Orange: Main portfolio strength/allocation
Navy: Cash/risk-off allocation
Blue text: Cash position in table
Orange text: Active asset allocation
Gray text: Weak/borderline allocation
White: Headers and labels
🚀 Getting Started
Beginner Path
Add indicator to INDEX:BTCUSD daily chart
Hide candles for clarity
Enable plot_table to see allocations
Check table daily, note top 3-5 assets
Start with small allocation, observe behavior
Gradually increase allocation as you gain confidence
Intermediate Path
Set up on both 1D and 4D charts
Enable use_cash with your portfolio size
Create tracking spreadsheet
Implement weekly rebalancing schedule
Monitor divergences between timeframes
Compare performance to buy-and-hold BTC
Advanced Path
Modify code to add/remove tracked assets
Adjust relative strength calculation methodology
Customize cash allocation factors and weights
Integrate with portfolio management platform
Develop algorithmic rebalancing system
Create alerts for specific allocation conditions
📖 Additional Resources
Related Indicators
NormalizedIndicators Library: Core calculation engine
Individual asset trend indicators for deeper analysis
Macro indicator dashboards for cash allocation factors
Complementary Analysis
On-chain metrics (MVRV, active addresses, etc.)
Order book liquidity for execution planning
Correlation matrices for diversification analysis
Volatility indicators for position sizing
Learning Materials
Study relative strength portfolio theory
Research tactical asset allocation strategies
Understand crypto market cycles and phases
Learn about risk management in volatile assets
🎯 Key Takeaways
✅ Systematic allocation across 14 major cryptocurrencies
✅ Dual-layer approach: Asset selection + Cash management
✅ Relative strength focused: Invests in comparatively strong assets
✅ Trend filtering: Only allocates to assets in positive trends
✅ Dynamic rebalancing: Automatically adjusts to market conditions
✅ Risk-managed: Increases cash during adverse conditions
✅ Transparent methodology: Clear calculation logic
✅ Practical visualization: Easy-to-read table and zones
✅ Performance tracking: See cumulative strategy returns
✅ Highly customizable: Adjust assets, weights, and factors
📋 License
This code is subject to the Mozilla Public License 2.0 at mozilla.org
Majors RSPS transforms complex multi-asset portfolio management into a systematic, data-driven process. By combining relative strength analysis with trend consensus and macro risk factors, it provides traders and portfolio managers with a robust framework for navigating cryptocurrency markets with discipline and objectivity.WiederholenClaude kann Fehler machen. Bitte überprüfen Sie die Antworten. Sonnet 4.5
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
HYBRIX v29 – Adaptive Trader Core🧩 Overview
HYBRIX v28 — Adaptive Trader Core represents the new generation of adaptive trading frameworks built on a self‑adjusting learning model that continuously analyzes price behavior and dynamically tunes its internal weighting system to align with market shifts.
Rather than producing fixed buy/sell signals, HYBRIX acts as a decision‑support tool, revealing the real‑time balance of trend, momentum, and volume forces.
Its goal is structural clarity — providing professional traders with a precise, modular analytical core that learns from current conditions instead of static settings.
This version targets users who prefer analytical depth and transparency — where logic, not emotion, drives execution.
⚙️ Core Modules
🧩 Hybrid Weight Engine – Automatically adjusts trend/momentum/volume influence based on volatility and strength shifts.
🧠 Adaptive Learning Module – Re‑evaluates recent model output to refine the next cycle’s parameters.
🌐 MTF Fusion System – Blends multiple timeframes into a consistent, unified directional layer.
📊 Regime Detector – Identifies market phases (Trend / Range) and adapts sensitivity dynamically.
💾 Memory Tracker HUD – Displays model performance on‑chart for quick diagnostic visualization.
🎛 Operating Modes
Mode Description
Auto Mode Default mode — automatic, dynamic weight balancing in real time.
Adaptive Mode Enables short‑term model re‑learning; refines internal parameters using recent pattern data.
Manual Mode Full user‑control mode; useful for testing or applying custom weights.
⚠️ Note: Modes Active Auto‑Weight and Active Self‑Eval Signals cannot be enabled simultaneously.
Activating both at once will automatically switch the system to Manual Mode.
⏱ Execution Range
Optimized for 1‑minute to 1‑day timeframes — suitable for scalping, day‑trading, and swing‑trading.
Pattern analysis runs simultaneously across multiple timeframes, updating continuously with each new candle.
Recent candlestick structures are also evaluated to confirm potential entries or exits.
💡 User Tips
Use Heikin Ashi candles for smoother and more stable signal flow.
For a cleaner chart, disable the following under Style:
• Labels on price scale
• Values in status line
• Inputs in status line
The best entry points typically occur when both signal directions align strongly.
Review historical charts to understand HYBRIX behavior across different volatility regimes.
There are no market limitations — works equally across Forex, Crypto, Indices and Commodities.
Customize signal icons, colors and HUD appearance to match your personal layout.
The Active MTF Trend Fusion module available in Settings preserves HYBRIX’s core philosophy: “Move with the Market.”
Market session impact can be toggled on/off to highlight adaptive shifts during major trading hours.
⚠️ Disclaimer
This indicator is a technical‑support tool, not a signal generator.
HYBRIX uses dynamic and adaptive statistical models to interpret market logic, yet all markets remain inherently unpredictable.
Final trading decisions always rest with the user — the developer assumes no responsibility for any profit or loss.
Use HYBRIX to enhance your analytical logic and structure your view of price flow — not to replace your strategy or experience.
🧭 Tagline
“HYBRIX v28 — An Adaptive Core that Flows with the Market.”
💬 Feedback & Development
User feedback is essential to the continued evolution of HYBRIX.
If you observe specific chart behavior, divergence, or improvement ideas, share them with the development team —
your insights directly shape future HYBRIX versions.
-------------
📩 Invite Request
For access or collaboration requests, please send a direct message to my X account:
👉 @M_S_Nazari
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.
WAVELAB MACDWAVELAB MACD
Overview
WAVELAB MACD is a dynamic technical tool designed to analyze MACD histogram behavior for identifying potential momentum inflection points and structural shifts in price action.
Core Logic
Tracks histogram momentum peaks and valleys to detect changes in acceleration.
Compares recent price and histogram behavior to reveal both classical and hidden divergence structures.
Applies optional trend validation filters using long-term exponential moving averages (EMA) and trend strength evaluation via ADX dynamics.
Features
MACD histogram pivot recognition
Regular and hidden momentum divergence logic
Optional EMA-based directional trend filter
Optional ADX-based trend strength filter
Signal grading system to contextualize the conditions (e.g., strong trend confirmation vs. weaker context)
Use Case
This indicator can support deeper technical analysis by highlighting moments where underlying momentum conditions shift, especially when aligned with trend confirmation filters.
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.






















