Strategy Chameleon [theUltimator5]Have you ever looked at an indicator and wondered to yourself "Is this indicator actually profitable?" Well now you can test it out for yourself with the Strategy Chameleon!
Strategy Chameleon is a versatile, signal-agnostic trading strategy designed to adapt to any external indicator or trading system. Like a chameleon changes colors to match its environment, this strategy adapts to match any buy/sell signals you provide, making it the ultimate backtesting and automation tool for traders who want to test multiple strategies without rewriting code.
🎯 Key Features
1) Connects ANY external indicator's buy/sell signals
Works with RSI, MACD, moving averages, custom indicators, or any Pine Script output
Simply connect your indicator's signal output to the strategy inputs
2) Multiple Stop Loss Types:
Percentage-based stops
ATR (Average True Range) dynamic stops
Fixed point stops
3) Advanced Trailing Stop System:
Percentage trailing
ATR-based trailing
Fixed point trailing
4) Flexible Take Profit Options:
Risk:Reward ratio targeting
Percentage-based profits
ATR-based profits
Fixed point profits
5) Trading Direction Control
Long Only - Bull market strategies
Short Only - Bear market strategies
Both - Full market strategies
6) Time-Based Filtering
Optional trading session restrictions
Customize active trading hours
Perfect for day trading strategies
📈 How It Works
Signal Detection: The strategy monitors your connected buy/sell signals
Entry Logic: Executes trades when signals trigger during valid time periods
Risk Management: Automatically applies your chosen stop loss and take profit levels
Trailing System: Dynamically adjusts stops to lock in profits
Performance Tracking: Real-time statistics table showing win rate and performance
⚙️ Setup Instructions
0) Add indicator you want to test, then add the Strategy to your chart
Connect Your Signals:
imgur.com
Go to strategy settings → Signal Sources
1) Set "Buy Signal Source" to your indicator's buy output
2) Set "Sell Signal Source" to your indicator's sell output
3) Choose table position - This simply changes the table location on the screen
4) Set trading direction preference - Buy only? Sell only? Both directions?
imgur.com
5) Set your preferred stop loss type and level
You can set the stop loss to be either percentage based or ATR and fully configurable.
6) Enable trailing stops if desired
imgur.com
7) Configure take profit settings
8) Toggle time filter to only consider specific time windows or trading sessions.
🚀 Use Cases
Test various indicators to determine feasibility and/or profitability.
Compare different signal sources quickly
Validate trading ideas with consistent risk management
Portfolio Management
Apply uniform risk management across different strategies
Standardize stop loss and take profit rules
Monitor performance consistently
Automation Ready
Built-in alert conditions for automated trading
Compatible with trading bots and webhooks
Easy integration with external systems
⚠️ Important Notes
This strategy requires external signals to function
Default settings use 10% of equity per trade
Pyramiding is disabled (one position at a time)
Strategy calculates on bar close, not every tick
🔗 Integration Examples
Works perfectly with:
RSI strategies (connect RSI > 70 for sells, RSI < 30 for buys)
Moving average crossovers
MACD signal line crosses
Bollinger Band strategies
Custom oscillators and indicators
Multi-timeframe strategies
📋 Default Settings
Position Size: 10% of equity
Stop Loss: 2% percentage-based
Trailing Stop: 1.5% percentage-based (enabled)
Take Profit: Disabled (optional)
Trade Direction: Both long and short
Time Filter: Disabled
Cari dalam skrip untuk "国泰黄金ETF联接C跟踪指数市盈率、跟踪指数市盈率百分位、指数估值水平"
Trap Detector Signals [Tweaked Version]This script highlights potential institutional liquidity traps by detecting price extensions relative to VWAP during periods of short-term volatility compression — using manual VIX9D input as a proxy for complacency.
Dominant Volume DeltaThis indicator displays the volume delta (difference between buying and selling volume) for the dominant side only. If buyers dominate, a teal bar shows the strength of buying. If sellers dominate, a red bar shows the strength of selling. All values are positive and scaled to highlight aggressive pressure. Useful for spotting real-time market imbalances.
HA + HMA + VWAP🔍 Script Overview
This indicator blends Heikin-Ashi smoothing, Hull Moving Average (HMA), and Volume Weighted Average Price (VWAP) to help traders identify trend direction and potential trade setups. The script provides buy/sell signals based on price action relative to HMA while anchoring the view to volume with VWAP.
📈 What It Does and How
- Heikin-Ashi Calculations: Reduces noise by averaging candle structure, revealing clearer trend direction.
- Hull Moving Average (HMA): A fast, smooth-moving average applied to Heikin-Ashi close prices, tuned to respond quickly to shifts in momentum.
- VWAP Line: Acts as a dynamic fair-value reference, balancing price against volume over time.
- Signal Logic: Generates visual Buy/Sell signals when the Heikin-Ashi close crosses the HMA.
🧠 Recommended Enhancements Using RSI + ATR
For more refined entries and exits, use this indicator alongside Relative Strength Index (RSI) and Average True Range (ATR):
- RSI for Momentum Confirmation: Ensure the buy signals align with upward momentum—RSI climbing from oversold zones adds conviction.
- ATR for Volatility Awareness: Use ATR to size stops and evaluate risk. Avoid trades during volatility spikes or when ATR exceeds typical thresholds.
- Three-Leg Alignment: When HA/HMA signal agrees with RSI momentum and ATR shows stable conditions, you get high-quality trade setups with better timing and risk control.
This fusion helps discretionary traders filter noise and make confident decisions rooted in price action, volume, momentum, and volatility.
⚙️ Chart Display
- HMA: red line
- VWAP: gray line
- Buy/Sell labels: green below bars for buys, red above bars for sells
- Clean layout optimized for visual clarity
This script is open-source and does not use future data or issue caution warnings. It’s designed to assist manual trading strategies, not provide automated trading decisions.
10/20 MA Coil: Progressive Colors & Multi-Day BreakoutThis indicator detects price “coil” setups and highlights potential breakout or breakdown opportunities using moving average alignment and volatility compression.
Features:
• Coil Detection:
• Identifies consolidation when:
• The 10 and 20 MAs are tightly aligned (within user-defined tolerance)
• Price is above both MAs and within 1.5x ADR of them
• The 50 MA is rising
• Progressive Coil Coloring:
• Coil candles are colored in progressively darker orange as the streak continues
• Bullish Breakout Signal:
• Triggers when a green candle follows a coiled bar
• The candle’s body must be greater than or equal to 1 ATR
• Colored lime green
• Bearish Breakdown Signal:
• Triggers when a red candle follows a coiled bar
• The candle’s body must be greater than or equal to 1 ATR to the downside
• Colored black
• Custom Candle Rendering:
• Candle body color represents coil or breakout state
• Wick and border are red or green to reflect price direction
• Optional Debug Tools:
• Coil streak, ATR, and distance from MAs can be plotted for deeper analysis
This script is designed for traders looking to spot price compression and prepare for high-probability moves following low-volatility setups.
ATR Trailing Stop with ATR Targets [v6]What the Indicator Does
This custom TradingView indicator is designed for active traders who want to automate and visualize their trailing stop management and target setting, using true market volatility. It combines the Average True Range (ATR) with dynamic market structure logic to:
Trail a stop-loss behind major swings in real time, using 2×ATR (adjustable) from the highest high in uptrends or the lowest low in downtrends.
Flip trading bias between bullish and bearish when the stop is breached.
Identify and plot three profit targets (at 1, 2, and 3 ATR from the breakout/flip point) after every stop-flip, helping traders scale out or set take-profits objectively.
Maintain a visible presence on your chart every bar to avoid indicator errors, with color and labeling for clear distinction between long/short phases.
How the Indicator Works
1. ATR Calculation
ATR Period and Multiplier: You select your preferred ATR length (default is 14 bars) and a multiplier (default is 2.0).
Volatility Adjustment: ATR measures the average "true" bar range, so the trailing stop and targets adapt to current volatility.
2. Trailing Stop Logic
Uptrend (bullish bias): The indicator tracks the highest high made since the last bearish-to-bullish flip and sets the stop at - .
The stop only raises (never lowers) during an uptrend, protecting gains in strong moves.
Downtrend (bearish bias): Tracks the lowest low made since the last bullish-to-bearish flip, with stop at + .
The stop only lowers (never raises) in a downtrend.
Flip Point: If price closes through the trailing stop, the current bias “flips,” and the logic reverses (bullish to bearish or vice versa). At the new close, flip price and bar index are stored for target calculation.
3. ATR Targets after Flip
After each stop flip:
Three targets—based on the new close price—are calculated and plotted:
Long flip (new bull bias): Target1 = close + 1×ATR, Target2 = close + 2×ATR, Target3 = close + 3×ATR.
Short flip (new bear bias): Target1 = close - 1×ATR, Target2 = close - 2×ATR, Target3 = close - 3×ATR.
These targets help with scaling out, partial profit-taking, or setting automated orders.
4. Visual Feedback
Trailing stop line: Green for long bias, red for short bias.
Targets: Distinct color-coded circles at 1, 2, 3 ATR levels from the most recent flip.
Flip Labels: Mark the bar and price where bias flipped (“Long Flip” or “Short Flip”) for quick pattern recognition.
Subtle background shading: Ensures TradingView's requirement for “indicator output every bar.”
How to Use This Indicator
Parameter Setup
ATR Period and Multiplier: Adjust to match the timeframe and volatility of your instrument.
Lower periods/multipliers for short-term/volatile trading.
Higher values for smoother signals or higher timeframes.
Starting Trend: Set to match the expected initial bias if the instrument has strong trend characteristics.
Trading Application
1. Daily Bias Approach
Establish your bias in line with your trading plan (e.g., only trade long if price is above the previous day's high, short below the previous day's low).
Only look for trades in the indicator's current bias direction, as expressed by the stop and background color.
2. Entry
Use the indicator as a real-time confirmation or trailing stop for your entries.
Breakout: Enter when price establishes the current bias, using the trailing stop as your risk level.
Reversal: Wait for a bias flip after an extended move; enter in the direction of the new bias.
VWAP Rebound: Combine with a VWAP bounce—enter only if the indicator bias supports your direction.
3. Exits/Targets
Trailing stop management: Move your stop according to the plotted line; exit if your stop is hit.
Profit-taking: Scale out or take profits as price approaches each ATR-based target.
Use the dynamic labeling to identify reversal flips and reset your plan if stopped or the bias changes.
4. Market Context
Filter and frame setups by watching correlated indicators (DXY, VIX, AUDJPY, put/call ratio) and upcoming news; trade only in the daily bias direction for best consistency.
5. Practical Tips
Combine this indicator with your custom watchlist and alert settings to get notified on flips or targets.
Review the last label ("Long Flip"/"Short Flip") and targets to plan partial exits.
Remember: ATR adapts to volatility, so the stop and targets stay proportionate even when price action shifts.
EMA Curl Strength+EMA Curl Strength+
Description:
This indicator provides a statistically normalized view of EMA slope momentum using Z-score transformation. By evaluating the rate of change of an EMA and comparing it against its historical behavior, the script highlights momentum shifts in a dynamic, adaptive way.
⸻
How It Works:
• Calculates the slope (percentage change) of a chosen EMA.
• Normalizes the slope using Z-score over a custom lookback period.
• Smooths the resulting signal and computes two signal lines for comparison.
• Assigns dynamic colors based on user-defined Z-score thresholds for mild, moderate, and strong momentum in both directions.
⸻
Visual Features:
• Gradient fill between the Z Curl Line and Signal 1 to highlight slope acceleration.
• Histogram showing the difference between the Z Curl Line and its signal.
• Optional signal crossover shapes between configurable pairs (e.g., Z Curl vs. Signal).
• Background highlights when the Z Curl Line exceeds ±2, indicating strong trending behavior.
⸻
Customization:
• Adjustable EMA length, smoothing lengths, signal lengths, histogram smoothing, and Z-score lookback.
• Separate color controls for:
• Z-score strength bands (mild/moderate/strong up/down)
• Histogram bars
• Signal lines
• Background highlight zones
• Crossover shapes
⸻
Use Cases:
• Momentum Confirmation: Confirm strength when Z Curl exceeds ±2 with matching background highlights.
• Trend Entry Timing: Look for trades when Z Curl crosses above or below the 0-line.
• Scalping: Capture quick directional moves when momentum accelerates.
• Trend Following: Use strong Z Curl values to confirm trade direction and filter sideways action.
• Divergence Detection: Spot divergences between price and Z Curl movement to anticipate reversals.
NFP RangesPlots the NFP daily ranges for NFP days. Includes extended hours ranges when the time frame is sub 1D, otherwise, only the daily range is taken.
NFP Dates are pre-populated through 2029 and historically through 2022. Will update script to include farther-out dates before they become necessary.
Weekly EMA 9/20/50Weekly EMA for 9, 20 and 50 weeks for any security.
This will show the trends that are otherwise not visible on the daily chart.
StockMarketWolf 9/20 EMA VWAP MACD StrategyThis strategy is all about catching momentum in the market by combining some of the most trusted technical indicators—moving averages, VWAP, and MACD—to help you spot better trade opportunities with more confidence.
Here’s the simple idea:
Use the 9 and 20 EMA crossover to spot when the short-term trend is turning up or down.
Check that the price is trading above or below the VWAP (the average price weighted by volume for the day) to confirm the overall market sentiment.
Use the MACD to make sure momentum is supporting your trade—no point jumping in if momentum isn’t backing it up.
How it works:
Go long when the 9 EMA crosses above the 20 EMA, price is above VWAP, and MACD is signaling positive momentum.
Go short when the 9 EMA crosses below the 20 EMA, price is below VWAP, and MACD shows bearish momentum.
Exit the trade when these signals flip or momentum fades.
Why it’s useful:
It helps you avoid trading against the trend by using the VWAP filter.
The MACD momentum check cuts down on fake breakouts.
It’s straightforward and works well on popular day trading charts like the 5-minute timeframe.
Great for high-volume stocks and futures like SPY, QQQ, or ES futures.
Things to keep in mind:
It doesn’t throw out signals all day — you get quality over quantity.
Like any strategy, it’s not perfect and can struggle during sideways markets.
Sticking to the rules and having patience is key.
All in all, this is a solid, no-nonsense strategy that mixes trend and momentum in a way that makes trading feel a bit more clear and less noisy. Perfect if you want a systematic approach without overcomplicating things.
MTF Confirmation v2Multi-Timeframe Direction Confirmation Indicator
📊 Overview
This Pine Script indicator provides high-probability buy and sell signals by confirming that both 1-minute and 5-minute timeframes are moving in the same direction. It eliminates false signals by requiring multiple timeframe agreement before generating alerts.
🎯 How It Works
Trend Detection Method:
EMA Analysis: Uses 20-period Exponential Moving Average to determine trend direction
RSI Confirmation: 14-period RSI validates momentum (>50 bullish, <50 bearish)
Price Action: Confirms price is above/below EMA in trend direction
EMA Slope: Ensures EMA is actually rising (bullish) or falling (bearish)
Signal Generation:
BUY Signal: Only when BOTH 1M and 5M timeframes are bullish simultaneously
SELL Signal: Only when BOTH 1M and 5M timeframes are bearish simultaneously
Cooldown System: Prevents signal spam with 5-bar minimum between signals
📈 Visual Elements
Primary Signals:
Green "BUY" Labels: Appear below candles when both timeframes align bullish
Red "SELL" Labels: Appear above candles when both timeframes align bearish
Background Colors:
Light Green: Both timeframes trending up
Light Red: Both timeframes trending down
No Color: Timeframes not aligned or neutral
Trend Indicators:
Blue Dots: Show 1-minute timeframe trend direction
Orange Dots: Show 5-minute timeframe trend direction
Question Marks: Partial alignment (one timeframe trending, preparing for signal)
Status Table (Top Right):
Timeframe Status: Real-time direction of each timeframe
Alignment Status: Shows when timeframes are synchronized
Signal Status: Current signal state and cooldown timers
Cooldown Counters: Bars remaining until next signal available
⚙️ Customizable Settings
Technical Parameters:
EMA Period: Default 20 (trend smoothness)
RSI Period: Default 14 (momentum sensitivity)
Signal Cooldown: Default 5 bars (prevents overtrading)
Filter Options:
Volume Filter: Optional above-average volume requirement
Alerts Toggle: Enable/disable notifications
Table Display: Show/hide status information
🚨 Alert System
Instant Notifications: Alerts fire when both timeframes align
Price Information: Includes current price in alert message
Once Per Bar: Prevents alert spam during volatile periods
Clear Messages: "BUY SIGNAL: 1M and 5M both BULLISH" format
💡 Best Use Cases
Ideal For:
Scalping: Quick entries with multi-timeframe confirmation
Day Trading: Reliable intraday signals
Trend Following: Catching strong directional moves
Risk Management: Avoiding false breakouts
Timeframe Recommendations:
Works on any chart timeframe
Most effective on 1M, 5M, or 15M charts
Provides earlier signals than single-timeframe indicators
⚡ Key Advantages
Reduced False Signals:
Requires agreement between multiple timeframes
Filters out noise and whipsaws
Cooldown prevents overtrading
Clear Decision Making:
Simple buy/sell signals
Visual confirmation through colors and table
No complex interpretation required
Comprehensive Information:
Real-time status of all timeframes
Setup warnings with question marks
Countdown to next available signal
📋 Setup Instructions
Copy the Pine Script code
Open TradingView Pine Editor
Paste code and save
Add to chart
Configure settings to preference
Set up alerts for desired signals
🎪 Expected Performance
Signal Frequency: 3-8 signals per trading day (depending on volatility)
Quality Focus: Fewer but higher-probability setups
Win Rate: Improved due to multi-timeframe confirmation
Suitable for: Both automated and manual trading strategies
BuySell Volume Bar Chart• Separates estimated Buy and Sell volume per bar using price action logic
• Plots them in a dual-axis format: buy volume goes up, sell volume goes down
• Colors are dynamic — whichever side dominates gets the stronger color, the weaker side is shaded
• Includes a live difference metric (Δ Volume) as a third value in the indicator title
• Automatically filters out flat/no-move bars to avoid misleading spikes
The live difference metric ("Δ Volume") can be controlled.
This metric calculates the difference between the buying and selling volume live, where it takes the Buy Volume - Sell Volume.
This difference is then displayed in either green (BV > SV) or red (SV > BV). You can toggle it on/off by entering the indicator's settings or double tapping the indicator name on the TV chart.
Another pretty cool thing is the modular colors - you can customize your candle colors and shades to your liking within the code!
Monthly Seasonality Trend [DunesIsland]The Monthly Seasonality Trend is a indicator designed to analyze and visualize historical monthly seasonality patterns in financial markets. By calculating the average monthly return over a user-configurable lookback period (1 to 10 years), this indicator provides traders and investors with a clear projection of potential price movements for the current month, enabling data-driven decision-making.
How It Works
The indicator operates by retrieving monthly open and close prices for the specified lookback period (up to 10 years) and computing the average percentage return for the current month based on historical data. Key functionalities include:
Dynamic Trend Line: On the first trading day of each month, the indicator plots a line projecting the expected price trajectory, starting from the current close price and extending to the estimated end-of-month price based on the average historical return. The line is colored green for anticipated price increases or red for expected declines, offering an intuitive visual cue.
Average Return Label: A label is displayed at the start of each month, detailing the calculated average historical return for that month, expressed as a percentage, to provide context for the projected trend.
First Trading Day Marker: A small circle is plotted below the bar on the first trading day of each month, clearly marking the start of the projection period.
Adaptive Bar Counting: The indicator dynamically adjusts the length of the trend line based on the actual number of trading days in the previous month, ensuring accurate projections.
How to Interpret
Bullish Projection (Green Line): Indicates that historical data suggests an average price increase for the current month, potentially signaling buying opportunities.
Bearish Projection (Red Line): Suggests an average price decline based on historical trends, which may prompt caution or short-selling strategies.
Historical Context: The average return label provides a quantitative measure of past performance, helping traders assess the reliability of the projected trend.
Divergence Strategy [Trendoscope®]🎲 Overview
The Divergence Strategy is a sophisticated TradingView strategy that enhances the Divergence Screener by adding automated trade signal generation, risk management, and trade visualization. It leverages the screener’s robust divergence detection to identify bullish, bearish, regular, and hidden divergences, then executes trades with precise entry, stop-loss, and take-profit levels. Designed for traders seeking automated trading solutions, this strategy offers customizable trade parameters and visual feedback to optimize performance across various markets and timeframes.
For core divergence detection features, including oscillator options, trend detection methods, zigzag pivot analysis, and visualization, refer to the Divergence Screener documentation. This description focuses on the strategy-specific enhancements for automated trading and risk management.
🎲 Strategy Features
🎯Automated Trade Signal Generation
Trade Direction Control : Restrict trades to long-only or short-only to align with market bias or strategy goals, preventing conflicting orders.
Divergence Type Selection : Choose to trade regular divergences (bullish/bearish), hidden divergences, or both, targeting reversals or trend continuations.
Entry Type Options :
Cautious : Enters conservatively at pivot points and exits quickly to minimize risk exposure.
Confident : Enters aggressively at the latest price and holds longer to capture larger moves.
Mixed : Combines conservative entries with delayed exits for a balanced approach.
Market vs. Stop Orders: Opt for market orders for instant execution or stop orders for precise price entry.
🎯 Enhanced Risk Management
Risk/Reward Ratio : Define a risk-reward ratio (default: 2.0) to set profit targets relative to stop-loss levels, ensuring consistent trade sizing.
Bracket Orders : Trades include entry, stop-loss, and take-profit levels calculated from divergence pivot points, tailored to the entry type and risk-reward settings.
Stop-Loss Placement : Stops are strategically set (e.g., at recent pivot or last price point) based on entry type, balancing risk and trade validity.
Order Cancellation : Optionally cancel pending orders when a divergence is broken (e.g., price moves past the pivot in the wrong direction), reducing invalid trades. This feature is toggleable for flexibility.
🎯 Trade Visualization
Target and Stop Boxes : Displays take-profit (lime) and stop-loss (orange) levels as boxes on the price chart, extending 10 bars forward for clear visibility.
Dynamic Trade Updates : Trade visualizations are added, updated, or removed as trades are executed, canceled, or invalidated, ensuring accurate feedback.
Overlay Integration : Trade levels overlay the price chart, complementing the screener’s oscillator-based divergence lines and labels.
🎯 Strategy Default Configuration
Capital and Sizing : Set initial capital (default: $1,000,000) and position size (default: 20% of equity) for realistic backtesting.
Pyramiding : Allows up to 4 concurrent trades, enabling multiple divergence-based entries in trending markets.
Commission and Margin : Accounts for commission (default: 0.01%) and margin (100% for long/short) to reflect trading costs.
Performance Optimization : Processes up to 5,000 bars dynamically, balancing historical analysis and real-time execution.
🎲 Inputs and Configuration
🎯Trade Settings
Direction : Select Long or Short (default: Long).
Divergence : Trade Regular, Hidden, or Both divergence types (default: Both).
Entry/Exit Type : Choose Cautious, Confident, or Mixed (default: Cautious).
Risk/Reward : Set the risk-reward ratio for profit targets (default: 2.0).
Use Market Order : Enable market orders for immediate entry (default: false, uses limit orders).
Cancel On Break : Cancel pending orders when divergence is broken (default: true).
🎯Inherited Settings
The strategy inherits all inputs from the Divergence Screener, including:
Oscillator Settings : Oscillator type (e.g., RSI, CCI), length, and external oscillator option.
Trend Settings : Trend detection method (Zigzag, MA Difference, External), MA type, and length.
Zigzag Settings : Zigzag length (fixed repaint = true).
🎲 Entry/Exit Types for Divergence Scenarios
The Divergence Strategy offers three Entry/Exit Type options—Cautious, Confident, and Mixed—which determine how trades are entered and exited based on divergence pivot points. This section explains how these settings apply to different divergence scenarios, with placeholders for screenshots to illustrate each case.
The divergence pattern forms after 3 pivots. The stop and entry levels are formed on one of these levels based on Entry/Exit types.
🎯Bullish Divergence (Reversal)
A bullish divergence occurs when price forms a lower low, but the oscillator forms a higher low, signaling a potential upward reversal.
💎 Cautious:
Entry : At the pivot high point for a conservative entry.
Exit : Stop-loss at the last pivot point (previous low that is higher than the current pivot low); take-profit at risk-reward ratio. Canceled if price breaks below the pivot (if Cancel On Break is enabled).
Behavior : Enters after confirmation and exits quickly to limit downside risk.
💎Confident:
Entry : At the last pivot low, (previous low which is higher than the current pivot low) for an aggressive entry.
Exit : Stop-loss at recent pivot low, which is the lowest point; take-profit at risk-reward ratio. Canceled if price breaks below the pivot. (lazy exit)
Behavior : Enters early to capture trend continuation, holding longer for gains.
💎Mixed:
Entry : At the pivot high point (conservative).
Exit : Stop-loss at the recent pivot point that has resulted in lower low (lazy exit). Canceled if price breaks below the pivot.
Behavior : Balances entry caution with extended holding for trend continuation.
🎯Bearish Divergence (Reversal)
A bearish divergence occurs when price forms a higher high, but the oscillator forms a lower high, indicating a potential downward reversal.
💎Cautious:
Entry : At the pivot low point (lower high) for a conservative short entry.
Exit : Stop-loss at the previous pivot high point (previous high); take-profit at risk-reward ratio. Canceled if price breaks above the pivot (if Cancel On Break is enabled).
Behavior : Enters conservatively and exits quickly to minimize risk.
💎Confident:
Entry : At the last price point (previous high) for an aggressive short entry.
Exit : Stop-loss at the pivot point; take-profit at risk-reward ratio. Canceled if price breaks above the pivot.
Behavior : Enters early to maximize trend continuation, holding longer.
💎Mixed:
Entry : At the previous piot high point (conservative).
Exit : Stop-loss at the last price point (delayed exit). Canceled if price breaks above the pivot.
Behavior : Combines conservative entry with extended holding for downtrend gains.
🎯Bullish Hidden Divergence (Continuation)
A bullish hidden divergence occurs when price forms a higher low, but the oscillator forms a lower low, suggesting uptrend continuation. In case of Hidden bullish divergence, b]Entry is always on the previous pivot high (unless it is a market order)
💎Cautious:
Exit : Stop-loss at the recent pivot low point (higher than previous pivot low); take-profit at risk-reward ratio. Canceled if price breaks below the pivot (if Cancel On Break is enabled).
Behavior : Enters after confirmation and exits quickly to limit downside risk.
💎Confident:
Exit : Stop-loss at previous pivot low, which is the lowest point; take-profit at risk-reward ratio. Canceled if price breaks below the pivot. (lazy exit)
Behavior : Enters early to capture trend continuation, holding longer for gains.
🎯Bearish Hidden Divergence (Continuation)
A bearish hidden divergence occurs when price forms a lower high, but the oscillator forms a higher high, suggesting downtrend continuation. In case of Hidden Bearish divergence, b]Entry is always on the previous pivot low (unless it is a market order)
💎Cautious:
Exit : Stop-loss at the latest pivot high point (which is a lower high); take-profit at risk-reward ratio. Canceled if price breaks above the pivot (if Cancel On Break is enabled).
Behavior : Enters conservatively and exits quickly to minimize risk.
💎Confident/Mixed:
Exit : Stop-loss at the previous pivot high point; take-profit at risk-reward ratio. Canceled if price breaks above the pivot.
Behavior : Uses the late exit point to hold longer.
🎲 Usage Instructions
🎯Add to Chart:
Add the Divergence Strategy to your TradingView chart.
The oscillator and divergence signals appear in a separate pane, with trade levels (target/stop boxes) overlaid on the price chart.
🎯Configure Settings:
Adjust trade settings (direction, divergence type, entry type, risk-reward, market orders, cancel on break).
Modify inherited Divergence Screener settings (oscillator, trend method, zigzag length) as needed.
Enable/disable alerts for divergence notifications.
🎯Interpret Signals:
Long Trades: Triggered on bullish or bullish hidden divergences (if allowed), shown with green/lime lines and labels.
Short Trades: Triggered on bearish or bearish hidden divergences (if allowed), shown with red/orange lines and labels.
Monitor lime (target) and orange (stop) boxes for trade levels.
Review strategy performance metrics (e.g., profit/loss, win rate) in the strategy tester.
🎯Backtest and Optimize:
Use TradingView’s strategy tester to evaluate performance on historical data.
Fine-tune risk-reward, entry type, position sizing, and cancellation settings to suit your market and timeframe.
For questions, suggestions, or support, contact Trendoscope via TradingView or official support channels. Stay tuned for updates and enhancements to the Divergence Strategy!
Trading CalculatorTrading Calculator Indicator
VIBE CODED WITH GROK 3
The Trading Calculator is a Pine Script indicator designed to perform quick and useful trading-related calculations directly on your chart. It allows traders to execute basic arithmetic operations—such as addition, subtraction, multiplication, and division—as well as calculate percent change and average using either numerical values or trading variables (e.g., close, open, high, low, volume). The indicator displays its results in a table that resembles a calculator interface, making it both functional and visually intuitive. Unlike typical indicators, it does not overlay on the price chart but instead appears in a separate pane.
Inputs
Formula (new | old): First value or variable (e.g., 100, close, close ). Example: close uses the current closing price.
Operator: Mathematical operation (e.g., Plus, Minus, Multiply). Example: Plus adds the two inputs.
Second Input: Second value or variable (e.g., 50, open, close ). Example: open uses the current opening price.
Risk Distribution HistogramStatistical risk visualization and analysis tool for any ticker 📊
The Risk Distribution Histogram visualizes the statistical distribution of different risk metrics for any financial instrument. It converts risk data into histograms with quartile-based color coding, so that traders can understand their risk, tail-risks, exposure patterns and make data-driven decisions based on empirical evidence rather than assumptions.
The indicator supports multiple risk calculation methods, each designed for different aspects of market analysis, from general volatility assessment to tail risk analysis.
Risk Measurement Methods
Standard Deviation
Captures raw daily price volatility by measuring the dispersion of price movements. Ideal for understanding overall market conditions and timing volatility-based strategies.
Use case: Options trading and volatility analysis.
Average True Range (ATR)
Measures true range as a percentage of price, accounting for gaps and limit moves. Valuable for position sizing across different price levels.
Use case: Position sizing and stop-loss placement.
The chart above illustrates how ATR statistical distribution can be used by looking at the ATR % of price distribution. For example, 90% of the movements are below 5%.
Downside Deviation
Only considers negative price movements, making it ideal for checking downside risk and capital protection rather than capturing upside volatility.
Use case: Downside protection strategies and stop losses.
Drawdown Analysis
Tracks peak-to-trough declines, providing insight into maximum loss potential during different market conditions.
Use case: Risk management and capital preservation.
The chart above illustrates tale risk for the asset (TQQQ), showing that it is possible to have drawdowns higher than 20%.
Entropy-Based Risk (EVaR)
Uses information theory to quantify market uncertainty. Higher entropy values indicate more unpredictable price action, valuable for detecting regime changes.
Use case: Advanced risk modeling and tail-risk.
VIX Histogram
Incorporates the market's fear index directly into analysis, showing how current volatility expectations compare to historical patterns. The CAPITALCOM:VIX histogram is independent from the ticker on the chart.
Use case: Volatility trading and market timing.
Visual Features
The histogram uses quartile-based color coding that immediately shows where current risk levels stand relative to historical patterns:
Green (Q1): Low Risk (0-25th percentile)
Yellow (Q2): Medium-Low Risk (25-50th percentile)
Orange (Q3): Medium-High Risk (50-75th percentile)
Red (Q4): High Risk (75-100th percentile)
The data table provides detailed statistics, including:
Count Distribution: Historical observations in each bin
PMF: Percentage probability for each risk level
CDF: Cumulative probability up to each level
Current Risk Marker: Shows your current position in the distribution
Trading Applications
When current risk falls into upper quartiles (Q3 or Q4), it signals conditions are riskier than 50-75% of historical observations. This guides position sizing and portfolio adjustments.
Key applications:
Position sizing based on empirical risk distributions
Monitoring risk regime changes over time
Comparing risk patterns across timeframes
Risk distribution analysis improves trade timing by identifying when market conditions favor specific strategies.
Enter positions during low-risk periods (Q1)
Reduce exposure in high-risk periods (Q4)
Use percentile rankings for dynamic stop-loss placement
Time volatility strategies using distribution patterns
Detect regime shifts through distribution changes
Compare current conditions to historical benchmarks
Identify outlier events in tail regions
Validate quantitative models with empirical data
Configuration Options
Data Collection
Lookback Period: Control amount of historical data analyzed
Date Range Filtering: Focus on specific market periods
Sample Size Validation: Automatic reliability warnings
Histogram Customization
Bin Count: 10-50 bins for different detail levels
Auto/Manual Bin Width: Optimize for your data range
Visual Preferences: Custom colors and font sizes
Implementation Guide
Start with Standard Deviation on daily charts for the most intuitive introduction to distribution-based risk analysis.
Method Selection: Begin with Standard Deviation
Setup: Use daily charts with 20-30 bins
Interpretation: Focus on quartile transitions as signals
Monitoring: Track distribution changes for regime detection
The tool provides comprehensive statistics including mean, standard deviation, quartiles, and current position metrics like Z-score and percentile ranking.
Enjoy, and please let me know your feedback! 😊🥂
QEMO: Quantum Electromagnetic Oscillator (Safe Adjusted)This is a highly conceptual and oscillator and It attempts to model market dynamics by borrowing concepts from quantum physics and electromagnetism to create a unique oscillator. It does not represent any real physical phenomena but uses these concepts as metaphors for market forces.
Here is a breakdown of its core components:
1. Quantum Price Wavefunction (The Core Price Engine)
This is the most abstract part of the script. It tries to model price not as a single point, but as a "wavefunction" representing a distribution of probable future prices.
Volatility & Price Grid: It first calculates recent market volatility. Based on this volatility, it creates a dynamic grid of possible price levels (price_bins) around the current price.
Probability Density: It assigns a probability to each price level in the grid.
"Energy" Operators:
Kinetic Energy: Metaphorically represents the "momentum" or rate of change of the price probabilities.
Potential Energy: A force field that influences the probabilities, derived from a combination of volatility and trading volume.
Expected Price: After evolving these probabilities, it calculates a single "expected price" which is the weighted average of all prices in the grid, based on their final probabilities.
2. Electromagnetic Fields (Buying vs. Selling Pressure)
This section models the battle between buyers and sellers in a more familiar way:
E-Field (Electric/Buying): Represents buying pressure, calculated from upward price moves (close - open) multiplied by volume.
B-Field (Magnetic/Selling): Represents selling pressure, calculated from downward price moves (open - close) multiplied by volume.
Lorentz Force (F_net): This is the net force (E - B), representing the overall directional pressure in the market. A positive value means buyers are in control; a negative value means sellers are.
3. Entanglement Entropy (Systemic Risk/Stability)
This component aims to measure the market's stability or "systemic risk."
It calculates a form of auto-correlation on recent price returns.
A high degree of instability in this correlation results in a high "Entropy" (S) value.
Essentially, a high S suggests the market is chaotic and unpredictable (low stability), while a low S suggests it is more stable and trending.
4. Final QEMO Calculation & Plotting
All the components are combined to create the final oscillator value:
Final Value: The qemo value is a product of the expected_price, the amplified net force, and the market stability (1 - S).
Smoothing: This raw qemo value is then smoothed with an Adaptive Moving Average (AMA) to produce the final line that gets plotted on the chart.
Visualization:
The main oscillator line is plotted below the chart. Its color changes based on its value (e.g., blue for positive, red for negative).
The background color of the indicator pane changes based on the Entropy (S), providing an immediate visual cue of market stability (e.g., black for stable, white for chaotic).
The script also plots 99th and 1st percentile bands to help identify statistically extreme readings in the oscillator's value.
PulsePoint SqueezePulsePoint Squeeze™ is a dynamic momentum compression and divergence detection system built to help traders identify high-pressure zones before breakout moves. Combining RSI-based thresholds, price compression zones, and divergence cues, it offers high-clarity insights with minimal noise — ideal for intraday precision and swing positioning.
Dettling Sexy Shirt LevelsThis indicator allows you to quickly enter levels you want to trade for quick scalps. You can enter your buy or sell point (Bull or Bear Line), and up to 5 profit levels. Pearsons Pivots and Camarillo Pivots are automatically updated each day, and can be selected on or off. It works well if you buy a call or put a few days until expiration, a few dollars out of the money.
After entering your buy points and Target levels, there is a drop down menu at the top of the settings page. You must select the ticker you are looking at on the chart, Tradingview will not automatically update the level if you are looking at a ticker but it is not selected in the menu.
Hull MA + ADX (Manual) Trend FilterA basic Hull MA with adx imbedded that highlights green or red based on trend direction. The highlight doesn't initiate until the adx is above 20.