Volatility Channel Oscillator█ OVERVIEW
"Volatility Channel Oscillator" is a technical indicator that analyzes price volatility relative to dynamic price channels, displaying an oscillator, its moving average, and signals based on crossovers and divergences. The indicator offers customizable overbought and oversold levels, gradient visualization, and divergence detection, supported by alerts for key signals.
█ CONCEPTS
The VCO indicator creates dynamic price channels based on a moving average of the price (calculated as the arithmetic mean of the high and low prices: (high + low) / 2) and market volatility (measured as the average candle range and body size). These channels are not displayed on the chart but are used to calculate the oscillator value, which reflects the position of the closing price relative to the channel width, scaled to a range from -100 to +100, with the zero line as the central point. A moving average of the oscillator (SMA) smooths its values, enabling signals based on crossovers with the zero line or overbought/oversold levels. The indicator also detects divergences between price and the oscillator, which may indicate potential trend reversals. VCO is useful for identifying market momentum, reversal points, and trend confirmation, especially when combined with other technical analysis tools.
█ FEATURES
- Volatility Channels: Calculates invisible chart boundaries based on a simple moving average (SMA) of the price (high + low) / 2 and volatility (average candle range and body). The length parameter (default 30) sets the SMA length, and scale (default 200%) adjusts the channel width.
- Oscillator: Determines the oscillator value in the range of -100 to +100, indicating the closing price's position relative to the volatility channel. Displayed with dynamic coloring (green for positive values, red for negative).
- Oscillator Moving Average: A simple moving average (SMA) of the oscillator values, smoothing its movements. The signalLength parameter (default 20) defines the SMA length. Displayed in yellow with an optional gradient.
- Overbought/Oversold Levels: Configurable thresholds for the oscillator (overbought, default 50; oversold, default -50) and its moving average (maOverbought, default 30; maOversold, default -30), shown as horizontal lines with optional gradients. Band colors change dynamically (red for overbought, green for oversold, gray for neutral) based on the moving average's position relative to maOverbought/maOversold, reinforcing other signals.
- Divergences: Detects bullish (price forms a lower low, oscillator a higher low) and bearish (price forms a higher high, oscillator a lower high) divergences using pivots (pivotLength, default 2). Divergences are displayed with a delay equal to the pivot length; larger lengths increase reliability but delay signals. Use as additional confirmation.
Signals:
- Overbought/Oversold Crossovers: Green triangles (buy) when the oscillator crosses above the oversold level, red triangles (sell) when it crosses below the overbought level.
- Zero Line Crossovers: Buy/sell signals when the oscillator crosses the zero line upward (buy) or downward (sell).
- Moving Average Crossovers: Buy/sell signals when the oscillator's moving average crosses the zero line or the maOverbought/maOversold levels. Dynamic band color changes (red/green) at these crossovers reinforce other signals.
- Visualization: Gradient lines for the oscillator, its moving average, overbought/oversold levels, and zero line, with adjustable transparency. Gradient fill between the oscillator and zero line.
Divergence Labels: "Bull" (bullish) and "Bear" (bearish) labels with customizable color and transparency.
- Alerts: Built-in alerts for divergences, overbought/oversold crossovers, and zero line crossovers by the oscillator and its moving average.
█ HOW TO USE
Add to Chart: Apply the indicator via Pine Editor or the Indicators menu on TradingView.
Configure Settings:
- Channel and Oscillator Settings: Adjust the channel SMA length (length, default 30) and channel scaling (scale, default 200%). Increase scale for high-volatility markets.
- Threshold Levels: Set oscillator overbought (overbought, default 50) and oversold (oversold, default -50) levels, and moving average thresholds (maOverbought, default 30; maOversold, default -30).
- Divergence Settings: Enable/disable divergence detection (calculateDivergence) and set pivot length (pivotLength, default 2). Larger values increase reliability but delay signals.
- Signal Settings: Choose signal types (signalType): overbought/oversold, zero line, moving average, or all.
- Styling: Customize colors for the oscillator, moving average, horizontal levels, and divergence labels. Adjust gradient and fill transparency.
Interpreting Signals:
- Buy Signals: Green triangles below the bar when the oscillator or its moving average crosses above the oversold level or zero line.
- Sell Signals: Red triangles above the bar when the oscillator or its moving average crosses below the overbought level or zero line.
- Moving Average Signals: Green/red triangles when the moving average crosses maOverbought/maOversold levels, indicating potential reversals or trend continuation. Dynamic band color changes (red for overbought, green for oversold) at these crossovers reinforce other signals.
- Divergences: "Bull" (bullish) and "Bear" (bearish) labels indicate potential trend reversals with a delay based on pivot length. Use as confirmation.
- Overbought/Oversold Levels: Monitor price reactions in these zones as potential reversal points. Dynamic band color changes based on the moving average reinforce signals.
Signal Confirmation: Use VCO with other tools, such as pivot levels (for key turning points) or Fibonacci levels (for support/resistance zones).
█ APPLICATIONS
- Trend Trading: Zero line crossovers by the oscillator or its moving average identify momentum in uptrends or downtrends.
- Range Trading: Overbought/oversold levels help identify entry/exit points in sideways markets.
- Divergences: Use bullish/bearish divergences as additional confirmation of reversals, especially near key price levels.
- Trend Identification: To analyze trends over a longer perspective, increase the moving average length (signalLength) for more stable signals.
█ NOTES
- Test the indicator across different timeframes and markets to optimize parameters, such as length and scale, for your trading style.
- In strong trends, overbought/oversold levels may persist, requiring additional signal verification.
- Divergences are more reliable on higher timeframes (H4, D1), where market noise is reduced, but their delay requires caution.
- In low-liquidity markets, signals may be less effective, so use on high-liquidity assets is recommended.
المتوسطات المتحركة
200W MA Valuation ZonesInspired by "Crypto Currently"
📈 200-Week MA Valuation Zones Indicator
This script visualizes long-term valuation zones based on the 200-week moving average (MA) — a widely followed metric for identifying major market cycle bottoms and tops.
It divides price levels into five distinct zones relative to the 200W MA:
🟦 Very Cheap — Below 200W MA
🟩 Cheap — 1.0× to 1.5× 200W MA
🟨 Fair Value — 1.5× to 2.0× 200W MA
🟧 Expensive — 2.0× to 2.5× 200W MA
🟥 Very Expensive — Above 2.5× 200W MA
You can choose to anchor zones to the current price or display full historical bands.
Color-coded regions and labels make it easy to identify when an asset is historically undervalued or overvalued based on long-term moving averages.
AbdullahThis script is a **3-in-1 Combined Indicator** for Pine Script v6, merging three popular technical analysis tools into a single chart overlay. It's designed to provide a comprehensive view of trend direction, momentum, and volatility-based stops.
Here's a breakdown of the three components:
## 1. ZLSMA - Zero Lag LSMA (Zero Lag Least Squares Moving Average)
The ZLSMA is a fast-reacting moving average that aims to eliminate the lag typically associated with standard moving averages. It does this by calculating the difference between a standard **Least Squares Moving Average (LSMA)** and a smoothed version of that LSMA, then adding that difference back to the original LSMA.
* **Customizable Inputs:** Length, Offset, and Source Price.
* **Plot:** A thick yellow line indicating the zero-lag trend.
---
## 2. Chandelier Exit
The Chandelier Exit is a volatility-based tool that places a trailing stop either above the price (for a long trade exit) or below the price (for a short trade exit). It uses the **Average True Range (ATR)** to set the stop distance.
* **Key Function:** Identifies potential stop-loss levels and trend changes.
* **Customizable Inputs:** ATR Period, ATR Multiplier, and an option to use the Close price for extremum calculations.
* **Visuals:**
* Plots the **Long Stop (Green)** and **Short Stop (Red)** lines, which switch based on the current trend direction.
* Optional **Buy/Sell Labels** and **Highlighting** (shaded background) to clearly mark the current trend state (long or short).
---
## 3. Exponential Moving Average (EMA) with Optional Smoothing Bands
This section plots a standard **Exponential Moving Average (EMA)** and includes a unique feature to smooth the EMA's output using another moving average or Bollinger Bands.
* **EMA Plot:** A blue line representing the EMA, with customizable Length, Source, and Offset.
* **Optional Smoothing:** The EMA line itself can be smoothed by applying a secondary moving average (SMA, EMA, WMA, etc.) to the EMA's values.
* **Bollinger Bands Option:** If **SMA + Bollinger Bands** is selected for smoothing, it plots **Upper** and **Lower Bands** based on the standard deviation of the EMA, providing a visual envelope for volatility around the smoothed line.
Diwali Lights Pro — 7-Diyas Signal Matrix [KedArc Quant]🎯 Overview
“Diwali Lights Pro — 7-Diyas Signal Matrix” is a precision-built trend-sentiment indicator that blends the glow of seven technical “diyas” — each representing a different momentum or strength dimension — into one intuitive signal matrix. It was designed to celebrate light, discipline, and clarity in trading — helping traders filter noise, identify strong trend shifts, and take trades with conviction. Each diya is powered by a proven indicator component: RSI, Stochastic, EMA trend strength, and momentum slopes.Together, they light up your chart with buy/sell signals only when technical confluence aligns — like the diyas of Diwali shining in harmony.
💡 Core Concept
The indicator computes a composite score (–9 to +9) by evaluating seven key parameters:
| # | Diya | Logic | Interpretation |
| 1 | RSI | Overbought / Oversold | Short-term momentum exhaustion |
| 2 | Stochastic | Direction & zones | Confirmation of RSI |
| 3 | Price vs EMA20 | Position of price | Near-term trend bias |
| 4 | EMA20 Slope | Short-term momentum | Strength confirmation |
| 5 | EMA50 Slope | Mid-term trend | Trend stability |
| 6 | EMA100 Slope | Medium-term sentiment | Institutional bias |
| 7 | EMA200 Slope | Long-term sentiment | Market direction baseline |
The total of these 7 diyas creates a signal matrix that dynamically adapts to trend conditions.
⚙️ Inputs & Configuration
| RSI Length | 14 | Standard RSI window |
| Stochastic Length | 14 | Measures momentum oscillation |
| EMA Periods | 20, 50, 100, 200 | Multi-layer trend structure |
| Overbought / Oversold Zones | 70 / 30 | Configurable thresholds |
| Show Buy/Sell Labels | ✅ | Toggle signal markers |
| Show Banner | ✅ | Festive Diwali header with fireworks |
| Twinkle Interval | 10 bars | Animation timing |
| Fireworks Count | 18 | Visual celebration intensity |
| Background Opacity | 100% | Style preference |
🧭 Entry & Exit Logic
# ✅ Buy Signal (🪔)
A Buy triggers when:
* The total diya score crosses above zero,
* And at least four of seven components turn bullish.
This indicates that short-term oscillators, price action, and moving averages are all turning in unison — a strong entry zone after a pullback.
# 🔥 Sell Signal (🔥)
A Sell triggers when:
* The total diya score crosses below zero,
* And multiple slopes or price conditions flip bearish.
This flags weakening momentum and possible trend exhaustion.
# 💬 Suggested Usage
* Works beautifully on 5-min to 1-hour charts.
* Best when used with trend confirmation tools (volume, price structure).
* Avoid entering trades when signals flip rapidly within narrow ranges (sideways zones).
🧪 Mathematical Formulae
1. RSI Bucket (p₁):
p₁ =
2 if RSI < Very Oversold
1 if RSI < Oversold
0 if neutral
-1 if RSI > Overbought
-2 if RSI > Very Overbought
2. Stochastic Bucket (p₂): Similar to RSI bucketing.
3. Price vs EMA20 (p₃):
p₃ = sign(close - EMA20)
4–7. Slope Sign (EMA20, 50, 100, 200):
p₄₋₇ = sign(EMA - EMA )
Total Score = Σ(p₁…p₇)
→ Crossover(total_score, 0) → Buy Signal
→ Crossunder(total_score, 0) → Sell Signal
📊 Why It’s Not Just a Mash-Up
Diwali Lights Pro uses:
* A unified scoring engine with weighted logic rather than conflicting triggers.
* Each component (diya) contributes equally, creating a normalized sentiment index.
* Smart signal filtering prevents repetitive false flips by enforcing trend alignment across multiple time frames.
* A dynamic, responsive structure optimized for clarity and minimal repainting.
🎆 Unique Add-Ons
* Top-Right Diwali Banner: Festive “Happy Diwali” with animated fireworks 🎇 and diyas 🪔.
* Signal Filtering: Reduces noise in volatile ranges.
* EMA Cloud Context: Visual clarity of multi-layer trend zones.
* Optional Light Mode: Change fireworks opacity for a subtle or bright effect.
📘 FAQ
Q1: Does this repaint?
No — it uses confirmed values (RSI, Stochastic, EMA slopes). Signals appear only after the bar closes.
Q2: Which timeframes work best?
Between 5m and 1h, depending on your strategy.
Use higher EMAs for swing setups.
Q3: Can I use it with alerts?
Yes, both Buy and Sell triggers come with built-in `alertcondition()` for instant notifications.
Q4: Can it be combined with other indicators?
Absolutely — it pairs well with volume profiles, volatility bands, or order-flow systems.
🪔 Glossary
| Diya | Candle or light — here, each diya = one technical indicator |
| EMA | Exponential Moving Average — measures smoothed trend bias |
| RSI | Relative Strength Index — momentum overbought/oversold oscillator |
| Stochastic | Momentum oscillator measuring closing levels relative to highs/lows |
| Slope Sign | Direction of EMA movement — rising or falling |
| Signal Matrix | The combined system of all seven diyas generating a unified score |
🧭 Final Note
> *Diwali Lights Pro* is not just a trading tool — it’s a visual celebration of confluence and discipline.
> When the diyas align, trends shine. Use it to trade in harmony with light, not against it. 🌟
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Cross3x v2Cross3x – Smart Trend & Rejection Detection System
Cross3x is a precision trading indicator designed for traders who combine trend-following with early reversal detection. Built on a triple moving average core, it delivers high-quality signals with minimal noise and maximum clarity.
Core Features:
Trend Filtered Crossover: Uses a fast EMA (18), slow EMA (33), and long-term SMA (99) to generate reliable entry signals only in the direction of the dominant trend.
Dynamic SL/TP/BE Management:
Stop Loss placed at the lowest/highest extreme over a user-defined lookback.
Take Profit calculated using a customizable Risk/Reward ratio.
Break-Even level set as a percentage between entry and TP (e.g., 10% = BE just above entry).
Early Rejection Signals: Flags potential reversals when price tests a moving average with a long wick during a countertrend candle — ideal for spotting pullbacks before the next leg.
Green flag: "Potential Long Setup" after a bullish rejection.
Red flag: "Potential Short Setup" after a bearish rejection.
Confirmation Points: Circles appear when price retraces cleanly after a crossover, signaling optimal entry zones.
Interactive Dashboard: Real-time table showing current signal, SL, and TP levels.
Customizable Alerts: Fully configurable alerts for entries, confirmation points, and rejection setups.
Why Use Cross3x?
It doesn’t just follow trends — it anticipates them. By combining classical crossovers with smart rejection logic and structured risk management, Cross3x helps you enter earlier, manage risk better, and stay aligned with market momentum.
Perfect for swing traders, intraday scalpers, and algorithmic strategies seeking a clean, robust foundation.
Usage Tips:
Combine "Potential" flags with order blocks or key levels for higher accuracy.
Use confirmation circles as entry triggers after early setups.
Adjust RR and BE% based on volatility and trading style.
Deploy Cross3x to turn simple crossovers into a complete trading methodology.
RSI + Stochastic Combo (fixed) by howhaber# RSI + Stochastic Indicator
**Summary**
This indicator combines RSI and Stochastic to generate BUY and SELL signals in oversold or overbought market conditions. It merges both indicators for higher accuracy, reducing false signals. Includes visual signals on the chart, alerts, and an info label for quick analysis.
---
## 📈 How the Indicator Works
### RSI Component
- Calculates standard RSI based on the specified period (`rsiLen`).
- Indicates oversold (< 30) or overbought (> 70) conditions.
### Stochastic Component
- Manually calculated to avoid compatibility issues.
- Measures the current price position relative to the price range (highs/lows) over the selected period.
- Smoothed using two SMA filters (%K and %D).
### Signal Logic
**BUY Signal**:
- %K crosses above %D (`ta.crossover(k, d)`).
- %K < 20 (oversold market).
- RSI < specified threshold (default < 40).
**SELL Signal**:
- %K crosses below %D (`ta.crossunder(k, d)`).
- %K > 80 (overbought market).
- RSI > specified threshold (default > 60).
---
## 📍 What's Displayed on the Chart
- 🟢 **Green arrow** below the bar → BUY signal.
- 🔴 **Red arrow** above the bar → SELL signal.
- **In a separate window**:
- RSI line (blue).
- Stochastic %K (orange).
- Stochastic %D (purple).
- Reference levels: 30/70 (RSI), 20/80 (Stochastic).
---
## 🔔 Alerts
- **RSI+Stoch BUY**: Notification on BUY signal.
- **RSI+Stoch SELL**: Notification on SELL signal.
Receive alerts via email, Telegram, or directly on the platform.
---
## 🧩 Additional Feature
- Info label on the last bar, displaying:
- Current RSI value.
- %K and %D values.
- Facilitates quick visual checks of the indicator's current state.
---
## 💡 Interpretation
- **Oversold market** (confirmed by RSI and Stochastic): Likely upward reversal.
- **Overbought market** (confirmed by RSI and Stochastic): Likely downward reversal.
- Combining both reduces false signals and improves accuracy in choppy markets.
---
## ⚠️ Important Note
This indicator is not financial advice. It is designed for technical analysis and educational purposes. Combine it with other tools like trend analysis, volume, and price patterns for better results.
Volume Profile with 8 EMAs and Ichimoku Cloud — Multi-Timeframe This script merges three proven concepts — Volume Profile, 8 customizable EMAs, and Ichimoku Cloud — into a single overlay that helps traders quickly identify **high-probability zones for entries and exits.
1. Volume Profile (Market Profile logic, Steidlmayer 1980s)
- Builds a horizontal histogram over the selected look-back period
- Highlights the **Point of Control (PoC) and Value Area (VA) where 68 % of volume traded
- Choose between **bullish, bearish, or both volume types
- Toggle **visible-range or fixed-bar mode
2. Eight Exponential Moving Averages
- Default lengths: 10, 25, 61, 78, 125, 150, 300, 500
- Each EMA can **trigger its own crossover alert** (up/down arrows on chart)
- Colors and thickness automatically scale with length for instant visual parsing
3. Ichimoku Cloud (Goichi Hosoda, 1930)
- Full cloud calculation: Tenkan, Kijun, Senkou A/B, Chikou
- Dynamic trend labels: “Bullish Trend” / “Bearish Trend” when price is above/below the cloud and TK cross agrees
- Cloud color reflects sentiment (green = bullish, red = bearish)
How to use
- Look for **confluence**: price inside Value Area + EMA stack aligned + Ichimoku cloud color match
- Use PoC as intraday support/resistance for scalps
- Enable only the **EMA alerts you actually trade** to avoid noise
This is not a simple mash-up**: the three modules are visually integrated so that Volume Profile levels, EMA slopes, and Ichimoku cloud boundaries can be compared at a glance without switching indicators.
Custom MTF EMA CloudsVisualize market structure and trend alignment across multiple timeframes with six layered EMA clouds — from short-term momentum to macro trend anchors.
Each pair of EMAs forms a dynamic cloud that adapts to your selected timeframe.
Colors, lengths, and visibility are fully customizable, allowing you to tailor the setup for any trading style.
⚙️ Default Configuration
EMA Short Long Purpose
1 8 13 🔸 Intraday momentum cloud (scalping layer)
2 21 24 🟩 Short-term trend confirmation
3 50 55 🔵 Medium-term swing structure
4 120 144 🔴 Long-term support/resistance band
5 200 238 🟠 Institutional trend foundation
6 400 460 🟣 Macro directional anchor
🧩 Features
✅ Up to 6 independent EMA clouds
✅ Fully customizable short & long lengths
✅ Individual line and cloud colors
✅ Toggle each layer on/off
✅ Works with any timeframe via the Resolution input
✅ Automatic cloud transparency for better chart clarity
📈 How to Use
Use EMA 1–2 (8/13, 21/24) for momentum shifts and intraday entries.
Use EMA 3–4 (50/55, 120/144) for swing confirmation and trend continuation.
Use EMA 5–6 (200/238, 400/460) as long-term anchors to stay aligned with institutional flow.
Watch for crossovers or price breaking in/out of clouds — they often precede strong directional moves.
Asia Range Breakout Asia Range Breakout
Description:
Asia Range Breakout is a sophisticated, multi-filter trading tool designed to identify high-probability breakout opportunities during the core Asian trading session. By combining session-based range analysis with advanced confirmation filters like Heiken Ashi momentum, Ichimoku baseline trends, and EMA alignment, this indicator helps traders capture decisive moves while filtering out market noise.
Tired of false breakouts? This system provides a structured framework to trade the Sydney and Tokyo sessions with precision and confidence.
Key Features:
Multi-Session Range Tracking:
Monitors 6 distinct pre-defined Asian sessions (Sydney Box, Tokyo Pre-Open, Tokyo Launch, etc.).
Dynamically plots High and Low boundaries for each session (Teal for Highs, Red for Lows).
Individually toggleable sessions to focus on your preferred trading window.
Smart Alert & Signal System:
Generates alerts based on Heiken Ashi candle closings relative to session ranges.
Dual-Size Signals: Differentiates between "Large" breakouts (outside the range) and "Small" signals (within the range).
Configurable alert timeframe for confirmation candle closure.Built-in Sound Alerts for real-time notifications.
Advanced Confirmation Filters:
Heiken Ashi Momentum Filter: Ensures breakout candles have significant momentum, adjustable via a threshold multiplier.
EMA 200 Filter: Confirms the breakout's alignment with the broader trend.
Ichimoku Baseline (Kijun-sen) Filter: Uses a dynamic support/resistance level for additional confirmation.
Ichimoku Baseline Divergence Filter: A unique feature that requires the baseline's slope to match the breakout direction (Bullish for buys, Bearish for sells).
ATR Volatility Filter: (Optional) Ensures the breakout candle has sufficient range relative to recent market volatility.
Visual Enhancements:
Take-Profit Lines: Projects profit targets using ATR and connects consecutive alerts with a trendline.
Heiken Ashi Overlay: Displays smoothed Heiken Ashi candles directly on the main chart for cleaner trend visualization.
Divergence Trend Line: Visually plots the slope of the Ichimoku Baseline for quick trend assessment.
Session Background Highlighter: Shades the active sessions for easy time reference.
Comprehensive Debug Info Box: Provides real-time feedback on filter status, perfect for strategy validation and learning.
Usage Instructions & Tips:
1. Initial Setup:
Start simple! Apply the indicator to a 5-minute or 1-minute chart.
Recommended Instruments:
Forex: Major pairs like AUD/USD , USD/JPY or EUR/JPY.
Indices: `NAS100` (Nasdaq), `US30` (Dow Jones), `JP225` (Nikkei 225).
Commodities: `XAUUSD` (Gold).
Initially, enable only the Sydney Box (00:30 - 03:15 UTC) as it is the most robust session, then explore others.
2. Interpreting the Signals:
Large Green Arrow (Above Bar): A strong BUY signal. The Heiken Ashi candle closed above the session's High, and all enabled filters are confirmed.
Small Green Arrow (Above Bar): A moderate BUY signal. The candle closed bullishly but within the session range.
Large Red Arrow (Below Bar): A strong SELL signal. The Heiken Ashi candle closed below the session's Low, with filter confirmation.
Small Red Arrow (Below Bar): A moderate SELL signal. The candle closed bearishly but within the session range.
3. Optimizing Your Strategy:
Filter Tuning: The default filters are balanced. Adjust them based on your risk appetite:
Increase the Heiken Ashi Threshold (e.g., to 0.2) for fewer, but stronger signals.
Disable filters like ATR or Divergence if you find them too restrictive.
The Power of Divergence: The Ichimoku Divergence filter is a powerful trend-confirmation tool. Pay close attention to it for the highest-quality signals.
Use the Debug Box: Enable the "Show Debug Info Box" to see exactly why a signal did or did not trigger. This is invaluable for understanding the indicator's logic and avoiding bad trades.
4. Risk Management:
The TP Lines provide a logical profit target based on market volatility. Consider using them for setting take-profit orders.
Always use a stop-loss. A logical level is the opposite side of the session range (e.g., for a buy signal, place a stop below the session low).
You're very welcome! I'm glad I could help you create a professional tool. Wishing you great success with your Trading! 🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀
EMA/VWAP/Volume/MACD指标// === 控制输出 ===
macd_plot_line = show_macd ? macd_line : na
macd_signal_plot = show_macd ? signal_line : na
macd_hist_plot = show_macd ? hist_line : na
adx_plot_line = show_adx ? adx : na
plusdi_plot_line = show_adx ? diplus : na
minusdi_plot_line = show_adx ? diminus : na
// === 绘制 MACD ===
plot(macd_plot_line, title="MACD Line", color=color.new(color.aqua, 0))
plot(macd_signal_plot, title="Signal Line", color=color.new(color.orange, 0))
plot(macd_hist_plot, title="Histogram", style=plot.style_columns,
color=macd_hist_plot >= 0 ? color.new(color.green, 0) : color.new(color.red, 0))
Moving Average Convergence-Divergence (MACD)This script implements the Moving Average Convergence-Divergence (MACD), a popular momentum indicator used in technical analysis to identify trend direction, momentum shifts, and potential buy/sell signals.
🔹 Key Features
1. Inputs & Customization
MACD Lines Toggle: Enable/disable the MACD and signal lines.
Source Price: Defaults to close but can be adjusted (e.g., open, high, low, hl2).
Fast Length (12): The period for the faster-moving EMA.
Slow Length (26): The period for the slower-moving EMA.
Signal Length (9): The smoothing period for the signal line.
2. Calculations
Computes the MACD Line (fast EMA - slow EMA).
Computes the Signal Line (EMA of the MACD line).
Computes the Histogram (difference between MACD and Signal lines).
3. Visual Indicators
Zero Line: A white horizontal line at 0 for reference.
MACD Line: Plotted in green when above the signal line, red when below.
Signal Line: Displayed as a yellow line.
Histogram:
Green bars when MACD > Signal (bullish momentum).
Red bars when MACD < Signal (bearish momentum).
Background Highlights:
Light green on bullish crossovers (MACD crosses above Signal).
Light red on bearish crossunders (MACD crosses below Signal).
4. Alerts
Triggers when:
Bullish Crossover (MACD crosses above Signal).
Bearish Crossunder (MACD crosses below Signal).
🔹 How Traders Use This Indicator
Trend Identification:
MACD above zero → bullish trend.
MACD below zero → bearish trend.
Momentum Signals:
Bullish Crossover (Buy Signal): MACD crosses above Signal.
Bearish Crossunder (Sell Signal): MACD crosses below Signal.
Divergence (Not in this script, but useful):
Price makes higher highs, but MACD makes lower highs → Potential reversal.
🔹 Strengths of This Script
✅ Clean and Efficient Code – Uses Pine Script v6 best practices.
✅ Customizable Inputs – Adjust lengths and source price.
✅ Clear Visuals – Color-coded for easy interpretation.
✅ Built-in Alerts – For automated trading strategies.
Jul 1
Release Notes
This script implements the Moving Average Convergence-Divergence (MACD), a popular momentum indicator used in technical analysis to identify trend direction, momentum shifts, and potential buy/sell signals.
🔹 Key Features
1. Inputs & Customization
MACD Lines Toggle: Enable/disable the MACD and signal lines.
Source Price: Defaults to close but can be adjusted (e.g., open, high, low, hl2).
Fast Length (12): The period for the faster-moving EMA.
Slow Length (26): The period for the slower-moving EMA.
Signal Length (9): The smoothing period for the signal line.
2. Calculations
Computes the MACD Line (fast EMA - slow EMA).
Computes the Signal Line (EMA of the MACD line).
Computes the Histogram (difference between MACD and Signal lines).
3. Visual Indicators
Zero Line: A white horizontal line at 0 for reference.
MACD Line: Plotted in green when above the signal line, red when below.
Signal Line: Displayed as a yellow line.
Histogram:
Green bars when MACD > Signal (bullish momentum).
Red bars when MACD < Signal (bearish momentum).
Background Highlights:
Light green on bullish crossovers (MACD crosses above Signal).
Light red on bearish crossunders (MACD crosses below Signal).
4. Alerts
Triggers when:
Bullish Crossover (MACD crosses above Signal).
Bearish Crossunder (MACD crosses below Signal).
🔹 How Traders Use This Indicator
Trend Identification:
MACD above zero → bullish trend.
MACD below zero → bearish trend.
Momentum Signals:
Bullish Crossover (Buy Signal): MACD crosses above Signal.
Bearish Crossunder (Sell Signal): MACD crosses below Signal.
Divergence (Not in this script, but useful):
Price makes higher highs, but MACD makes lower highs → Potential reversal.
🔹 Strengths of This Script
✅ Clean and Efficient Code – Uses Pine Script v6 best practices.
✅ Customizable Inputs – Adjust lengths and source price.
✅ Clear Visuals – Color-coded for easy interpretation.
✅ Built-in Alerts – For automated trading strategies.
Super Secret 50 EMADynamic 50 EMA
The 50 EMA changes color during uptrend and another color during downtrend. User chooses colors.
EMA50/EMA250 + SAR + 3-Candle EMA FilterBUY Trigger:
EMA50>250EMA and current values of both EMAs are higher from 3 previous candles
First appearance of bullish Parabolci Sar
SELL Trigger:
EMA50<250EMA and current values of both EMAs are lower from 3 previous candles
First appearance of bearish Parabolci Sar
- Marlon C
ORBs, EMAs, AVWAPThis Pine Script (version 6) is a multi-session trading indicator that combines Opening Range Breakouts (ORBs), Exponential Moving Averages (EMAs), and an Anchored VWAP (AVWAP) system — all in one overlay script for TradingView.
Here’s a clear breakdown of its structure and functionality:
🕒 1. Session Logic and ORB Calculation
Purpose: Identify and plot the high and low of the first 30 minutes (default) for the Tokyo, London, and New York trading sessions.
Session Anchors (NY time):
Tokyo → 20:00
London → 03:00
New York → 09:30
(All configurable in inputs.)
ORB Duration: Default is 30 minutes (orbDurationMin), also user-configurable.
Resets:
London and NY ORBs reset at the start of each new New York trading day (17:00 NY time).
Tokyo ORB resets independently using a stored timestamp.
Process:
For each session:
While the time is within the ORB window, the script captures the session’s high and low.
Once the window closes, those levels remain plotted until reset.
Plot Colors:
Tokyo → Yellow (#fecc02)
London → Gray (#8c9a9c)
New York → Magenta (#ff00c8)
These form visible horizontal lines marking the prior session ranges — useful for breakout or retest trading setups.
📈 2. EMA System
Purpose: Provide trend and dynamic support/resistance guidance.
It calculates and plots four EMAs:
EMA Period Color Purpose
EMA 9 Short-term Green Fast signal
EMA 20 Short-term Red Confirms direction
EMA 113 Medium Aqua Trend filter
EMA 200 Long-term Orange Macro trend baseline
Each EMA is plotted directly on the price chart for visual confluence with ORB and VWAP levels.
⚖️ 3. Anchored VWAP (AVWAP)
Purpose: Display a volume-weighted average price anchored to specific timeframes or events, optionally with dynamic deviation or percentage bands.
Features:
Anchor Options:
Time-based: Session, Week, Month, Quarter, Year, Decade, Century
Event-based: Earnings, Dividends, Splits
VWAP resets when the chosen anchor condition is met (e.g., new month, new earnings event, etc.).
Bands:
Up to three levels of symmetric upper/lower bands.
Choose between Standard Deviation or Percentage-based widths.
Display Toggles:
Each band’s visibility is optional.
VWAP can be hidden on 1D+ timeframes (hideonDWM option).
Color Scheme:
VWAP: Fuchsia (magenta-pink) line
Bands: Green / Olive / Teal with light-filled zones
⚙️ 4. Technical Highlights
Uses ta.vwap() with built-in band calculations.
Handles instruments with or without volume (errors if missing volume).
Uses time-zone aware timestamps (timestamp(NY_TZ, …)).
Uses timeframe.change() to detect new anchors for the VWAP.
Employs persistent variables (var) to maintain session state across bars.
💡 In Practice
This indicator is designed for multi-session intraday traders who:
Trade Tokyo, London, or NY open breakouts or retests.
Use EMA stacking and crossovers for trend confirmation.
Use Anchored VWAP as a fair-value or mean-reversion reference.
Need clear visual structure across different market sessions.
It provides strong session separation, trend context, and volume-weighted price reference — making it ideal for discretionary or semi-systematic trading strategies focused on liquidity zones and session momentum.
Bitcoin Buy-the-Dip Line (Auto timeframe switch)Many people ask me when is the right time to buy Bitcoin. However, most of them have little trading experience and no time to study technical strategies or tools.
That’s why I created a simple and intuitive indicator — easy enough for anyone to use.
Usage 1 – Buy the Dip
This indicator works only on 4H, 1D, 1W, and 1M timeframes.
On each timeframe, you will see a single EMA line.
During a bull market, whenever the price dips below this EMA, it usually represents a good opportunity to buy the dip .
Usage 2 – Bull to Bear Transition
On the daily timeframe, if the price stays below the EMA and continues to make lower lows , it often signals that the market is transitioning into a bearish phase .
Colored HMASimply a colored HMA. Perfect for trend following systems in combination with other indicators.
SMA均线(抵扣价)&布林带SMA Moving Averages (Discount Price) & Bollinger B
脚本包含7条sma均线,支持自定义长度
均线包含抵扣价功能(使用方法可以youtube搜“抵扣价”)
增加布林带,支持自定义参数
The script includes 7 SMA moving averages with customizable lengths, and adds Bollinger Bands with customizable parameters.
SMA 20 50 100A clean and lightweight SMA indicator that plots 20, 50, and 100 simple moving averages with customizable colors and line widths. Includes an optional label showing the latest SMA values for quick reference. Ideal for trend confirmation and swing trading setups.
Simple Moving Averages (20, 50, 100)A clean and lightweight SMA indicator that plots 20, 50, and 100 simple moving averages with customizable colors and line widths. Includes an optional label showing the latest SMA values for quick reference. Ideal for trend confirmation and swing trading setups.
PivotBoss Oscillator (PBOsc)PivotBoss Oscillator (PBOsc) – Description
The PivotBoss Oscillator (PBOsc) is a momentum-based indicator derived from the PivotBoss PEMA Method, designed to identify market bias, trend strength, and potential reversals across all timeframes and instruments.
Unlike traditional oscillators, PBOsc measures the differential among three pivot-based EMAs (fast, medium, and slow) relative to the pivot point (PP) of each bar, allowing it to self-adjust dynamically with current market volatility.
Calculation Logic
Pivot Point (PP):
𝑃
𝑃
=
(
𝐻
𝑖
𝑔
ℎ
+
𝐿
𝑜
𝑤
+
𝐶
𝑙
𝑜
𝑠
𝑒
)
/
3
PP=(High+Low+Close)/3
Pivot-Based EMAs:
Fast PEMA = EMA(PP, fast length)
Medium PEMA = EMA(PP, medium length)
Slow PEMA = EMA(PP, slow length)
Differentials:
Diff1 = Fast PEMA − Slow PEMA
Diff2 = Medium PEMA − Slow PEMA
Diff3 = Fast PEMA − Medium PEMA
Oscillator Value:
𝑃
𝐵
𝑂
𝑠
𝑐
=
(
𝐷
𝑖
𝑓
𝑓
1
+
𝐷
𝑖
𝑓
𝑓
2
+
𝐷
𝑖
𝑓
𝑓
3
)
/
𝑃
𝑃
PBOsc=(Diff1+Diff2+Diff3)/PP
Interpretation
Above Zero Line (0): Bullish bias; momentum favors the upside.
Below Zero Line (0): Bearish bias; momentum favors the downside.
Advancing Bars (Green): PBOsc rising → Strengthening trend or positive momentum.
Declining Bars (Red): PBOsc falling → Weakening trend or negative momentum.
Analytical Uses
Change of Bias: Detects short-term shifts in market sentiment.
Trending Markets: Measures pullbacks or continuations within ongoing trends.
Divergence: Divergence between price and PBOsc can signal potential reversals.
Default Settings
Default: (8, 13, 21)
Alternate Presets: (5, 8, 13), (13, 21, 34), (21, 34, 55)
Candle PlotUsed Linear Regression Candles by ugurvu
Added Regular and Heiken Ashi candles to choices
Added ability to choose timeframe but I find it does not look great when showing higher timeframes
To keep main chart less cluttered, I will add this indicator to my chart and then move a secondary indicator from the chart into it. You will need to pin the scale of the indicator to the scale of the Candle Plot.
Or, you can have the regular chart set to Regular candle and the Candle Plot set to Heiken Ashi or vice versa.
Trend Patterns_Trend Model此腳本根據《超級績效:金融怪傑交易之道》中的【趨勢樣板】進行撰寫
當時股價高於一百五十天(三十週)與兩百天(四十週)移動平均。
一百五十天移動平均高於兩百天移動平均。
兩百天移動平均至少有一個月期間處於上升狀態(多數情況最好有四、五個月以上)。
五十天移動平均同時高於一百五十天與兩百天移動平均。
當時股價高於五十天移動平均。
當時股價較五十二週低點至少高出30%(很多最佳候選股在突破橫向整理而展開大規模漲勢之前,股價已經較五十二週低點高出100%、300%或更多。)
目前股價距離五十二週高點不超過25%(愈接近愈好)。
相對強度評等(relative strength ranking,根據《投資人經濟日報》 的資料)不低於70,最好是80多或90多,而且較佳候選股總是如此。
This script is based on the 【Trend Patterns】 in 《Trade Like a Stock Market Wizard》.
The current stock price is above both the 150-day (30-week) and the 200-day (40-week) moving average price lines.
The 150-day moving average is above the 200-day moving average.
The 200-day moving average line is trending up for at least 1 month (preferably 4-5 months minimum in most cases).
The 50-day (10-week) moving average is above both the 150-day and 200-day moving averages.
The current stock price is trading above the 50-day moving average.
The current stock price is at least 30 percent above its 52-week low. (Many of the best selections will be 100 percent, 300 percent, or greater above their 52-week low before they emerge from a solid consolidation period and mount a large scale advance.)
The current stock price is within at least 25 percent of its 52-week high (the closer to a new high the better).
The relative strength ranking (as reported in Investor's Business Daily) is no less than 70, and preferably in the 80s or 90s, which will generally be the case with the better selections.