Dynamic Volume Trace Profile [ChartPrime]⯁ OVERVIEW
Dynamic Volume Trace Profile is a reimagined take on volume profile analysis. Instead of plotting a static horizontal histogram on the side of your chart, this indicator projects dynamic volume trace lines directly onto the price action. Each bin is color-graded according to its relative strength, creating a living “volume skeleton” of the market. The orange trace highlights the current Point of Control (POC)—the price level with maximum historical traded volume within the lookback window. On the right side, the tool builds a mini profile, showing absolute volume per bin alongside its percentage share, where the POC always represents 100% strength .
⯁ KEY FEATURES
Dynamic On-Chart Bins:
The range between highest high and lowest low is split into 25 bins. Each bin is drawn as a horizontal trace line across the lookback chart period.
Gradient Color Encoding:
Trace lines fade from transparent to teal depending on relative volume size. The more intense the teal, the stronger the historical traded activity at that level.
Automatic POC Highlight:
The bin with the highest aggregated volume is flagged with an orange line . This POC adapts bar-by-bar as volume distribution shifts.
Right-Side Volume Profile:
At the chart’s right edge, the script prints a box-style profile. Each bin shows:
• Total volume (absolute units).
• Percentage of max volume, in parentheses (POC bin = 100%).
This gives both raw and normalized context at a glance.
Adjustable Lookback Window:
The lookback defines how many bars feed the profile. Increase for stable HTF zones or decrease for responsive intraday distributions.
POC Toggle & Styling:
Optionally toggle POC highlighting on/off, adjust colors, and set line thickness for better integration with your chart theme.
⯁ HOW IT WORKS (UNDER THE HOOD)
Step Sizing:
over last 100 bars is divided by to calculate bin height.
Volume Aggregation:
For each bar in the , the script checks which bin the close falls into, then adds that bar’s volume to the bin’s counter.
Gradient Mapping:
Bin volume is normalized against the max volume across all bins. That value is mapped onto a gradient from transparent → teal.
POC Logic:
The bin with highest volume is colored orange both on the dynamic trace and in the right-side profile.
Right-Hand Profile:
Boxes are drawn for each bin proportional to volume / maxVolume × 50 units, with text labels showing both absolute volume and normalized %.
⯁ USAGE
Use the orange trace as the dominant “magnet” level—price often gravitates to the POC.
Watch for clusters of strong teal traces as areas of high acceptance; thin or faint zones mark low-liquidity gaps prone to fast moves.
On intraday charts, tighten lookback to reveal session-based distributions . For swing or position trading, expand lookback to surface more durable volume shelves.
Compare the right-side profile % to judge how “top-heavy” or “bottom-heavy” the current distribution is.
Use bright, intense color traces as context for confluence with structure, OBs, or liquidity hunts.
⯁ CONCLUSION
Dynamic Volume Trace Profile takes the traditional volume profile and fuses it into the body of price itself. Instead of a fixed sidebar, you see gradient traces layered directly on the chart, giving real-time context of where volume concentrated and where price may be drawn. With built-in POC highlighting, normalized % readouts, and an adaptive right-side profile, it offers both precision levels and market structure awareness in a cleaner, more intuitive form.
Полосы и каналы
Pivot Trend Flow [BigBeluga]🔵 OVERVIEW
Pivot Trend Flow turns raw swing points into a clean, adaptive trend band. It averages recent pivot highs and lows to form two dynamic reference levels; when price crosses above the averaged highs, trend flips bullish and a green band is drawn; when it crosses below the averaged lows, trend flips bearish and a red band is drawn. During an uptrend the script highlights breakouts of previous pivot highs with ▲ labels, and during a downtrend it flags breakdowns of previous pivot lows with ▼ labels—making structure shifts and continuation signals obvious.
🔵 CONCEPTS
Pivot-Based Averages : Recent pivot highs/lows are collected and averaged to create smoothed upper/lower reference levels.
if not na(ph)
phArray.push(ph)
if not na(pl)
plArray.push(pl)
if phArray.size() > avgWindow
upper := phArray.avg()
phArray.shift()
if plArray.size() > avgWindow
lower := plArray.avg()
plArray.shift()
Trend State via Crosses : Close above the averaged-highs ⇒ bullish trend; close below the averaged-lows ⇒ bearish trend.
Trend Band : A colored band (green/red) is plotted and optionally filled to visualize the active regime around price.
Structure Triggers :
In bull mode the tool watches for prior pivot-high breakouts (▲).
In bear mode it watches for prior pivot-low breakdowns (▼).
🔵 FEATURES
Adaptive Trend Detection from averaged pivot highs/lows.
Clear Visuals : Green band in uptrends, red band in downtrends; optional fill for quick read.
Breakout/Breakdown Labels :
▲ marks breaks of previous pivot highs in uptrends
▼ marks breaks of previous pivot lows in downtrends
Minimal Clutter : Uses compact lines and labels that extend only on confirmation.
Customizable Colors & Fill for trend states and band styling.
🔵 HOW TO USE
Pivot Length : Sets how swing points are detected. Smaller = more reactive; larger = smoother.
Avg Window (pivots) : How many recent pivot highs/lows are averaged. Increase to stabilize the band; decrease for agility.
Read the Band :
Green band active ⇒ prioritize longs, pullback buys toward the band.
Red band active ⇒ prioritize shorts, pullback sells toward the band.
Trade the Triggers :
In bull mode, ▲ on a prior pivot-high break can confirm continuation.
In bear mode, ▼ on a prior pivot-low break can confirm continuation.
Combine with Context : Use HTF trend, S/R, or volume for confluence and to filter signals.
Fill Color Toggle : Enable/disable band fill to match your chart style.
🔵 CONCLUSION
Pivot Trend Flow converts swing structure into an actionable, low-lag trend framework. By blending averaged pivots with clean breakout/breakdown labels, it clarifies trend direction, timing, and continuation spots—ideal as a core bias tool or a confirmation layer in any trading system.
Dominance Signal Apex [CHE]]Dominance Signal Apex — Triple-confirmed entry markers with stateful guardrails
Summary
This indicator focuses on entry timing by plotting markers only when three conditions align: a closed-bar Heikin-Ashi bias, a monotonic stack of super-smoother filters, and the current HMA slope. A compact state machine provides guardrails: it starts a directional state on closed-bar Heikin-Ashi bias, maintains it only while the smoother stack remains ordered, and renders a marker only if HMA slope agrees. This design aims for selective signals and reduces isolated prints during mixed conditions. Markers fade over time to visualize the age and persistence of the current state.
Motivation: Why this design?
Common triggers flip frequently in noise or react late when regimes shift. The core idea is to gate entry markers through a closed-bar state plus independent filter alignment. The state machine limits premature prints, removes markers when alignment breaks, and uses the HMA as a final directional gate. The result is fewer mixed-context entries and clearer clusters during sustained trends.
What’s different vs. standard approaches?
Reference baseline: Single moving-average slope or classic MA cross signals.
Architecture differences:
Multi-length two-pole super-smoother stack with strict ordering checks.
Closed-bar Heikin-Ashi bias to start a directional state.
HMA slope as a final gate for rendering markers.
Time-based alpha fade to surface state age.
Practical effect: Entry markers appear in clusters during aligned regimes and are suppressed when conditions diverge, improving selectivity.
How it works (technical)
Measurements: Four recursive super-smoother series on price at short to medium horizons. Up regime means each shorter smoother sits below the next longer one; down regime is the inverse.
State machine: On bar close, positive Heikin-Ashi bias starts a bull state and negative bias starts a bear state. The state terminates the moment the smoother ordering breaks relative to the prior bar.
Rendering gate: A marker prints only if the active state agrees with the current HMA slope. The HMA is plotted and colored by slope for context.
Normalization and clamping: Marker transparency transitions from a starting to an ending alpha across a fixed number of bars, clamped within the allowed range.
Initialization: Persistent variables track state and bar-count since state start; Heikin-Ashi open is seeded on the first valid bar.
HTF/security: None used. State updates are closed-bar, which reduces repaint paths.
Bands: Smoothed high, low, centerline, and offset bands are computed but not rendered.
Parameter Guide
Show Markers — Toggle rendering — Default: true — Hides markers without changing logic.
Bull Color / Bear Color — Visual colors — Defaults: bright green / red — Aesthetic only.
Start Alpha / End Alpha — Transparency range — Defaults: one hundred / fifty, within zero to one hundred — Controls initial visibility and fade endpoint.
Steps — Fade length in bars — Default: eight, minimum one — Longer values extend the visual memory of a state.
Smoother Length — Internal band smoothing — Default: twenty-one, minimum two — Affects computed bands only; not drawn.
Band Multiplier — Internal band offset — Default: one point zero — No impact on markers.
Source — Input for HMA — Default: close — Align with your workflow.
Length — HMA length — Default: fifty, minimum one — Larger values reduce flips; smaller values react faster.
Reading & Interpretation
Entry markers:
Bull marker (below bar): Closed-bar Heikin-Ashi bias is positive, smoother stack remains aligned for up regime, and HMA slope is rising.
Bear marker (above bar): Closed-bar Heikin-Ashi bias is negative, smoother stack remains aligned for down regime, and HMA slope is falling.
Fade: Transparency progresses over the configured steps, indicating how long the current state has persisted.
Practical Workflows & Combinations
Trend following: Focus on marker clusters aligned with HMA color. Add structure filters such as higher highs and higher lows or lower highs and lower lows to avoid counter-trend entries.
Exits/Stops: Consider exiting or reducing risk when smoother ordering breaks, when HMA color flips, or when marker cadence thins out.
Multi-asset/Multi-TF: Suitable for liquid crypto, FX, indices, and equities. On lower timeframes, shorten HMA length and fade steps for faster response.
Behavior, Constraints & Performance
Repaint/confirmation: State transitions and marker eligibility are decided on closed bars; live bars do not commit state changes until close.
security()/HTF: Not used.
Resources: Declared max bars back of one thousand five hundred; recursive filters and persistent states; no explicit loops.
Known limits: Some delay around sharp turns; brief states may start in noisy phases but are quickly revoked when alignment fails; HMA gating can miss very early reversals.
Sensible Defaults & Quick Tuning
Start here: Keep defaults.
Too many flips: Increase HMA length and raise fade steps.
Too sluggish: Decrease HMA length and reduce fade steps.
Markers too faint/bold: Adjust start and end alpha toward lower or higher opacity.
What this indicator is—and isn’t
A selective entry-marker layer that prints only under triple confirmation with stateful guardrails. It is not a full system, not predictive, and does not handle risk. Combine with market structure, risk controls, and position management.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Best regards and happy trading
Chervolino
Alpha - Multi-Asset Adaptive Trading Strategy# Alpha - Multi-Asset Adaptive Trading Strategy
Overview
Alpha is a comprehensive trading strategy that combines multiple technical analysis components with pre-optimized settings for over 70 different trading instruments across cryptocurrencies, forex, and stocks. The strategy employs an adaptive approach using modified trend detection algorithms, dynamic support/resistance zones, and multi-timeframe confirmation.
Key Features & Originality
1. Adaptive Trend Detection System
- Modified trend-following algorithm with amplitude-based channel deviation
- Dynamic channel width adjustment based on ATR (Average True Range)
- Dual-layer trend confirmation using both price action and momentum indicators
2. Pre-Configured Asset Optimization
The strategy includes carefully backtested parameter sets for:
- **Cryptocurrencies**: BTC, ETH, and 40+ altcoin pairs
- **Forex Pairs**: Major and minor currency pairs
- **Stocks**: TSLA, AAPL, GOOG
- **Commodities**: Gold, Silver, Platinum
- Each configuration is optimized for specific timeframes (5m, 15m, 30m, 45m, 1h)
3. Advanced Risk Management
- Multiple take profit levels (4 targets with customizable position sizing)
- Dynamic stop-loss options (ATR-based or percentage-based)
- Position size allocation across profit targets (default: 30%, 30%, 30%, 10%)
4. Multi-Timeframe Analysis Dashboard
- Real-time analysis across 4 configurable timeframes
- Comprehensive performance metrics display
- Visual representation of current market conditions
5. Market Condition Filtering
- RSI-based trend strength filtering
- ATR-based volatility filtering
- Sideways market detection to avoid choppy conditions
- Customizable filter combinations (ATR only, RSI only, both, or disabled)
How to Use
Initial Setup
1. **Select Asset Configuration**: Choose your trading pair from the "Strategies" dropdown menu
2. **Enable Strategy**: Enter "Alpha" in the code confirmation field
3. **Adjust Timeframe**: Match your chart timeframe to the selected strategy configuration
Parameter Customization
- **Trendline Settings**: Adjust amplitude and channel deviation for sensitivity
- **TP/SL Method**: Choose between ATR-based or percentage-based targets
- **Filtering Options**: Select appropriate market filters for your trading style
- **Backtest Period**: Set the number of days for strategy testing (max 60)
Signal Interpretation
- **BUY/SELL Labels**: Primary entry signals based on trend changes
- **Support/Resistance Zones**: Visual zones showing key price levels
- **Dashboard**: Real-time display of position status, targets, and performance metrics
Important Considerations
Limitations and Warnings
- **Backtesting Period**: Results shown are based on historical data from the specified backtest period
- **No Guarantee**: Past performance does not guarantee future results
- **Market Conditions**: Strategy performance varies with market volatility and trending conditions
- **Repainting**: Some signals may repaint if "Wait For Confirmed Bar" is disabled
Risk Warnings
- The pre-configured settings are starting points and may require adjustment for current market conditions
- Always use appropriate position sizing and risk management
- Test thoroughly on demo accounts before live trading
- Monitor and adjust parameters regularly as market dynamics change
Technical Components
Core Indicators Used
- Modified trend detection with amplitude-based channels
- RSI (Relative Strength Index) for momentum confirmation
- ATR (Average True Range) for volatility measurement
- Support/Resistance detection using pivot points
- Bollinger Band variant for trend confirmation
Alert Functionality
The strategy includes comprehensive alert options for:
- Entry signals (long and short)
- Take profit levels (TP1, TP2, TP3, TP4)
- Stop loss triggers
- Integration with trading bots via webhook messages
Recommended Usage
Best Practices
1. Start with the pre-configured settings for your chosen asset
2. Run backtests over different time periods to verify performance
3. Use the dashboard to monitor real-time strategy performance
4. Adjust filters based on current market conditions
5. Always use stop losses and proper risk management
Timeframe Recommendations
- **Short-Term**: Use 5m, 15m configurations for scalping
- **Mid-Term**: Use 30m, 45m configurations for day trading
- **Long-Term**: Use 1h configurations for swing trading
Updates and Support
The strategy parameters are regularly reviewed and optimized. Users should periodically check for updates to ensure they have the latest configurations.
Disclaimer
This strategy is for educational and informational purposes only. Trading involves substantial risk of loss. Users should conduct their own research and consider their financial situation before trading. The author is not responsible for any trading losses incurred using this strategy.
Regression Channel (ShareScope-style, parallel)What it does
Replicates ShareScope’s Trend of displayed data look: a single straight linear-regression line (dashed) across a chosen window with parallel, constant-width bands above and below, plus optional shading.
Use it to see the overall trend gradient for a period and a statistically sized channel based on the fit’s residual error.
How it works (math, short)
Computes an OLS regression once over the analysis window.
Residual standard error s is derived from SSE and degrees of freedom (n−2).
Band half-width is constant across the window:
Mean CI (narrower): half = z * s / √n
Prediction (wider): half = z * s * √(1 + 1/n)
Three straight, parallel lines are drawn from the regression endpoints; midline is dashed.
This is intentionally not a tapered CI (which widens at the ends). It matches the visual behaviour of ShareScope’s shaded trend line channel.
Inputs
Source – Price series (Close, High, Low, HL2, etc.).
Use last N bars / N (bars) – Rolling window length.
From / To (date mode) – Alternative fixed date window.
Confidence (%) – 90 / 95 / 99 / Custom (uses z≈t).
Custom Z (t) – Override the quantile if desired.
Prediction bands – Use wider prediction envelope instead of mean CI.
Shade region + colors / opacity / line width.
Usage
To mimic ShareScope exactly, pick the same date span (use date mode) and set Confidence 99%.
Choose Prediction OFF for a tighter “confidence” look; ON for a wider, more permissive channel.
If ShareScope used High as source, set Source = High here as well.
Notes & limitations
TradingView does not expose the visible viewport to Pine. The script cannot auto-read “displayed data.” Use last N bars or date range.
Bands are parallel by design. Prices may close outside; the channel does not bend.
Window capped at 5,000 bars for performance. No alerts are emitted.
Differences vs TV’s native tools
Linear Regression (drawing) – manual object; no statistical sizing or shading.
Linear Regression Channel (indicator) – uses price standard deviations around the regression; width is a user stdev multiple.
This script – uses residual error of the OLS fit and a z/t quantile to size a statistically meaningful parallel channel.
Changelog
r3.1 – Guard fix (no return at top level), minor refactor, stable line updates.
r3 – Switched to single-fit OLS with parallel constant-width bands (ShareScope look).
(Earlier experimental builds r1–r2.2 implemented rolling/tapered CI; superseded.)
Disclaimer: Educational use only. Not investment advice.
Opening Candle Zone with ATR Bands by nkChartsThis indicator highlights the opening range of each trading session and projects dynamic ATR-based zones around it.
Key Features
Plots high and low levels of the opening candle for each new daily session.
Extends these levels across the session, providing clear intraday support and resistance zones.
Adds ATR-based offset bands above and below the opening range for volatility-adjusted levels.
Customizable colors, ATR length, and multiplier for flexible use across markets and timeframes.
Adjustable session history limit to control how many past levels remain on the chart.
How to Use:
The opening range high/low often acts as strong intraday support or resistance.
The ATR bands give an adaptive volatility buffer, useful for breakout or mean-reversion strategies.
Works on any market with clear session opens.
This tool is designed for traders who want to combine session-based price action with volatility insights, helping identify potential breakouts, reversals, or consolidation areas throughout the day.
⚠️ Disclaimer: This indicator is for educational purposes only. It does not provide financial advice or guarantee profits. Always perform your own analysis before making trading decisions.
VWAP angleVWAP Angle Indicator
The VWAP Angle indicator is a technical analysis tool designed to measure the directional momentum of the Volume Weighted Average Price (VWAP). Rather than simply plotting the VWAP line itself, this indicator calculates the angle of the VWAP's trajectory over a specified lookback period. It converts the slope into degrees using arctangent mathematics, normalized by the Average True Range (ATR) to account for price volatility. The result is a momentum oscillator that ranges from -100 to +100, providing traders with a clear visual representation of whether the VWAP is trending sharply upward, downward, or moving sideways.
The indicator features customizable overbought and oversold zones (defaulting to +65 and -65 respectively) with color-coded bands to help identify potential reversal points or extreme market conditions. A dynamic color gradient transitions from cyan (bullish angles) to orange (bearish angles), making it easy to spot trend changes at a glance. The visualization includes multiple threshold bands at ±65 and ±80 levels, with shaded regions that intensify as the angle reaches extreme values, helping traders identify when momentum may be overextended.
Built-in alert functionality notifies traders when the VWAP angle crosses into overbought or oversold territories, with optional visual labels appearing directly on the indicator panel. This makes it particularly useful for automated trading strategies or for traders who want real-time notifications of potential trend exhaustion or reversal setups. The indicator works best when combined with other technical tools to confirm signals and filter out false alerts during choppy or ranging market conditions.
AI Agent PRIMEFLOW v1AI Agent PRIMEFLOW v1 — Trend + Breakout + Smart Stops
*By AI Agent Community*
## Overview
PRIMEFLOW v1 is a clean, rules-based signal tool that fires only when **trend + regime + market structure** align.
It combines a **baseline trend**, a **volatility regime filter** (ATR z-score), and **Donchian breakouts**, with **ATR bands** and **Chandelier-style stops** for risk control. Optional **HTF confirmation** keeps entries in sync with higher-timeframe bias.
> Built from public trading concepts (EMA/KAMA/HMA baselines, Donchian breakout, ATR trailing). No proprietary code used.
---
## What it does (3-Layer Confirmation)
1. **Trend** – EMA50/200 relationship + user-selectable baseline (EMA/HMA/KAMA).
2. **Regime** – ATR% z-score filter reduces chop; “Conservative/Balanced/Aggressive” modes adjust threshold.
3. **Structure** – Donchian breakout confirms momentum beyond recent range.
Only when all three align do BUY/SELL labels appear. ATR bands and dynamic stops are plotted for exits and trailing.
---
## Signals & Risk
* **Long**: Trend up (EMA50>EMA200), regime trending, price crosses above baseline **and** breaks the prior Donchian high.
* **Short**: Mirror conditions to the downside.
* **Stops**: Auto-plotted **Long/Short Stop** (ATR-based, Chandelier-style).
* **Targets**: Consider 1.5–2× ATR or ATR bands; keep a runner with trailing stop.
---
## Inputs (key)
* **Signal Mode**: Conservative / Balanced / Aggressive (regime threshold).
* **Use Heikin Ashi Source** (optional smoothing).
* **Structure Lookback (Donchian)**.
* **Volatility Lookback** (for ATR z-score).
* **Baseline Type & Length**: EMA / HMA / KAMA.
* **Trend Filter EMAs**: Fast (default 50) vs Slow (default 200).
* **HTF Confirmation**: set a higher TF (blank = off).
* **ATR Length & Multiplier** (bands & stops).
* **Style toggles**: Bands, regime background, labels.
---
## Recommended Presets
**XAUUSD – M15 (scalping/intraday)**
* Mode: *Balanced* · Baseline: *EMA 50* · Donchian: *20* · ATR: *10 × 2.5* · HTF: *H1*.
**XAUUSD – H1 (intraday)**
* Baseline: *KAMA 50* · Donchian: *25* · ATR: *14 × 2.5* · HTF: *H4*.
**BTCUSDT – H1 (crypto)**
* Baseline: *EMA 100* · Donchian: *30* · ATR: *14 × 2.0* · HTF: *H4* · Mode: *Conservative* in chop.
---
## Alerts (ready)
Create alerts **Once Per Bar Close**:
* **PRIMEFLOW Long** – long entry condition met.
* **PRIMEFLOW Short** – short entry condition met.
* **Trail Flip (Long)** – long trailing stop flips (exit/trim).
* **Trail Flip (Short)** – short trailing stop flips.
Tip: Route alerts to your bot/Telegram/WA webhook. Include placeholders (e.g., `{{ticker}} | {{interval}} | {{close}} | LONG/SHORT | SL: {{plot("Long Stop")}}`).
---
## Best Practices
* Avoid taking breakouts that are **>1.5× ATR** away from baseline (overextended).
* Re-enter on pullbacks while trend & regime remain valid.
* Around high-impact news (NFP/FOMC), wait 15–30 minutes after release.
* Use **HTF 4×** your chart TF (e.g., M15→H1, H1→H4).
---
## Who it’s for
Swing/scalp traders who want higher-quality trend entries with **built-in structure confirmation** and **clear risk lines**, especially on **XAUUSD** and **BTC**.
---
## Notes
* This is an **indicator** (not a strategy). A strategy/backtest version can be provided.
* Educational purposes only. Not financial advice. Trading involves risk.
**Tags:** trend, breakout, ATR, Donchian, chandelier stop, regime filter, XAUUSD, BTC, scalping, intraday, multi-timeframe, heikin ashi
**Changelog**
v1.0 – Initial release: 3-Layer Confirmation, ATR bands/stops, HTF bias, 4 alerts.
Swing T3 Ribbon with Dynamic Bandswing T3 Ribbon with Dynamic Bands
This indicator combines T3 moving averages with a dynamic Bollinger-style ribbon to highlight early trend changes and volatility-driven price moves.
Key Features:
T3 Ribbon: Fast T3 vs. Slow T3 shows trend direction; ribbon color is green for bullish, red for bearish.
Dynamic Bands: Bands fluctuate with recent price volatility, similar to Bollinger Bands, providing a visual guide for overbought/oversold areas.
Early Swing Markers:
E0 (Early Upswing): Price above top band while trend is temporarily bearish.
Ex (Early Downswing): Price below bottom band while trend is temporarily bullish.
Alerts:
Early upswing (E0)
Early downswing (Ex)
Price crossing the bottom (red) band from below.
Purpose:
Helps traders detect early trend reversals or price breakouts in the context of volatility.
Dynamic bands adapt to changing market conditions, giving a more responsive signal than fixed-width ribbons.
Investorjordann - Script I have developed a script for the BTC pair. I'm currently trialing this...it is using multiple indicators and timeframes to trigger a trade. So far it seems very profitable across many timeframes, but I am still trailing.
RSI Zones Background + Optional RSI PaneOverview
This Pine Script indicator does two things at once:
Colors the background of the main price chart whenever the RSI value is below a lower threshold (default 30) or above an upper threshold (default 70). This highlights oversold and overbought zones directly on the price chart itself.
Optionally displays a separate RSI panel with the RSI line and shaded region between the two threshold levels for reference.
The indicator is fully customizable through the settings panel—color choices, transparency, and whether to show the separate RSI pane can all be adjusted.
Key Parts of the Code
1. Inputs
src: The source price series for RSI calculation.
len: RSI lookback length (default 14).
lowerThr and upperThr: The lower and upper thresholds (defaults: 30 and 70).
lowColor and highColor: Colors for the background when RSI is below or above the thresholds.
bgTrans: Transparency level for the background shading.
showRSI: Boolean to toggle the optional RSI pane on or off.
2. RSI Calculation
rsi = ta.rsi(src, len)
This computes the RSI from the chosen price source.
3. Background Coloring on the Price Chart
bgCol = rsi <= lowerThr ? color.new(lowColor,bgTrans) :
rsi >= upperThr ? color.new(highColor,bgTrans) :
na
bgcolor(bgCol)
If RSI ≤ lower threshold: background turns lowColor (oversold zone).
If RSI ≥ upper threshold: background turns highColor (overbought zone).
Otherwise, no background color.
4. Optional RSI Pane
plot(showRSI ? rsi : na, display=display.pane)
Plots the RSI line in a separate pane when showRSI is true; otherwise hides it.
5. Horizontal Lines for Thresholds
hLower = hline(lowerThr, ...)
hUpper = hline(upperThr, ...)
Two horizontal lines at the lower and upper thresholds.
Because hline() can’t be wrapped inside if blocks, the script always creates them but makes them transparent (using na color) when the pane is hidden.
6. Filling Between Threshold Lines
fill(hLower, hUpper, color=showRSI ? color.new(color.gray,95) : na)
When the RSI pane is visible, the area between the two threshold lines is shaded in gray to create a “mid-zone” effect. This fill also switches off (becomes na) if the pane is hidden.
7. Alerts
The script also includes two alert conditions:
When RSI crosses below the lower threshold.
When RSI crosses above the upper threshold.
How It Works in Practice
On the price chart, you’ll see the background turn blue (or your chosen color) when RSI is ≤30, and red when RSI is ≥70.
If you enable “Show RSI” in the settings, a separate RSI pane will appear below the price chart, plotting the RSI line with two threshold lines and a shaded region in between.
You can fully adjust transparency and colors to suit your chart style.
Benefits
Quickly visualize overbought and oversold conditions without opening a separate RSI window.
Optional RSI pane provides context when needed.
Customizable colors and transparency make it easy to integrate with any chart theme.
Alerts give you automatic notifications when RSI crosses key levels.
------------------------------------------------------------------------------------------------------------------
개요
이 지표는 두 가지 기능을 동시에 수행합니다.
가격 차트 뒤 배경에 색상 표시
RSI 값이 설정한 하단 임계값(기본 30) 이하이거나 상단 임계값(기본 70) 이상일 때, 가격 차트 뒤쪽에 과매도·과매수 구간을 색으로 표시해줍니다.
선택적으로 RSI 보조창 표시
옵션을 켜면 별도의 RSI 패널이 나타나서 RSI 라인과 두 임계값(30, 70)을 연결한 구간을 음영 처리하여 보여줍니다.
설정 창에서 색상·투명도·보조창 표시 여부를 전부 조정할 수 있습니다.
코드 핵심 설명
1. 입력값
src: RSI 계산에 사용할 가격 소스(기본 종가).
len: RSI 기간(기본 14).
lowerThr / upperThr: RSI 하단·상단 임계값(기본 30, 70).
lowColor / highColor: RSI가 각각 하단 이하·상단 이상일 때 배경 색상.
bgTrans: 배경 투명도(0=불투명, 100=투명).
showRSI: RSI 보조창을 켜고 끌 수 있는 스위치.
2. RSI 계산
rsi = ta.rsi(src, len)
지정한 가격 소스를 기반으로 RSI를 계산합니다.
3. 가격 차트 배경 색칠
bgCol = rsi <= lowerThr ? color.new(lowColor,bgTrans) :
rsi >= upperThr ? color.new(highColor,bgTrans) :
na
bgcolor(bgCol)
RSI ≤ 하단 임계값 → lowColor(과매도 색)
RSI ≥ 상단 임계값 → highColor(과매수 색)
나머지 구간은 색상 없음.
4. 선택적 RSI 보조창
plot(showRSI ? rsi : na, display=display.pane)
showRSI가 켜져 있으면 RSI 라인을 보조창에 표시하고, 꺼져 있으면 숨깁니다.
5. 임계값 가로선
hLower = hline(lowerThr, ...)
hUpper = hline(upperThr, ...)
하단·상단 임계값을 가로선으로 표시합니다.
hline은 if 블록 안에서 쓸 수 없기 때문에 항상 그려지지만, 보조창이 꺼지면 색을 na로 처리해 안 보이게 합니다.
6. 임계값 사이 영역 음영 처리
fill(hLower, hUpper, color=showRSI ? color.new(color.gray,95) : na)
보조창이 켜져 있을 때만 두 가로선 사이를 회색으로 채워 “중립 구간”을 강조합니다.
7. 알림 조건
RSI가 하단 임계값을 아래로 돌파할 때 알림.
RSI가 상단 임계값을 위로 돌파할 때 알림.
실제 작동 모습
가격 차트 뒤쪽에 RSI ≤30이면 파란색, RSI ≥70이면 빨간색 배경이 나타납니다(색상은 설정에서 변경 가능).
RSI 보조창을 켜면, RSI 라인과 임계값 가로선, 그리고 그 사이 음영 영역이 함께 나타납니다.
투명도를 높이거나 낮추어 강조 정도를 조절할 수 있습니다.
장점
별도의 RSI창을 열지 않고도 가격 차트 배경만으로 과매수·과매도 상태를 직관적으로 확인 가능.
필요하면 보조창으로 RSI를 직접 확인하면서 임계값 가이드와 음영 영역을 함께 볼 수 있음.
색상·투명도를 자유롭게 조절할 수 있어 차트 스타일에 맞게 커스터마이징 가능.
RSI가 임계값을 돌파할 때 자동 알림을 받을 수 있음.
Small Caps - Range + Breakout (dernier seulement)//@version=5
indicator("Small Caps - Range + Breakout (dernier seulement)", overlay=true)
// -------------------
// Paramètres
// -------------------
lookback = input.int(50, "Période max du range (jours)")
minConsol = input.int(20, "Consolidation minimale (jours)")
volLen = input.int(20, "Période moyenne volume")
volMult = input.float(1.5, "Volume minimum (x moyenne)")
useRSI = input.bool(true, "Filtrer avec RSI > 55 ?")
rsiLength = input.int(14, "RSI période")
// -------------------
// Détection du Range
// -------------------
rangeHigh = ta.highest(high , lookback)
rangeLow = ta.lowest(low , lookback)
// Vérifier consolidation minimale
consolHigh = ta.highest(high , minConsol)
consolLow = ta.lowest(low , minConsol)
consolOk = (consolHigh <= rangeHigh) and (consolLow >= rangeLow)
// -------------------
// Conditions breakout
// -------------------
volMa = ta.sma(volume, volLen)
volOk = volume > volMult * volMa
rsi = ta.rsi(close, rsiLength)
rsiOk = useRSI ? rsi > 55 : true
breakoutUp = close > rangeHigh and volOk and rsiOk and consolOk
breakoutDown = close < rangeLow and volOk and rsiOk and consolOk
// -------------------
// Rectangle unique
// -------------------
var box rangeBox = na
if barstate.islast
if not na(rangeBox)
box.delete(rangeBox)
// Couleur par défaut (range gris)
rectColor = color.new(color.gray, 85)
borderCol = color.new(color.gray, 0)
// Modifier couleur si cassure
if breakoutUp
rectColor := color.new(color.green, 85)
borderCol := color.new(color.green, 0)
if breakoutDown
rectColor := color.new(color.red, 85)
borderCol := color.new(color.red, 0)
// Créer rectangle du range courant sur une seule ligne
rangeBox := box.new(left=bar_index - lookback, top=rangeHigh, right=bar_index, bottom=rangeLow, border_color=borderCol, border_width=1, bgcolor=rectColor)
// -------------------
// Flèches breakout
// -------------------
plotshape(breakoutUp, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.tiny)
plotshape(breakoutDown, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.tiny)
SuperScript Filtered (Stable)🔎 What This Indicator Does
The indicator is a trend and momentum filter.
It looks at multiple well-known technical tools (T3 moving averages, RSI, TSI, and EMA trend) and assigns a score to the current market condition.
• If most tools are bullish → score goes up.
• If most tools are bearish → score goes down.
• Only when the score is very strong (above +75 or below -75), it prints a Buy or Sell signal.
This helps traders focus only on high-probability setups instead of reacting to every small wiggle in price.
________________________________________
⚙️ How It Works
1. T3 Trend Check
o Compares a fast and slow T3 moving average.
o If the fast T3 is above the slow T3 → bullish signal.
o If it’s below → bearish signal.
2. RSI Check
o Uses the Relative Strength Index.
o If RSI is above 50 → bullish momentum.
o If RSI is below 50 → bearish momentum.
3. TSI Check
o Uses the True Strength Index.
o If TSI is above its signal line → bullish momentum.
o If TSI is below → bearish momentum.
4. EMA Trend Check
o Looks at two exponential moving averages (fast and slow).
o If price is above both → bullish.
o If price is below both → bearish.
5. Score System
o Each condition contributes +25 (bullish) or -25 (bearish).
o The total score can range from -100 to +100.
o Score ≥ +75 → Strong Buy
o Score ≤ -75 → Strong Sell
6. Signal Filtering
o Only one buy is allowed until a sell appears (and vice versa).
o A minimum bar gap is enforced between signals to avoid clutter.
________________________________________
📊 How It Appears on the Chart
• Green “BUY” label below candles → when multiple signals agree and the market is strongly bullish.
• Red “SELL” label above candles → when multiple signals agree and the market is strongly bearish.
• Background softly shaded green or red → highlights bullish or bearish conditions.
No messy tables, no clutter — just clear trend-based entries.
________________________________________
🎯 How Traders Can Use It
This indicator is designed to help traders by:
1. Filtering Noise
o Instead of reacting to every small crossover or RSI blip, it waits until at least 3–4 conditions agree.
o This avoids entering weak trades.
2. Identifying Strong Trend Shifts
o When a Buy or Sell arrow appears, it usually signals a shift in momentum that can lead to a larger move.
3. Reducing Overtrading
o By limiting signals, traders won’t be tempted to jump in and out unnecessarily.
4. Trade Confirmation
o Traders can use the signals as confirmation for their own setups.
o Example: If your strategy says “go long” and the indicator also shows a strong Buy, that trade has more conviction.
5. Alert Automation
o Built-in alerts mean you don’t have to watch the chart all day.
o You’ll be notified only when a strong signal appears.
________________________________________
⚡ When It Helps the Most
• Works best in trending markets (bullish or bearish).
• Very useful on higher timeframes (1h, 4h, daily) for swing trading.
• Can also work on lower timeframes (5m, 15m) if combined with higher timeframe trend filtering.
________________________________________
👉 In short
This indicator is a signal filter + trend detector. It combines four powerful tools into one scoring system, and only tells you to act when the odds are stacked in your favor.
________________________________________
BB + Keltner Squeeze (con SL)BB + Keltner Squeeze with Dynamic SL
This indicator combines Bollinger Bands (2σ and optional 3σ) with Keltner Channels to detect phases of volatility compression (squeeze) and their release (expansion).
Squeeze ON (orange dot): Bollinger Bands are inside the Keltner Channel → low volatility / market compression.
Release (green triangle): Bollinger Bands break outside the Keltner Channel → volatility expansion.
Orange background: visually highlights squeeze phases.
Dynamic Stop Loss options:
KC Mode: stop at the opposite Keltner band (wider, good for trend following).
ATRlike Mode: stop based on a multiple of the range (tighter, good for scalping or short swings).
Intended use:
Identify moments when the market is “building energy” and trade breakouts after a release.
Adjust stop losses dynamically according to volatility.
Note: This is not a standalone trading system. It works best when combined with trend confirmation tools (EMA, MACD, market structure, etc.).
3Bars [TheAlphaGroup]3Bars Setup (Original by. Larry Williams)
The “3Bars” is a classic setup from Larry Williams, designed to capture short-term reversals within a larger trend. It uses very simple ingredients: moving averages of the highs and lows.
How It Works
Bands Calculation
– A short moving average (default = 3) is applied separately to the Highs and to the Lows.
– The average of the Lows forms the lower band .
– The average of the Highs forms the upper band .
Trade Logic
– In an uptrend (price above a longer MA, default = 21 EMA or SMA), the system looks for longs.
• Entry: Buy at the lower band.
• Exit: Sell at the upper band.
– In a downtrend (price below the 21 EMA/SMA), the system looks for shorts.
• Entry: Sell at the upper band.
• Exit: Cover at the lower band.
Safety Net
– If the trade doesn’t hit its band exit, it is force-closed after X bars (default = 7).
– Users can select SMA or EMA for both the bands and the trend filter.
– Direction can be toggled: Long only, Short only, or Both.
Why It’s Interesting
The method tries to ride the market “channel” between recent highs and lows.
It doesn’t chase breakouts, it waits for price to pull back into a band before positioning.
It’s rule-based and mechanical, which makes it easy to test and automate.
Disclaimer
This script is for educational and research purposes only .
It is not financial advice and does not guarantee profitability.
Always backtest on multiple markets and timeframes, and use proper risk management.
About the Yellow Warning Box
“Caution! This strategy may use look-ahead bias…”
Note: The warning shows because Pine doesn’t “trust” limit orders that are priced with data from completed bars. The current version is already safe (no repaint/look-ahead) , but TradingView cannot automatically confirm that.
To silence the warning, you’d need to shift all logic by one more bar ( ) or use market orders. But that sacrifices realism.
If you care about accurate band-based fills more than the warning box, it is safe to ignore it.
Rolling Highest + Qualified Ghost (price-synced)[돌파]English Guide
What this indicator does
Plots a rolling highest line hh = ta.highest(src, len) that step-changes whenever the highest value inside the last len bars changes.
When a step ends after being flat for at least minHold bars (a “plateau”), it draws a short horizontal ghost line for ghostLen bars to the right at the previous step level.
By default, the ghost appears only on step-down events (behaves like a short-lived resistance trace). You can allow both directions with the onlyOnDrop setting.
Everything is rendered with plot() series (not drawing objects), bound to the right price scale → it moves perfectly with the chart.
Inputs
len — Lookback window (bars) for the rolling highest.
basis — Price basis used to compute the highest: High / Close / HLC3 / OHLC4.
minHold — Minimum plateau length (bars). Only steps that stayed flat at least this long qualify for a ghost.
ghostLen — Number of bars to keep the horizontal ghost to the right.
onlyOnDrop — If true, make ghosts only when the step moves down (default). If false, also create ghosts on step-ups.
Visuals: mainColor/mainWidth for the main rolling highest line; ghostColor/ghostTrans/ghostWidth for the ghost.
How it works (logic)
Rolling highest:
hh = ta.highest(src, len) produces a stair-like line.
Step detection:
stepUp = hh > hh
stepDown = hh < hh
startUp / startDown mark the first bar of a new step (prevents retriggering while the step continues).
Plateau length (runLen):
Counts consecutive bars where hh remained equal:
runLen := (hh == hh ) ? runLen + 1 : 1
Qualification:
On the first bar of a step change, check previous plateau length prevHold = runLen .
If prevHold ≥ minHold and direction matches onlyOnDrop, start a ghost:
ghostVal := hh (the previous level)
ghostLeft := ghostLen
Ghost series:
While ghostLeft > 0, output ghostVal; otherwise output na.
It’s plotted with plot.style_linebr so the line appears as short, clean horizontal segments instead of connecting across gaps.
Why it stays synced to price
The indicator uses overlay=true, scale=scale.right, format=format.price, and pure series plot().
No line.new() objects → no “stuck on screen” behavior when panning/zooming.
Tips & customization
If your chart is a line chart (close), set basis = Close so visuals align perfectly.
Want ghosts on both directions? Turn off onlyOnDrop.
Make ghosts subtler by increasing ghostTrans (e.g., 60–80).
If ghosts appear too often or too rarely, tune minHold and len.
Larger minHold = only long, meaningful plateaus will create ghosts.
Edge cases
If len is very small or the market is very volatile, plateaus may be rare → fewer ghosts.
If the stair level changes almost every few bars, raise len or minHold.
한글 설명서
기능 요약
최근 len개 바 기준의 롤링 최고가 hh를 그립니다. 값이 바뀔 때마다 계단식(step)으로 변합니다.
어떤 계단이 최소 minHold봉 이상 유지된 뒤 스텝이 끝나면, 직전 레벨을 기준으로 우측 ghostLen봉짜리 수평선(고스트) 을 그립니다.
기본값은 하락 스텝에서만 고스트를 생성(onlyOnDrop=true). 꺼두면 상승 스텝에서도 만듭니다.
전부 plot() 시리즈 기반 + 우측 가격 스케일 고정 → 차트와 완전히 동기화됩니다.
입력값
len — 롤링 최고가 계산 윈도우(바 수).
basis — 최고가 계산에 사용할 기준: High / Close / HLC3 / OHLC4.
minHold — 플래토(같은 값 유지) 최소 길이. 이 이상 유지된 스텝만 고스트 대상.
ghostLen — 우측으로 고스트를 유지할 바 수.
onlyOnDrop — 체크 시 하락 스텝에서만 고스트 생성(기본). 해제하면 상승 스텝도 생성.
표시 옵션: 본선(mainColor/mainWidth), 고스트(ghostColor/ghostTrans/ghostWidth).
동작 원리
롤링 최고가:
hh = ta.highest(src, len) → 계단형 라인.
스텝 변화 감지:
stepUp = hh > hh , stepDown = hh < hh
startUp / startDown 으로 첫 바만 잡아 중복 트리거 방지.
플래토 길이(runLen):
hh가 같은 값으로 연속된 길이를 누적:
runLen := (hh == hh ) ? runLen + 1 : 1
자격 판정:
스텝이 바뀌는 첫 바에서 직전 플래토 길이 prevHold = runLen 가 minHold 이상이고, 방향이 설정(onlyOnDrop)과 맞으면 고스트 시작:
ghostVal := hh (직전 레벨)
ghostLeft := ghostLen
고스트 출력:
ghostLeft > 0 동안 ghostVal을 출력, 아니면 na.
plot.style_linebr로 짧은 수평 구간만 보이게 합니다(NA 구간에서 선을 끊음).
가격과 동기화되는 이유
overlay=true, scale=scale.right, format=format.price로 가격 스케일에 고정, 그리고 모두 plot() 시리즈로 그립니다.
line.new() 같은 도형 객체를 쓰지 않아 스크롤/줌 시 화면에 박히는 현상이 없습니다.
활용 팁
차트를 라인(종가) 로 보신다면 basis = Close로 맞추면 시각적으로 더욱 정확히 겹칩니다.
고스트가 너무 자주 나오면 minHold를 올리거나 len을 키워서 스텝 빈도를 낮추세요.
고스트를 더 은은하게: ghostTrans 값을 크게(예: 60–80).
저항/지지 라인처럼 보이게 하려면 기본 설정(onlyOnDrop=true)이 잘 맞습니다.
주의할 점
변동성이 큰 종목/타임프레임에선 플래토가 짧아 고스트가 드물 수 있습니다.
len이 너무 작으면 스텝이 잦아져 노이즈가 늘 수 있습니다.
Linear Regression by Uttamwith Buy Sell Signal with regression channel
with Buy Sell Signal with regression channel
with Buy Sell Signal with regression channel
with Buy Sell Signal with regression channel
Combined MOST + ATR MOST + ATR Combined indicator. This is published by interesting idea for my dad he tought that he combination of these two indicators gives a good result
The Profit Screener//@version=6
indicator(title="Profit Screener", shorttitle="Profit Screener", overlay=true)
//========================= ADR PART =========================//
// Current day ka open
dayOpen = request.security(syminfo.tickerid, "D", open , lookahead=barmerge.lookahead_on)
// Previous days ka range
r1 = request.security(syminfo.tickerid, "D", high - low , lookahead=barmerge.lookahead_on)
r2 = request.security(syminfo.tickerid, "D", high - low , lookahead=barmerge.lookahead_on)
r3 = request.security(syminfo.tickerid, "D", high - low , lookahead=barmerge.lookahead_on)
r4 = request.security(syminfo.tickerid, "D", high - low , lookahead=barmerge.lookahead_on)
r5 = request.security(syminfo.tickerid, "D", high - low , lookahead=barmerge.lookahead_on)
r6 = request.security(syminfo.tickerid, "D", high - low , lookahead=barmerge.lookahead_on)
r7 = request.security(syminfo.tickerid, "D", high - low , lookahead=barmerge.lookahead_on)
r8 = request.security(syminfo.tickerid, "D", high - low , lookahead=barmerge.lookahead_on)
r9 = request.security(syminfo.tickerid, "D", high - low , lookahead=barmerge.lookahead_on)
r10 = request.security(syminfo.tickerid, "D", high - low , lookahead=barmerge.lookahead_on)
// ADR averages
adr_10 = (r1+r2+r3+r4+r5+r6+r7+r8+r9+r10) / 10
adr_5 = (r1+r2+r3+r4+r5) / 5
// Plotting ADR (same day par)
adrhigh10 = plot(dayOpen + adr_10/2, title="ADR High10", style=plot.style_circles, color=color.red, linewidth=2)
adrlow10 = plot(dayOpen - adr_10/2, title="ADR Low10", style=plot.style_circles, color=color.green, linewidth=2)
adrhigh5 = plot(dayOpen + adr_5/2, title="ADR High5", style=plot.style_circles, color=color.red, linewidth=2)
adrlow5 = plot(dayOpen - adr_5/2, title="ADR Low5", style=plot.style_circles, color=color.green, linewidth=2)
fill(adrlow10, adrlow5, color=color.new(color.lime, 60))
fill(adrhigh10, adrhigh5, color=color.new(color.maroon, 60))
//========================= EMA PART =========================//
len = input.int(9, minval=1, title="EMA Length")
src = input(close, title="Source")
offset = input.int(title="Offset", defval=0, minval=-500, maxval=500)
out = ta.ema(src, len)
plot(out, title="EMA", color=color.blue, offset=offset)
// --- Smoothing Options
GRP = "Smoothing"
TT_BB = "Only applies when 'SMA + Bollinger Bands' is selected."
maTypeInput = input.string("None", "Type", options= , group=GRP)
maLengthInput = input.int(14, "Length", group=GRP)
bbMultInput = input.float(2.0, "BB StdDev", minval=0.001, maxval=50, step=0.5, tooltip=TT_BB, group=GRP)
isBB = maTypeInput == "SMA + Bollinger Bands"
enableMA = maTypeInput != "None"
ma(source, length, MAtype) =>
switch MAtype
"SMA" => ta.sma(source, length)
"SMA + Bollinger Bands" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
smoothingMA = enableMA ? ma(out, maLengthInput, maTypeInput) : na
smoothingStDev = isBB ? ta.stdev(out, maLengthInput) * bbMultInput : na
plot(smoothingMA, "EMA-based MA", color=color.yellow, display= enableMA ? display.all : display.none)
bbUpperBand = plot(smoothingMA + smoothingStDev, "Upper BB", color=color.green, display=isBB ? display.all : display.none)
bbLowerBand = plot(smoothingMA - smoothingStDev, "Lower BB", color=color.green, display=isBB ? display.all : display.none)
fill(bbUpperBand, bbLowerBand, color= isBB ? color.new(color.green, 90) : na)
SMA 50–200 Fill (Bull/Bear Colors)Overview
This TradingView Pine Script plots two simple moving averages (SMAs): one with a period of 50 and one with a period of 200. It also fills the area between the two SMAs. The fill color automatically changes depending on whether the 50-period SMA is above or below the 200-period SMA:
Bullish scenario (50 > 200): uses one color (bullFillColor)
Bearish scenario (50 < 200): uses another color (bearFillColor)
You can also customize the transparency of the filled area and the colors/widths of the SMA lines.
Key Parts of the Code
Inputs
src: The price source (default: close).
fastColor and slowColor: Colors for the 50- and 200-SMA lines.
bullFillColor and bearFillColor: The two fill colors used depending on whether the 50 SMA is above or below the 200 SMA.
fillTrans: The transparency of the fill (0 = fully opaque, 100 = fully transparent).
lwFast and lwSlow: Line widths of the 50- and 200-SMA lines.
Calculations
sma50 = ta.sma(src, 50)
sma200 = ta.sma(src, 200)
These two lines compute the moving averages of the chosen source price.
Plotting the SMAs
p50 and p200 use plot() to draw the SMA lines on the chart.
Each plot uses the chosen color and line width.
Dynamic Fill Color
A conditional determines which color to use:
fillColor = sma50 > sma200 ? color.new(bullFillColor, fillTrans) : color.new(bearFillColor, fillTrans)
If the 50 SMA is greater than the 200 SMA, the bullish color is used; otherwise, the bearish color is used.
Filling the Area
fill(p50, p200, color=fillColor) creates a shaded area between the two SMAs.
Because fillColor changes depending on the condition, the filled area automatically changes color when the SMAs cross.
How to Use It
Add to Chart: When you add this script to your chart, you’ll see the 50 and 200 SMAs with a shaded area between them.
Customize Colors: You can change line colors, fill colors, and transparency directly from the indicator’s settings panel.
Visual Cues: The fill color gives you an instant visual cue whether the short-term trend (50 SMA) is above or below the long-term trend (200 SMA).
Benefits
Gives a clear, simple visual representation of the trend’s strength and direction.
The customizable transparency lets you make the shading subtle or bold depending on your chart style.
Works on any time frame or instrument where you’d like to compare a short-term and long-term moving average.
ADX (Colored by Slope)ADX coloured by slope. If increases it will be green , else red. Default is 28,28.
Futures Time Zones with Session SelectionMark the time period with color to help traders identify the trading range.