Relative Wave: Volatility IncludedFor the setup shown, it is best used with the following scripts I have written:
1. Indicator: Volatility Candle Based
2. Multi-Period Charts (use 2 of them): @ 30m and 1H settings
3. Relative Wave: Volatility Included.
Indicator Description: Relative Wave: Volatility Included (RW: Vol)
Pine Script v6 – Technical Overview
🔍 Purpose
The Relative Wave: Volatility Included (RW: Vol) is a custom oscillator designed to measure price position relative to dynamic upper and lower bounds that are influenced by volatility. It incorporates trend filtering, momentum smoothing, and zone detection, providing a composite view of price waves and potential reversal signals.
🧠 How It Works
1. Core Concept: Relative Position within Volatility Bands
The indicator calculates a Relative Wave Index, which measures where the current price sits between recent upper and lower bands derived from standard deviation. These bounds are sorted over a historical window to filter for sensitivity.
2. Sensitivity & Smoothing
Trend Length (Historical_Bar_Count): Defines how many bars are used to build the volatility-adjusted trend range.
Sensitivity Control: Adjusts how reactive the index is to recent price changes.
EMA Smoothing: Custom exponential moving averages are used to smooth values for fast, slow, and overall momentum.
3. Components & Visuals
RW Short-Term Fast Line: Plotted as colored circles indicating quick changes in trend.
RW Short-Term Slow Line: A smoother trend line for signal filtering.
RW Overall Momentum Line: Step-style line measuring broader directional trend.
RW Wave Line: A smoothed average of recent crests and troughs, acting as a cyclical midline reference.
Zone Lines (5/20/50/80/95): Visual thresholds often used as overbought/oversold regions.
⚙️ Key Inputs & Their Effects
Trend Length: Longer = smoother but laggy trends; shorter = more responsive but volatile.
Sensitivity: Higher values = less sensitivity; lower = more reactive.
Signal Lengths (Fast/Slow/Overall): Control the degree of smoothing for each plotted line.
Crest/Trough Lookback: Determines how crests and troughs are calculated from past wave behavior.
✅ Trade Signal Logic
The script defines bullish and bearish conditions based on the interaction of:
RW Wave direction
Overall Momentum direction
Slow Line behavior
Relative positioning (e.g., below or above 50)
Bullish Example:
RW Wave and Momentum are both rising
Values are below 50 (potential upside room)
Slow Line may be falling or just crossed upward
Bearish Example:
RW Wave and Momentum are falling
Values are above 50 (potential downside room)
Slow Line rising or crossed downward
🎨 Visual Aids & Colors
Green: Bullish momentum
Red: Bearish momentum
Blue/Purple Circles: Transition points and fast line status
White/Midrange Lines: Reference zones (like RSI levels)
📈 Best Use Cases
Identifying shifts in market direction before price breakout
Confirming trend strength using wave/momentum alignment
Spotting oversold/overbought zones with volatility context
Combining with other indicators (e.g., price action or volume)
How the Relative Wave Indicator, Volatility-Based Candle Signals, and Multi-Time Period Charts Work Together
This strategy combines three core components—Relative Wave, Volatility Candle Signals, and Multi-Time Period Analysis—to build a layered, high-probability trading framework.
🔷 1. Relative Wave Indicator (used on 3-minute chart)
The Relative Wave Indicator is a momentum and volatility-based oscillator that tracks price movement within a defined range using historical highs and lows derived from standard deviation bands. It smooths price action using fast and slow custom EMAs to identify underlying trend strength and reversals.
Key Features:
Tracks short-term wave structure
Detects momentum shifts based on rising/falling conditions
Uses color-coded momentum signals to help spot turning points early
The wave line and overall momentum line help confirm the quality of trend setups
🔶 2. Volatility Candle-Based Indicator (used on 3-minute chart)
The Volatility Candle Signal highlights significant price action based on expanding or contracting volatility. This tool helps identify moments of potential breakout or reversal by evaluating candle size, wick structure, and deviation from recent ranges.
Key Purpose:
Pinpoints actionable moments when volatility is entering or exiting the market
Works in tandem with Relative Wave to validate whether a momentum shift is strong enough to act on
🕰 3. Multi-Time Period Chart Confirmation (30-minute & 2-hour)
To avoid false signals and ensure alignment with broader market context, two higher timeframes (30m and 2h) are used as confirmation filters.
How They Integrate:
The 30-minute chart provides mid-range trend direction—ideal for intraday bias
The 2-hour chart offers broader trend context and helps avoid trading against dominant macro trends
These are used as overlays or separate indicators that mirror Relative Wave or other trend-detection tools to show whether the short-term setup aligns with bigger picture momentum
✅ Optimal Setup
Execution Timeframe: 3-minute chart
Confirmation Timeframes: 30-minute and 2-hour charts
Ideal Conditions for Trade Entry:
Relative Wave shows bullish/bearish alignment (e.g., wave and momentum lines rising with value <50 for bulls, >50 for bears)
Volatility candles indicate a breakout or reversal
Both the 30m and 2h multi-timeframe indicators confirm the trend direction or support a momentum shift
This integrated approach minimizes noise and increases confidence in each trade setup by ensuring that short-term signals are supported by volatility behavior and broader market context.
週期
Bull & Bear Power Separados📄 English Description for TradingView
Bull & Bear Power – Elder Style
This indicator displays the strength of buyers (Bull Power) and sellers (Bear Power) separately, based on Alexander Elder’s original concept.
It uses a 13-period Exponential Moving Average (EMA) as the baseline, calculating:
Bull Power = High – EMA
Bear Power = Low – EMA
✔️ Bull Power (green) shows buying pressure.
✔️ Bear Power (red) shows selling pressure.
Great for analyzing true market momentum and spotting early signs of potential trend reversals.
Can be used as confirmation together with moving averages (e.g., MMA30 and MMA50) or price action signals.
✅ On 1H gold charts (XAUUSD), it has shown solid behavior in filtering entries during clear trends.
Developed and shared for educational purposes by El Bit Criollo.
MVRV Ratio [Alpha Extract]The MVRV Ratio Indicator provides valuable insights into Bitcoin market cycles by tracking the relationship between market value and realized value. This powerful on-chain metric helps traders identify potential market tops and bottoms, offering clear buy and sell signals based on historical patterns of Bitcoin valuation.
🔶 CALCULATION The indicator processes MVRV ratio data through several analytical methods:
Raw MVRV Data: Collects MVRV data directly from INTOTHEBLOCK for Bitcoin
Optional Smoothing: Applies simple moving average (SMA) to reduce noise
Status Classification: Categorizes market conditions into four distinct states
Signal Generation: Produces trading signals based on MVRV thresholds
Price Estimation: Calculates estimated realized price (Current price / MVRV ratio)
Historical Context: Compares current values to historical extremes
Formula:
MVRV Ratio = Market Value / Realized Value
Smoothed MVRV = SMA(MVRV Ratio, Smoothing Length)
Estimated Realized Price = Current Price / MVRV Ratio
Distance to Top = ((3.5 / MVRV Ratio) - 1) * 100
Distance to Bottom = ((MVRV Ratio / 0.8) - 1) * 100
🔶 DETAILS Visual Features:
MVRV Plot: Color-coded line showing current MVRV value (red for overvalued, orange for moderately overvalued, blue for fair value, teal for undervalued)
Reference Levels: Horizontal lines indicating key MVRV thresholds (3.5, 2.5, 1.0, 0.8)
Zone Highlighting: Background color changes to highlight extreme market conditions (red for potentially overvalued, blue for potentially undervalued)
Information Table: Comprehensive dashboard showing current MVRV value, market status, trading signal, price information, and historical context
Interpretation:
MVRV ≥ 3.5: Potential market top, strong sell signal
MVRV ≥ 2.5: Overvalued market, consider selling
MVRV 1.5-2.5: Neutral market conditions
MVRV 1.0-1.5: Fair value, consider buying
MVRV < 1.0: Potential market bottom, strong buy signal
🔶 EXAMPLES
Market Top Identification: When MVRV ratio exceeds 3.5, the indicator signals potential market tops, highlighting periods where Bitcoin may be significantly overvalued.
Example: During bull market peaks, MVRV exceeding 3.5 has historically preceded major corrections, helping traders time their exits.
Bottom Detection: MVRV values below 1.0, especially approaching 0.8, have historically marked excellent buying opportunities.
Example: During bear market bottoms, MVRV falling below 1.0 has identified the most profitable entry points for long-term Bitcoin accumulation.
Tracking Market Cycles: The indicator provides a clear visualization of Bitcoin's market cycles from undervalued to overvalued states.
Example: Following the progression of MVRV from below 1.0 through fair value and eventually to overvalued territory helps traders position themselves appropriately throughout Bitcoin's market cycle.
Realized Price Support: The estimated realized price often acts as a significant
support/resistance level during market transitions.
Example: During corrections, price often finds support near the realized price level calculated by the indicator, providing potential entry points.
🔶 SETTINGS
Customization Options:
Smoothing: Toggle smoothing option and adjust smoothing length (1-50)
Table Display: Show/hide the information table
Table Position: Choose between top right, top left, bottom right, or bottom left positions
Visual Elements: All plots, lines, and background highlights can be customized for color and style
The MVRV Ratio Indicator provides traders with a powerful on-chain metric to identify potential market tops and bottoms in Bitcoin. By tracking the relationship between market value and realized value, this indicator helps identify periods of overvaluation and undervaluation, offering clear buy and sell signals based on historical patterns. The comprehensive information table delivers valuable context about current market conditions, helping traders make more informed decisions about market positioning throughout Bitcoin's cyclical patterns.
AP Pivot PointsAP Pivot Points is a price-based trading tool that relies on the opening price of any selected time interval—whether it's intraday, daily, weekly, or otherwise—as its foundational reference point. From this opening price, the system applies a predefined percentage deviation to calculate multiple levels above and below the opening price. These levels represent key zones in the market where price action often reacts—either by reversing direction, stalling, or expanding.
The underlying principle is that price tends to respect these calculated deviation levels as dynamic pivot areas. These zones frequently serve as psychological or technical barriers where market participants reassess value, leading to increased probability of reversals or continuation patterns. As such, AP Pivot Points are highly valuable for identifying potential turning points in the market.
By offering a structured approach to mapping price deviations, this method helps traders anticipate where significant price movement may occur or where current price action might be overextended.
Average RSI (Daily + Weekly)📈 Average RSI (Relative Strength Index) – Beginner’s Guide
What it is:
The Average RSI is a technical indicator that combines multiple RSI values—such as daily and weekly RSI—into a single, smoothed line. This helps traders get a clearer picture of a stock’s momentum over both short- and medium-term timeframes.
Why it matters:
The RSI tells you whether a stock is potentially overbought (priced too high and due for a pullback) or oversold (priced too low and due for a bounce). Traditional RSI uses a scale from 0 to 100, with key levels at 70 (overbought) and 30 (oversold).
By averaging RSI across different timeframes, you reduce noise and get a better signal for trends and reversals.
How traders use it:
✅ Buy zone: When the average RSI dips below 40, it could signal a good entry point.
⚠️ Neutral zone: Between 40 and 60 means the trend isn’t strong—wait for more confirmation.
🚫 Sell zone: Above 60–70 may indicate the asset is overbought or due for a pullback.
Helpful for:
Spotting better entry/exit points
Filtering out false signals
Staying in trend-following trades longer
Best EMA FinderThis script, Best EMA Finder, is based on the same original logic as the Best SMA Finder I published previously. Although it was not the initial goal of the project, several users asked for an EMA version, so here it is.
The script scans a wide range of Exponential Moving Average (EMA) lengths, from 10 to 500, and identifies the one that historically delivered the most robust performance on the current chart. The choice to stop at 500 is deliberate: beyond that point, EMA curves tend to flatten and converge, adding processing time without meaningful differences in signals or outcomes.
Each EMA is evaluated using a custom robustness score:
Profit Factor × log(Number of Trades) × sqrt(Win Rate)
Only EMA lengths that exceed a user-defined minimum number of trades are considered valid. Among these, the one with the highest robustness score is selected and displayed on the chart.
A table summarizes the results:
- Best EMA length
- Total number of trades
- Profit Factor
- Win Rate
- Robustness Score
You can adjust:
- Strategy type: Long Only or Buy & Sell
- Minimum number of trades required
- Table visibility
This script is designed for analysis and optimization only. It does not execute trades or handle position sizing. Only one open trade per direction is considered at a time.
Bradley Siderograph Correlation: [Blueprint_So9]█ Bradley Siderograph Correlation Indicator
This tool is designed for use within TradingView’s Pine Beta Screener. It enables users to scan their watchlist and identify which assets have shown the highest positive or inverse correlation to a selected window of the Bradley Siderograph.
How to Use:
Go to your TradingView profile and click the Products tab.
Scroll down to Screeners, then click on the Pine option marked as Beta.
Select your preferred watchlist or a custom list you’ve created.
Click “Choose your favorite indicator” and select Bradley Siderograph Correlation Indicator (make sure to favorite it first so it appears in the list).
Once loaded, set:
The timeframe for analysis (e.g., 1D)
The window (number of bars to look back from the current bar)
Use my open-source Bradley Siderograph overlay to identify a recent pivot or turn, then match that window to scan for alignment across your watchlist.
Output:
The screener returns a sortable table displaying each asset in your selected watchlist, with a correlation coefficient ranging from -1 to +1:
+1 = Strong positive correlation
-1 = Strong inverse correlation
0 = No significant correlation
You can sort the column to quickly identify which assets are most aligned—or most divergent—from the Planetary barometer's behavior within your chosen window.
Timeframe Awareness:
Crypto = 24/7 (calendar-based)
Stocks/Forex = Weekday trading sessions (exclude weekends)
This tool enables watchlist-level filtering to identify correlation and inverse correlation between price movement and the Bradley Siderograph over a defined window.
Credits & Acknowledgments:
This is my implementation of Donald Bradley’s Siderograph, as described in Stock Market Prediction: The Planetary Barometer and How to Use It.
Built using planetary data from Astrolib by @BarefootJoey
Time Based Range# Time Based Range
**A fully customizable session-based range indicator for intraday and daily trading analysis**
## Overview
The Time Based Range indicator identifies and visualizes key price levels from any user-defined time session. Whether you're trading the London open, New York session, or any custom timeframe, this indicator helps you identify crucial support and resistance levels formed during specific trading periods.
## Key Features
### 🕒 **Flexible Session Configuration**
- Customize any time range (e.g., 05:00-13:00, 20:00-02:00)
- Select specific days of the week (Sunday=1 through Saturday=7)
- Works on any timeframe from 1-minute to daily charts
### 📊 **Three Display Modes**
**OHLC Mode:**
- Shows Open, High, Low, Close, and Midpoint lines
- Fully customizable line colors, styles, and widths
- Optional labels with custom text
- Toggle individual lines on/off
**Range Mode:**
- Displays High, Low, and Midpoint lines extending into the future
- Session background box for visual clarity
- Configurable extension length in hours
- Clean range-based analysis
**Mitigate Mode:**
- Horizontal pivot lines that extend until price "mitigates" (touches) them
- Session background box
- Lines automatically stop extending when price reaches the level
- Perfect for ICT-style analysis
### 🚨 **Advanced Alert System**
**Breakout Alerts:**
- Notifies when price breaks above session high or below session low
- Real-time notifications for range expansion
**Liquidity Sweep Alerts:**
- Detects when price briefly breaks a level but closes back inside the range
- Configurable lookback period for sweep detection
- Helps identify false breakouts and liquidity grabs
**Equilibrium Rejection Alerts:**
- Monitors price reaction at the session midpoint
- Detects strong rejections with wick formations
- Configurable sensitivity threshold
### 🎨 **Full Customization**
- Individual color settings for all lines and boxes
- Multiple line style options (Solid, Dashed, Dotted)
- Adjustable line widths and transparency
- Custom label text and positioning
- Session limit control (1-10 sessions displayed)
## Use Cases
### Day Trading
- Mark key levels from overnight sessions
- Identify London/New York opening ranges
- Track Asian session highs and lows
### Swing Trading
- Daily range analysis
- Multi-day level identification
- Key support/resistance from specific periods
### ICT/SMC Trading
- Liquidity pool identification
- Fair value gap analysis
- Market structure understanding
## Technical Specifications
- **Maximum Sessions:** 1-10 (user configurable)
- **Time Format:** 24-hour (HHMM-HHMM)
- **Day Selection:** Individual day toggles (1=Sunday through 7=Saturday)
- **Alert Types:** 4 different alert conditions
- **Drawing Objects:** Optimized with automatic cleanup
- **Performance:** Efficient array management prevents chart lag
## Best Practices
1. **Start Simple:** Begin with OHLC mode to understand session dynamics
2. **Use Alerts:** Enable notifications for key level interactions
3. **Combine Modes:** Switch between modes based on market conditions
4. **Optimize Settings:** Adjust colors and styles for your chart theme
5. **Multiple Timeframes:** Use different sessions for various trading strategies
## Compatibility
- Works on all TradingView chart types
- Compatible with all asset classes (Forex, Stocks, Crypto, Futures)
- Optimized for both light and dark themes
- Mobile-friendly display
---
*This indicator helps traders identify high-probability trading zones based on time-specific price action. Always combine with proper risk management and additional analysis methods.*
Melody Markets Moving Average Transitions🎵 Melody Markets Moving Average Transitions – The Ultimate Trend State Indicator 🎵
📌 Indicator Description
Melody Markets Moving Average Transitions is a powerful indicator designed to accurately represent the market trend state by combining the 5 main moving averages (MA7, MA20, MA50, MA100, MA200) and their 120 possible configurations.
Unlike traditional indicators that display moving averages separately, this tool synthesizes these multiple combinations into a dynamic trend line, which can be displayed directly on the selected moving average or via a specially calculated dynamic moving average.
It provides a clear and precise view of trend strength and momentum, helping traders better anticipate price movements.
🔍 Key Features
✅ Comprehensive Trend State → Analyzes up to 120 configurations between 5 moving averages for a detailed trend state.
✅ Dynamic Trend Line → Simple and intuitive visualization of the trend via a single line, shown directly on the chosen MA or the dynamic MA.
✅ Signal Visualization → Displays signals generated by each moving average, facilitating decision-making.
✅ Relevant Pullbacks Display → Highlights meaningful pullbacks according to trend strength and context.
✅ Fully Customizable → Choose moving averages, toggle signals and pullbacks, and customize colors.
✅ Overlay on Price Chart → Smooth and clear integration directly on the price chart.
📖 How to Use Melody Markets Moving Average Transitions?
1️⃣ Select the moving average (MA7, MA20, MA50, MA100, MA200) to track the trend state.
2️⃣ Activate the dynamic trend line to visualize overall market direction in real-time.
3️⃣ Enable signal and pullback displays to catch key trade setups and corrections.
4️⃣ Customize colors and display options to suit your trading style.
5️⃣ Combine with other technical tools for enhanced entry and exit confirmations.
🎯 Who Is This Indicator For?
🔹 Trend Traders & Swing Traders → Get a clear, precise overview of trend strength and pullbacks.
🔹 Day Traders & Scalpers → Quickly identify relevant signals without clutter.
🔹 Beginner to Advanced Traders → Intuitive and comprehensive trend analysis for all levels.
🔥 Conclusion
Melody Markets Moving Average Transitions revolutionizes trend analysis by combining complex moving average configurations into a single, clear dynamic line and signal system. It empowers traders with a deeper understanding of market conditions, improving decision-making and timing.
📌 Add it to your chart now and experience trend analysis like never before! 🚀
Correlation Coefficient📊 Correlation Coefficient (CC)
This indicator measures the statistical correlation between two selected securities over a defined period, scaled from -100 to +100.
It helps you quickly assess whether assets are moving:
Together (positive correlation)
Opposite (negative correlation)
Independently (zero correlation)
🔧 Features:
Select any two symbols (default: NIFTY & BANKNIFTY)
Adjustable length parameter for short-term or long-term correlation analysis
Clean, color-coded plot with horizontal levels to easily identify key correlation zones
📈 Useful For:
Pair trading setups
Hedging strategies
Detecting market regime shifts or intermarket divergences
⚠️ Disclaimer: This is not trading or investment advice.
This indicator is intended for informational purposes only and is not recommended for making
direct trading decisions.
Visually Layered OscillatorVisually Layered Oscillator User's Manual
Visually Layered Oscillator is a multi-oscillator designed to provide an intuitive visualization of RSI, MACD, ADX + DMI, allowing traders to interpret multiple signals at a glance.
It is designed to allow comparison within the same panel while maintaining the inherent meaning of each oscillator and compensating for visual distortion issues caused by size differences.
Component Overview
Item Description
RSI (x10) Displays relative buy/sell strength. Values above 70 are overbought; values below 30 are oversold.
MACD (3,16,10) Momentum indicator showing the difference between moving averages. Consists of lines and histograms
ADX ×50 + DMI Indicates the strength of the trend; ADX determines the strength of the trend and DMI determines whether it is buy/sell dominant.
White background color treatment Removes difficult-to-see grid lines to improve visibility.
🖥️ Screen Example
The panel is divided into the following three layers
mathematica
Copy
Edit
Top: ⬆️ RSI (purple)
Middle: 📈 MACD, Signal, Histogram + Color Fill
Bottom: 📉 ADX × 50, DMI+ / DMI- (Red, Blue, Orange)
TIP: If you zoom in on the indicators at a larger scale, you can see that each indicator is drawn at a different height level and placed in such a way that they do not overlap.
⚙️ Settings
Fast Length: MACD Quick Line Duration (Basic 3)
Slow Length: MACD slow line period (basic 16)
Smoothing: Signal line smoothing value (basic 10)
Notes and Tips
RSI × 10 and ADX × 50 are for visualization purposes only multiplied by multiples of the actual values. It does not affect the calculation and maintains the original RSI/ADX characteristics.
The MACD fill color visually highlights crossing conditions.
The background is treated in full white, making the indicator look clean without grid lines.
EMA 200 Price Deviation Alerts (1H Only)This script monitors the price deviation from the 200-period Exponential Moving Average (EMA) exclusively on the 1-hour chart. It generates alerts when the absolute difference between the current price and the EMA 200 exceeds a user-defined threshold (default: 65).
Features:
Works only on 1-hour (60-minute) charts to avoid false signals on other timeframes.
Customizable deviation threshold via script input.
Visual display of the 200 EMA on the chart.
Alert system to notify when price deviates significantly above or below the EMA.
Buy/Sell arrows shown when conditions are met:
Sell arrow appears when price is above the EMA and deviation exceeds threshold.
Buy arrow appears when price is below the EMA and deviation exceeds threshold.
Use this tool to identify potential overextended price moves relative to long-term trend support or resistance on the 1H timeframe.
Indicator: Volatility Candle Based 📊 Volatility Candle-Based Indicator (Pine Script v6)
This custom TradingView indicator is designed for futures traders who want to analyze volatility, candle patterns, and support/resistance zones within specific market hours. It overlays price charts and provides visual signals that help determine potential momentum shifts, trend continuations, or reversals.
🔧 Core Features
⏰ Futures Time Filter
The indicator activates only during specific trading hours, customized per futures contract (e.g., NQ, ES, GC).
Time is adjusted to the New York (EST) timezone.
This ensures the logic only runs during relevant futures market sessions.
💹 Contract-Specific Multipliers
Applies custom point multipliers for futures contracts (e.g., GC = 30, ES = 24).
Supports three types of multipliers:
Trailing Stop
Trailing Plot Stop
Stop Loss
Ensures accurate backtesting and risk modeling for each contract.
📈 Trendline Support & Resistance
Uses pivot high/low logic to dynamically plot:
Central pivot zones
Step-like support/resistance lines
These trendlines update based on price behavior and can indicate bullish or bearish control.
🔍 Candle Momentum Analysis
Evaluates each candle's:
Body-to-range ratio (e.g., Marubozu, Doji)
Shadow dominance (upper/lower wicks)
Detects important reversal or continuation patterns such as:
Bullish/Bearish Inside Candles
Doji Star formations
Uses a custom moving average to confirm directional bias.
🕯️ Plotter Candle Signals
Identifies BullishPlotter and BearishPlotter candles:
Highlights candles likely to signal upcoming momentum.
Also accounts for neutral signals when no clear bias is detected.
Tracks the high/low of recent signal candles for reference.
📌 Visual Elements (not shown in snippet but implied by logic)
Signal arrows, dashed current levels, and filled support/resistance zones can be plotted to provide real-time feedback.
These are useful for both manual trading and strategy development.
🎯 Use Case
Perfect for intraday or short-term futures traders on instruments like:
🟡 Gold (GC), 🟠 Silver (SI)
📉 Nasdaq (NQ/MNQ), S&P 500 (ES/MES)
This script provides both structural context (trendlines, pivots) and price action signals (candle formations, momentum shifts), helping traders align their decisions with the underlying market flow.
Multi-Timeframe Opening Dots with PlotcharPlot clean, smart dots that mark where the real action starts — the opening levels of the three higher timeframes above your current chart.
How it works:
Automatically grabs the next 3 higher timeframes.
Drops a slick dot right at each opening price — but only while that bar is still active.
Color-coded at a glance: Price above open? → green dot. Price below open? → red dot.
Why it’s useful: Get instant visual cues on higher timeframe opens — powerful markers for support, resistance, and directional bias.
Perfect for intraday traders and swing strategists who want to stay synced with the big picture.
Celestial Cycles [Orderflowing]Astronomical Calculations | Moon Phases | Lunar Cycles & Rare Events | Solar Eclipses & Seasonal Markers | Mercury Retrograde Analysis | Momentum-Based Trend Coloration | Moon Information Table | Customizable Alerts
Built using Pine Script V6
Introduction
The Celestial Cycles indicator is a simple yet complex script that merges the timeless influence of astronomical events with modern technical analysis. By plotting key celestial phenomena, such as moon phases, seasonal markers, and Mercury retrograde periods onto your price chart, this indicator offers traders a fresh perspective on market cycles.
If you like financial astrology or seeking a creative edge, it provides a visually intuitive way to explore potential correlations between celestial events and market behavior.
This indicator is ideal for traders of all experience levels looking to integrate the celestial cycle into their strategies, complementing traditional technical tools with a unique layer of analysis.
Innovation and Inspiration
Inspired by financial astrology. The notion that celestial events, like moon phases or planetary retrogrades, might influence human psychology and market dynamics has intrigued traders for a long time. "Millionaires don’t use astrology, billionaires do." (allegedly): ~J.P. Morgan
This indicator modernizes that concept with astronomical calculations, plotting these events on your chart.
Core Features
Moon Phases: Displays new moons, full moons, and quarter moons, with optional micro phases (1/8, 3/8, 5/8, 7/8) for detailed analysis.
Special Moons: Highlights rare events like blood moons (lunar eclipses) and blue moons with distinct markers.
Solar Eclipses: Marks solar eclipses during new moon phases when enabled.
Seasonal Events: Plots "Spring | Equinox," "Summer | Solstice," "Autumn | Equinox," and "Winter | Solstice" for cyclical context.
Mercury Retrograde: Visualizes current and future Mercury retrograde periods with background highlights and labels.
Trend Coloration: Colors price bars based on momentum to aid trend visualization (optional).
Information Table: Shows real-time moon age and phase details in a table.
Customizable Alerts: Set up alerts for moon phases, special moon events, seasonal events, and Mercury retrograde transitions to stay informed about key celestial occurrences.
Customization and User Inputs
Celestial Cycles is customizable, allowing you to adjust it to your liking:
Event Toggles: Show or hide specific events (e.g., moon phases, special moons, eclipses, seasonal events, Mercury retrograde).
Visual Adjustments: Set colors and positions (above or below bars) for each event type.
Phase Timing: Fine-tune moon phase detection with hour-based adjustments for precision.
Trend Settings: Enable/disable trend coloration and adjust the momentum calculation period.
Mercury Retrograde Options: Display current retrogrades and up to 10 future periods, with customizable visibility.
Alert Settings: Enable or disable alerts for specific celestial events, including moon phases, special moons, seasonal events, and Mercury retrograde starts and ends.
These options ensure a clean, focused chart highlighting only the elements most relevant to your analysis.
How It Works
The indicator leverages code to show celestial events:
Moon Phases: Calculated using Julian dates and ecliptic coordinates to determine moon age and phase transitions.
Special Events: Detects eclipses and rare moons by analyzing lunar and solar positions relative to the ecliptic plane.
Seasonal Markers: Identifies "Spring | Equinox," "Summer | Solstice," "Autumn | Equinox," and "Winter | Solstice".
Mercury Retrograde: Approximates retrograde cycles and projects future periods based on a simplified orbital model.
Trend Coloration: Applies a momentum oscillator to color bars, reflecting potential bullish or bearish trend.
Analysis and Interpretation
Traders can use Celestial Cycles to explore intriguing market hypotheses:
Moon Phases: New and full moons may align with volatility spikes or trend reversals.
Eclipses: Eclipses might signal significant market shifts.
Seasonal Events: Equinoxes and solstices could highlight cyclical turning points.
Mercury Retrograde: Periods of potential disruption or reversal, often linked to communication and technology challenges.
Trend Coloration: Visual cues to confirm potential momentum alongside celestial events.
Usage and Applications
Long-Term Trends: High Timeframe (HTF) charts to study celestial impacts on major cycles.
Short-Term Trends: Apply to intraday timeframes (LTF) for event correlations.
Confluence: Pair with technical indicators for stronger signals.
Research: Backtest historical data to uncover patterns specific to your chosen market. Use the adjustment periods to fine-tune.
Why Use This Indicator?
Unique Perspective: Combines celestial and technical analysis.
Free Access: Enjoy a premium script with lots of features at no cost.
Customization: Personalize every aspect to suit your preferences.
Educational: Learn about astronomical cycles.
Stay Informed: Set up customizable alerts to receive event notifications.
Conclusion
Celestial Cycles is an exploration of how the cosmos might intersect with the markets. By overlaying key astronomical events on your chart and offering alerts, it invites you to see trading through a new lens. While not a crystal ball, it’s a compelling addition to a trader’s toolkit.
Disclaimer: This indicator is for informational, educational and analytical purposes only. Celestial correlations are speculative and should not be the sole basis for trading decisions. Always combine with other analysis methods and manage risk appropriately.
Algo Structure [ValiantTrader_]Explanation of the "Algo Structure" Trading Indicator
This Pine Script indicator, created by ValiantTrader_, is a multi-timeframe swing analysis tool that helps traders identify key price levels and market structure across different timeframes. Here's how it works and how traders can use it:
Core Components
1. Multi-Timeframe Swing Analysis
The indicator tracks swing highs and lows across:
The current chart timeframe
A higher timeframe (weekly by default)
An even higher timeframe (monthly by default)
2. Swing Detection Logic
Current timeframe swings: Identified when price makes a 3-bar high/low pattern
Higher timeframe swings: Uses the highest high/lowest low of the last 3 bars on those timeframes
3. Visual Elements
Horizontal lines marking swing points
Labels showing the timeframe and percentage distance from current price
An information table summarizing key levels
How Traders Use This Indicator
1. Identifying Key Levels
The indicator draws recent swing highs (red) and swing lows (green)
These levels act as potential support/resistance areas
Traders watch for price reactions at these levels
2. Multi-Timeframe Analysis
By seeing swings from higher timeframes (weekly, monthly), traders can:
Identify more significant support/resistance zones
Understand the broader market context
Spot confluence areas where multiple timeframes align
3. Measuring Price Distance
The percentage display shows how far current price is from each swing level
Helps assess potential reward/risk at current levels
Shows volatility between swings (wider % = more volatile moves)
4. Table Summary
The info table provides a quick reference for:
Exact price levels of swings
Percentage ranges between highs and lows
Comparison across timeframes
5. Trading Applications
Breakout trading: When price moves beyond a swing high/low
Mean reversion: Trading bounces between swing levels
Trend confirmation: Higher highs/lows in multiple timeframes confirm trends
Support/resistance trading: Entering trades at swing levels with other confirmation
Customization Options
Traders can adjust:
The higher timeframes analyzed
Whether to show the timeframe labels
Whether to display swing levels
Whether to show the info table
The indicator also includes price alerts for new swing highs/lows on the current timeframe, allowing traders to get notifications when market structure changes.
This tool is particularly valuable for traders who incorporate multi-timeframe analysis into their strategy, helping them visualize important price levels across different time perspectives
CPD Approach Algo Line [ValiantTrader]CPD Approach Algo Line Indicator - Explanation
This indicator, developed by ValiantTrader, is a sophisticated tool for analyzing price action and volume distribution across different timeframes. Here's how it works and how traders can use it:
Core Functionality
The indicator performs a "Candle Price Distribution" (CPD) analysis by:
Collecting data from a higher timeframe (configurable via input)
Dividing the price range into horizontal zones (either by tick size or evenly distributed)
Analyzing price behavior within each zone
Key Features and Trading Applications
1. Price Zone Analysis
Divides the price range into customizable zones (default 24 zones)
Shows how many candles have traded in each zone
Displays what percentage of total candles occurred in each zone
Trading Use: Identifies high-probability support/resistance areas where price has historically spent more time.
2. Delta Calculation
Shows the difference in candle counts between adjacent zones
Color-coded (green for positive, red for negative)
Trading Use: Helps spot areas where price behavior changes significantly (potential reversal zones).
3. Volume Clusters
Aggregates volume traded within each price zone
Visualized as colored backgrounds
Trading Use: Identifies high-volume nodes which often act as strong support/resistance.
4. Pressure Zones
Scores each zone based on where candles closed within the zone
Positive pressure (green) when candles closed in upper part
Negative pressure (red) when candles closed in lower part
Trading Use: Shows where buyers or sellers were more dominant at each price level.
5. Advanced Candle Pattern Detection
Tracks wick engulfing patterns
Measures body engulfing patterns
Counts rejection candles (long wicks)
Identifies dominant candles (large bodies)
Trading Use: Provides additional confirmation of potential reversal or continuation patterns.
6. Draggable Reference Line
Allows traders to place a horizontal line at any price level
Automatically shows statistics for the zone containing the line
Trading Use: Quickly analyze any price level's historical significance.
Practical Trading Applications
Support/Resistance Identification: The zones with highest candle counts typically represent strong support/resistance levels.
Breakout Trading: When price moves into zones with few previous candles, it may indicate breakout potential.
Reversal Trading: Zones where delta changes significantly (from positive to negative or vice versa) can signal potential reversals.
Volume-Weighted Analysis: Combining candle counts with volume clusters helps identify the most significant price levels.
Multi-Timeframe Analysis: By setting the custom timeframe to a higher period, traders can see where institutional levels exist on weekly/daily charts while trading on lower timeframes.
The indicator is particularly useful for traders who employ volume profile, market profile, or order flow concepts in their trading strategy. The visual presentation makes it easy to quickly assess the most significant price levels on any chart.
Enhanced TEMA with Decimal PeriodsImagine you have a special type of moving average line called a TEMA (Triple
Moving Average). A TEMA is designed to be even quicker to react to price changes than a regular EMA (Exponential Moving Average), helping traders spot trends faster.
What this script does:
Super-Precise TEMA Length:
Normally, when you set the "length" or "period" for a moving average, you use whole numbers (like 10 days, 20 days).
This script lets you be more precise and use decimal numbers for the TEMA's length (like 26.0 days, or even 26.7 days). This allows for very fine-tuning.
How it gets the "Decimal" EMA part (if you choose to use it):
If you want a TEMA with a length of, say, 26.7:
The script first needs to calculate EMAs with a length of 26.7.
To do this, it cleverly calculates two regular EMAs: one with a length of 26 and another with a length of 27 (the whole numbers just below and above 26.7).
Then, it blends these two EMAs. Since 26.7 is closer to 27, it takes more from the "27-period EMA" and a bit less from the "26-period EMA." This mix gives you an EMA that acts like it has a 26.7 period.
Building the TEMA:
A TEMA isn't just one EMA. It's made by taking an EMA of an EMA, and then an EMA of that. It's like smoothing the line multiple times, but in a special mathematical way to make it faster.
So, this script:
-Calculates the first "decimal EMA" (e.g., for 26.7).
-Calculates another "decimal EMA" of that first EMA line (again, using 26.7).
-Calculates a third "decimal EMA" of the second EMA line (still using 26.7).
Finally, it combines these three EMAs using a special TEMA formula to get the final, quick-reacting TEMA line.
Option to Switch Off Decimals:
There's a setting ("Use Decimal Periods"). If you turn this off, the script will just use regular whole-number EMAs to build the TEMA (it will round down your decimal input, so 26.7 would become 26).
Plotting:
The final "Enhanced TEMA" line is drawn on your price chart.
In Simple Terms:
This script gives you a TEMA (a fast-moving average) that you can set up with very precise decimal lengths (like 26.7 instead of just 26 or 27).
It does this "decimal magic" by smartly blending two regular EMAs. You can also choose to use it like a normal TEMA with whole numbers if you prefer. The goal is to give traders a very responsive trend-following line that can be fine-tuned to a high degree of precision.
Ranging DetectionRange detection study v 0.1
Trying to find ranges on price charts. looking at H1 on EURUSD, the indicator will mark a line at the low and high of the last 10 candles, and mark the background grey if it detects a range - defined by how many candles since last high/low (default 3)
EMA Cross Strategy + Breakout Entry (Trend Filtered)A High-Probability Trading Strategy Using EMAs and Long-Term Trend Filters in Pine Script
In financial markets, successful trading often depends on identifying high-probability setups with consistent rules and clear confirmations. The Pine Script developed here combines the simplicity of exponential moving average (EMA) crossovers with the robustness of long-term trend filtering, enhancing entry timing and reducing exposure to false signals. This essay explains the strategy’s logic, technical components, strengths, and its potential effectiveness for active traders.
Introduction to the Strategy
This Pine Script trading strategy is built upon two foundational components:
1. EMA Crossovers: A well-established technique where a fast EMA (8-period) and a slower EMA (21-period) are used to detect short-term momentum shifts.
2. Trend Filtering Using SMA: A 100-period simple moving average (SMA) acts as a long-term trend indicator. Only trades in the direction of the dominant trend are considered valid.
These two elements are combined to create a high-probability, trend-following system that aims to capture meaningful price movements while avoiding low-quality entries that typically occur during sideways or choppy markets.
⸻
Core Entry Logic
The script defines two distinct entry conditions designed to complement each other:
1. Standard EMA Crossover Entry (Type A)
This is a classic momentum entry condition. When the 8 EMA crosses above the 21 EMA, it indicates a shift in short-term momentum. However, this signal alone is insufficient in many market conditions, especially when the broader trend is unclear or reversing. To mitigate this risk, the crossover is only accepted when the 100 SMA is in an uptrend, defined as the SMA currently being higher than its value on the previous bar. This ensures the strategy only takes long entries in bullish environments, aligning with the principle of trading with the trend.
2. Breakout Entry After Trend Reversal (Type B)
The second entry condition captures powerful “breakout” opportunities that often follow a fresh trend reversal. Specifically, when the 100 SMA transitions from a downtrend to an uptrend, the script starts a 15-bar lookback window. If, during that window, the price, 8 EMA, and 21 EMA all rise above the long-term SMA, it is considered a confirmation of trend strength and momentum alignment. A long entry is then signaled.
This condition is designed to capitalize on early participation in new uptrends, catching strong price expansions that typically follow a change in market direction.
⸻
Exit Logic
The exit logic is intentionally simple and tied to the same framework as entries. A position is exited when the 8 EMA crosses below the 21 EMA, and the 100 SMA remains in an uptrend. This ensures that exits are aligned with weakening momentum while the larger trend remains bullish. This avoids premature exits during minor pullbacks and focuses on retaining trades during sustained uptrends.
Notably, exits do not occur when the long-term trend has flipped bearish. This design choice prevents “reverse trend” noise from triggering exits too early and instead focuses purely on short-term weakness within a bullish macro backdrop.
⸻
Technical Components of the Script
The Pine Script is structured with clear and logical components:
1. Inputs: The user can customize the periods for the fast EMA, slow EMA, long-term SMA, and the trend-reversal lookback window (defaulted to 15 bars).
2. Trend Detection: The long-term trend is calculated using the slope of the 100 SMA. If the SMA is rising, the trend is marked as bullish and is visually plotted in green; otherwise, it is plotted in red.
3. State Management: The script tracks how many bars have passed since the long-term trend turned bullish. This is managed using a var integer variable that resets upon trend reversal and increments while the trend remains up.
4. Entry and Exit Signals: These are plotted as shape markers on the chart — green triangles for entry and red triangles for exit — providing visual clarity.
Each of these components works in harmony to ensure that trade signals are issued only in favorable environments with multiple confirmations.
⸻
Benefits of the Strategy
There are several key advantages to using this hybrid strategy:
1. Filters Out Choppy Markets
By requiring the long-term SMA to be in an uptrend for any entry or exit signal to be valid, the strategy avoids noisy, sideways price action where EMA crossovers are more likely to produce false signals.
2. Dual Entry Approach
The inclusion of two different entry types allows the strategy to both:
• Capture new trends as they emerge (Breakout Entry).
• Ride existing trends using EMA crossover logic (Standard Entry).
This dual approach balances early participation with trend confirmation, offering flexibility for different market conditions.
3. Clear Exit Criteria
By tying exits to a momentum weakening signal (EMA crossover down), traders are not left guessing when to exit. This supports consistent execution and reduces emotional decision-making.
4. Trend Alignment
Aligning both entry and exit decisions with the broader trend increases the probability that trades will move in the desired direction. This is a cornerstone of successful trend-following strategies.
5. Modular Design
The script’s modularity allows traders to easily expand it with backtesting functions, alerts, or additional filters like RSI, ATR, or volume-based conditions, depending on their individual trading needs.
⸻
Use Cases and Applications
This strategy is particularly well-suited for swing traders and position traders operating on the 4-hour or daily timeframes. It is also effective on trending assets like equity indices, major stocks, or cryptocurrencies with defined directional movement.
Additionally, this script can be used as a signal engine in a larger portfolio of strategies, where only trades with trend confirmation are allowed to proceed. It can also function as a discretionary trading aid, helping traders visually identify when technical conditions align favorably.
⸻
Conclusion
This enhanced EMA crossover strategy, powered by a long-term trend filter and a secondary breakout entry condition, offers a robust and disciplined approach to navigating financial markets. By focusing on trading in the direction of a confirmed uptrend and using both momentum and structural price behavior for entry confirmation, the strategy aims to minimize whipsaw trades and maximize participation in sustained bullish moves.
Its simple logic, visual clarity, and strong filtering mechanisms make it both practical for new traders and a valuable foundation for more advanced systems. Whether used as-is or further expanded with custom features, this Pine Script serves as an excellent tool for executing a structured, high-probability trading plan.
Doji Candle with Horizontal Lines Raja Saien🔰 Doji Candle with Horizontal Lines By Raja Saien
Created by: Wasif Samejo
Script Type: Visual Doji Identifier with Key Level Markers
Overlay: Yes
📌 Description:
This indicator helps you visually identify Doji candles and automatically plots horizontal key levels based on their high, low, and a defined price zone.
A Doji candle is a powerful signal in price action trading that shows indecision in the market, often leading to strong reversals or breakouts. This script is especially useful for traders who want to mark such candles and prepare for possible trade setups.
📈 Features:
✅ Automatic Doji Detection – Based on customizable body size (20.0% of the total range).
✅ Highlights Doji Candle – Visually changes the bar color to yellow when a Doji is found.
✅ High/Low Horizontal Lines – Marks the candle's actual high and low for better visual analysis.
✅ Zone Lines Above/Below – Draws outer levels to form a zone around the Doji, helpful for breakout setups.
Zone Line Color – Set the color for the upper and lower zone lines.
High/Low Line Color – Set the color for the high and low candle levels.
💡 Combine this indicator with trendlines, volume, or Fibonacci tools for better confirmation.
Same Date Last Year PatternThis tool is designed to help you analyze past price patterns from the same date last year to gain insights into potential market behavior today. It’s perfect for traders who want to spot recurring trends or directional cues (buy or sell signals) based on historical candle formations, rather than focusing on exact price levels. Here’s how it works and how to use it:
How It Works
Historical Lookback: The script examines the price action from the same calendar date last year (e.g., May 26, 2024, for today, May 26, 2025). Since markets may be closed on weekends or holidays (like Memorial Day), it automatically finds the nearest trading day with available data.
Pattern Detection: Instead of showing raw prices (which may not match today’s higher or lower price range), it analyzes the candle’s shape and direction. It tells you if the past candle was bullish (closing higher, suggesting a potential buy) or bearish (closing lower, suggesting a potential sell), along with details like wick size and the trend leading up to it.
Contextual Insight: It checks the trend from the previous few days (uptrend, downtrend, or sideways) to give you a sense of the market’s mood back then. This helps you decide if the pattern might repeat.
Prediction Suggestion: Based on last year’s candle direction, it offers a simple guess for the next candle’s potential move (e.g., bullish or bearish), though this is for reference only and not a guaranteed signal.
Key Features
Customizable Asset Type: You can set it for "Traditional" markets (e.g., stocks, forex) or "Crypto" (e.g., Bitcoin), adjusting how it searches for data based on whether the market runs 24/7.
Visual Cues: Labels appear on your chart showing the pattern and prediction, with colors (green for bullish, red for bearish, blue for prediction) to make it easy to read.
Range Consideration: This tool works best when the chart’s price range is around 1000 (e.g., stocks trading near $1000 or crypto pairs with similar values). Outside this range, the label positioning might not align perfectly due to scaling differences.
How to Use
Add to Chart: Load this script into TradeLocker’s indicator section on a daily chart for best results.
Select Asset Type: In the settings, choose "Traditional" for stocks or forex, or "Crypto" for 24/7 markets like Bitcoin.
Check Data: On the same date each year (e.g., May 26), it will display the pattern from last year’s nearest trading day. Ensure your chart has at least 455 days of historical data loaded to cover the search range.
Interpret Results: Look at the label to see the pattern (e.g., "Bullish Candle, Potential Buy"), trend context, and prediction. Use this to inform your trading decisions, but combine it with other tools for confirmation.
Important Notes
Limitations: It may show "No Data Found" if historical data isn’t available within its search window (up to 90 days around the target date for traditional markets). This is more likely for weekends or holidays. For best results, test it on assets trading around the 1000 price range.
Not a Guarantee: The prediction is based solely on last year’s candle and trend, not a definitive signal. Use it as a guide alongside your strategy and market analysis.
Customization: If you need it to work outside the 1000 range or add more pattern details (e.g., specific candlestick types), let the community know, and we can refine it!
This tool was crafted to help traders explore historical patterns in a user-friendly way. Share your feedback or suggestions in the TradeLocker community to make it even better!
S&P 500 & Normalized CAPE Z-Score AnalyzerThis macro-focused indicator visualizes the historical valuation of the U.S. equity market using the CAPE ratio (Shiller P/E), normalized over its long-term average and standard deviations. It helps traders and investors identify overvaluation and undervaluation zones over time, combining both statistical signals and historical context.
💡 Why It’s Useful
This indicator is ideal for macro traders and long-term investors looking to contextualize equity valuations across decades. It helps identify statistical extremes in valuation by referencing the standard deviation of the CAPE ratio relative to its long-term mean. The overlay of S&P 500 price with valuation zones provides a visual confirmation tool for macro decisions or timing insights.
It includes:
✅ Three display modes:
-S&P 500 (color-coded by CAPE valuation zone)
-Normalized CAPE (vs. long-term mean)
-CAPE Z-Score (standardized measure)
🎯 How to Interpret
Dynamic coloring of the S&P 500 price based on CAPE valuation:
🔴 Z > +2σ → Highly Overvalued
🟠 Z > +1σ → Overvalued
⚪ -1σ < Z < +1σ → Neutral
🟢 Z < -1σ → Undervalued
✅ Z < -2σ → Strong Buy Zone
-Live valuation label showing the current CAPE, Z-score, and zone.
-Macro event shading: major historical events (e.g. Great Depression, Oil Crisis, Dot-com Bubble, COVID Crash) are shaded on the chart for context.
✅ Built-in alerts:
CAPE > +2σ → Potential risk zone
CAPE < -2σ → Potential opportunity zone
📊 Use Cases
This indicator is ideal for:
🧠 Macro traders seeking long-term valuation extremes.
📈 Portfolio managers monitoring systemic valuation risk.
🏛️ Long-term investors timing strategic allocation shifts.
🧪 How It Works
CAPE ratio (Shiller PE) is retrieved from Quandl (MULTPL/SHILLER_PE_RATIO_MONTH).
The script calculates the long-term average and standard deviation of CAPE.
The Z-score is computed as:
(CAPE - Mean) / Standard Deviation
Users can switch between:
S&P 500 chart, color-coded by CAPE valuation zones.
Normalized CAPE, centered around zero (historic mean).
CAPE Z-score, showing statistical positioning directly.
Visual bands represent +1σ, +2σ, -1σ, -2σ thresholds.
You can switch between modes using the “Display” dropdown in the settings panel.
📊 Data Sources
CAPE: MULTPL/SHILLER_PE_RATIO_MONTH via Quandl
S&P 500: Monthly close prices of SPX (TradingView data)
All data updated on monthly resolution
This is not a repackaged built-in or autogenerated script. It’s a custom-built and interactive indicator designed for educational and analytical use in macroeconomic valuation studies.