MA Smart SyncMA Smart Sync determines the market bias by evaluating the price position relative to a moving average channel on four independent timeframes and returning a confluence signal when a configurable number of them agree.
Unlike standard MTF trend indicators that rely on EMA crossovers or slope direction, this script builds a channel around each timeframe and classifies price into three discrete zones: above, below, or inside. The "inside" state acts as a neutral filter, preventing false confluence signals during consolidation — a key distinction from binary up/down dashboards.
The channel itself can be constructed using five different methods selectable from a single input: High/Low MA (separate MAs applied to high and low), Close ± ATR, Close ± Standard Deviation, Close ± percentage offset, or classic Bollinger Bands. All five use the same MA type and length inputs, making it straightforward to compare how different volatility envelopes behave on the same instrument without rebuilding the indicator.
How to use:
— Set four timeframes matching your trading plan (defaults: 15m, 1h, 4h, D).
— Choose the channel method that fits your instrument's volatility profile. ATR-based channels adapt well to forex; StdDev and Bollinger suit equities and indices.
— Set "Minimum Confluence" to 3 or 4. A value of 4 means all timeframes must agree before a signal fires.
— The background color and arrow labels update only when bias changes, keeping the chart clean.
— Use the status table (top-right) to monitor each timeframe independently and identify which TFs are lagging.
المتوسط المتحرك البسيط
Adaptive Trend Checklist (EMA + Supertrend + ADX)Adaptive Trend Checklist is a market context and validation tool designed for discretionary traders who prioritize structure, risk control, and trade quality over aggressive signal chasing.
The script combines EMA, Supertrend, and ADX, with optional multi-timeframe (HTF) confirmation, to provide a clear view of market conditions before entering a trade.
This is not a signal-spamming indicator.
It is a visual checklist that helps identify when to trade, when to reduce risk, and when to stay out of the market.
🔹 Key Features
🔁 Automatic timeframe adaptation
Parameters (EMA, ATR, ADX, Supertrend) automatically adjust based on the current chart timeframe.
🧠 Trend & range filtering
Uses ADX and price structure to filter out ranging and low-probability market conditions.
⏱️ Multi-timeframe market context (optional)
Confirms directional bias using higher timeframes.
🧮 Risk classification
Trades are classified as:
NORMAL
REDUCED
NO TRADE
📋 Clear visual checklist
Displays in real time:
trading mode,
trend status,
ADX condition,
market session,
recommended risk level.
🎯 Integrated trade management
Automatically plots:
Entry
Stop Loss
Take Profits (TP1, TP2, TP3)
Position size in dollars based on selected risk.
🚫 No repaint
🚫 No signal spam
🚫 No win-rate promises
⚠️ Important Notice
This script is not intended for fully mechanical or automated trading.
It is designed as a decision-support tool for traders who understand market structure, context, and risk management.
Performance depends on:
market conditions,
timeframe,
and trader discipline.
👤 Who Is This For?
✔️ Discretionary traders
✔️ Scalpers & intraday traders seeking better filters
✔️ Swing traders needing HTF context
❌ Not recommended for blind signal following
📎 Usage Recommendation
Use it as a primary market filter, not as a standalone signal.
Combine it with your own entry criteria.
EMA SMA LinesThis script draws 3 EMA lines and 2 SMA lines and each line has label attached to it. It is configurable.
Bull/Bear Volume DiagramOverview
This indicator displays trading volume in a mirrored diagram that separates bullish and bearish activity. Bullish candle volume is plotted above the center line, while bearish candle volume is plotted below it. This layout helps visualize market participation and directional pressure in a more intuitive way than traditional volume histograms.
How It Works
The indicator evaluates each candle and determines whether it is bullish or bearish based on its open and close prices:
If the candle closes above its open, its volume is plotted upward.
If the candle closes below its open, its volume is plotted downward.
Each side is color-coded independently to clearly distinguish buying and selling pressure.
Additionally, the indicator calculates a moving average of volume separately for bullish and bearish candles. These averages help identify trends in directional volume strength and allow traders to compare buyer versus seller dominance over time.
Features
Mirrored bullish and bearish volume visualization
Independent color customization for bullish and bearish volume
Directional volume moving averages
Clear separation of buying and selling activity
Lightweight and responsive calculation
How To Use
This indicator can help traders:
Identify which side of the market is dominating volume
Detect shifts in buying or selling pressure
Compare momentum between bullish and bearish participation
Observe volume trends more clearly than with standard volume bars
Notes
Volume is classified using candle direction, not order flow or tick data.
Results may vary depending on timeframe and market type.
This indicator is intended as a visual analysis tool and should be combined with other technical analysis methods.
Multiple SMA (Configurable + Labels)This script allow display up to 4 SMA lines. Users can configure the input values for each SMA line.
SPY 200SMA +4% Entry -3% Exit TQQQ/QLD/GLDM THREE PHASE STRATEGYWanted to take a look at all of the individual trades and provide a series of options to balance performance and risk. This post is expanding on my previous one - www.reddit.com
Here is the data and the backtesting splitting the strategy into three primary phases with multiple options and exact trade dates to help people easily backtest other combinations - docs.google.com (Three Tabs with the three phases)
If you just want my personal recommendations this would be what I will be using -
PHASE 1 (Strategy BUY signal triggers when SPY price crosses +4% over the SPY 200SMA) = 100% TQQQ
If trade lasts 366 days (Long Term Cap Gains) go to PHASE 2
If SPY price crosses below -3% SPY 200SMA go to PHASE 3
PHASE 2 (PHASE 1 lasts 366 days) = Deleverage and diversify into 50% QLD & 50% GLDM
PHASE 3 (Strategy SELL signal triggers when SPY price crosses -3% below the SPY 200SMA) = Defensive posture with 50% SGOV & 50% GLDM
As market degrades start selling SGOV and buying QQQ until 50% QQQ & 50% GLDM
TradingView Script for the THREE PHASE STRATEGY (imgur.com):
//
@version=
5
strategy("SPY 200SMA +4% Entry -3% Exit Strategy",
overlay=true,
default_qty_type=strategy.percent_of_equity,
default_qty_value=100)
// === Inputs ===
smaLength = input.int(200, title="SMA Period", minval=1)
entryThreshold = input.float(0.04, title="Entry Threshold (%)", step=0.01)
exitThreshold = input.float(0.03, title="Exit Threshold (%)", step=0.01)
startYear = input.int(1995, "Start Year")
startMonth = input.int(1, "Start Month")
startDay = input.int(1, "Start Day")
// === Time filter ===
startTime = timestamp(startYear, startMonth, startDay, 0, 0)
isAfterStart = time >= startTime
// === Calculations ===
sma200 = ta.sma(close, smaLength)
upperThreshold = sma200 * (1 + entryThreshold)
lowerThreshold = sma200 * (1 - exitThreshold)
// === Strategy Logic ===
enterLong = close > upperThreshold
exitLong = close < lowerThreshold
if isAfterStart
if enterLong and strategy.position_size == 0
strategy.entry("Buy", strategy.long)
if exitLong and strategy.position_size > 0
strategy.close("Buy")
// === 366-Day Marker Logic (Uninterrupted) ===
var
int
targetTime = na
// 1. Capture entry time only when a brand new position starts
if strategy.position_size > 0 and strategy.position_size == 0
targetTime := time + (366 * 24 * 60 * 60 * 1000)
// 2. IMPORTANT: If position is closed or a sell signal hits, reset the timer to "na"
if strategy.position_size == 0
targetTime := na
// 3. Trigger only if we are still in the trade and hit the timestamp
isAnniversary = not na(targetTime) and time >= targetTime and time < targetTime
// === Visuals ===
p_sma = plot(sma200, title="200 SMA", color=color.rgb(255, 0, 242))
p_upper = plot(upperThreshold, title="Entry Threshold (+4%)", color=color.rgb(0, 200, 0))
p_lower = plot(lowerThreshold, title="Exit Threshold (-3%)", color=color.rgb(255, 0, 0))
fill(p_sma, p_upper, color=color.new(color.green, 80), title="Entry Zone")
// Draw marker only if 366 days passed without a sell
if isAnniversary
label.new(bar_index, high, "366 DAYS - PHASE 2", style=label.style_label_down, color=color.yellow, textcolor=color.black, size=size.small)
// === Entry/Exit Labels ===
newOpen = strategy.position_size > 0 and strategy.position_size == 0
newClose = strategy.position_size == 0 and strategy.position_size > 0
if newOpen
label.new(x=bar_index, y=low * 0.97, text="BUY - PHASE 1", xloc=xloc.bar_index, yloc=yloc.price, color=color.lime, style=label.style_label_up, textcolor=color.black, size=size.small)
if newClose
label.new(x=bar_index, y=high * 1.03, text="SELL - PHASE 3", xloc=xloc.bar_index, yloc=yloc.price, color=color.red, style=label.style_label_down, textcolor=color.white, size=size.small)
200 SMA SPY Trading Range Bands Script:
//
@version=
5
indicator("200 SMA SPY Trading Range Bands", overlay=true)
// === Settings ===
smaLength = input.int(200, title="SMA Length")
mult1 = input.float(1.09, title="Multiplier 1 (9% Over)")
mult2 = input.float(1.15, title="Multiplier 2 (15% Over)")
// === Calculations ===
smaValue = ta.sma(close, smaLength)
line9Over = smaValue * mult1
line15Over = smaValue * mult2
// === Plotting ===
plot(smaValue, title="200 SMA", color=color.gray, linewidth=1, style=plot.style_linebr)
plot(line9Over, title="9% Over 200 SMA", color=color.rgb(255, 145, 0), linewidth=1)
plot(line15Over, title="15% Over 200 SMA", color=color.rgb(38, 1, 1), linewidth=2)
Kaste Trend MA (Bullish/Bearish)This indicator plots a moving average on top of the price chart and changes its color based on market trend direction.
When the moving average is rising, it turns green to indicate a bullish market.
When the moving average is falling, it turns red to indicate a bearish market.
The trend is determined by the slope of the moving average, making it a simple and clear visual trend indicator.
Bollinger Bands + 5 Flexible MA [Ahorrador de Espacio]Description:
This "All-in-One" indicator combines classic Bollinger Bands with up to 5 fully customizable Moving Averages (MA) in a single script.
Designed specifically for traders who want to maximize their technical analysis setup without using up multiple indicator slots (ideal for Basic/Free plan users).
Key Features:
Bollinger Bands: Standard configuration (SMA 20, StdDev 2) with visual contact alerts (Triangles).
5 Independent Moving Averages:
Toggle On/Off: Activate only the lines you need.
Total Flexibility: Choose between SMA (Simple) or EMA (Exponential) for each individual line.
Customization: Full control over length, color, and line thickness.
Clean Interface: MAs 4 and 5 are disabled by default to keep your chart clean, but are ready to be activated in the settings.
How to Use:
Add the indicator to your chart.
Open the Settings (gear icon).
Select which MAs you want to display (e.g., SMA 200 for trend, EMA 9 for scalping).
Use at your own discretion as a confluence tool for trend and volatility.
Note: This script is a visualization tool. The band signals (triangles) indicate price touching the outer bands, which can signify either a potential reversal or trend continuation depending on the market context.
Multi Moving Averages (EMA / SMA Toggle) ConfigurableMulti Moving Averages (EMA / SMA Toggle) is a lightweight and highly configurable indicator designed to plot up to three moving averages on your chart with a clean and minimalist input panel.
The indicator allows you to switch seamlessly between Exponential Moving Averages (EMA) and Simple Moving Averages (SMA) using a single toggle, while preserving the same lengths, sources, and visual settings. Each moving average can be independently shown or hidden and fully customized for color, line width, and plot style.
This tool is ideal for traders who rely on multiple moving averages for trend identification, dynamic support and resistance, pullback analysis, and crossover-based strategies, while keeping their charts uncluttered and easy to read.
Key Features
Plot up to three moving averages
Global EMA / SMA toggle
Individual show / hide control for each MA
Customizable length, source, color, width, and style
Minimalist input layout with low scrolling
Fully compatible with the Style panel
Whether you prefer fast-reacting EMAs or smoother SMAs, this indicator adapts instantly to your workflow without requiring multiple indicators or duplicate settings.
Multi-TF MA Master (10 MA or EMAs)Tired of adding multiple scripts just to see a few moving averages? This all-in-one tool lets you run up to 10 fully customizable MAs—including SMA, EMA, and independent timeframes like 200W or 150M—within a single indicator.
Swing a jeanmiche-au dessus de ça smma 100
-stochastique qui croise sous 25
-volume au dessus de la moyenne.
SMAs (10,50,100,150,200) by Vega updated by YogiI just took the script created by Vega and added 150 sma.
Fibonacci EMA/SMA SystemFibonacci EMA/SMA System
Overview
A clean, customizable moving average indicator built around Fibonacci-based EMA and SMA stacks. Designed for trend identification across multiple timeframes using mathematically harmonious period lengths. Enable one or more stacks based on your trading timeframe. Use Fast + Core for intraday/swing. Add Macro for higher timeframe context.
Stacks
Fast (8/13/21) — Momentum, short-term trend
Core (21/34/55) — Pullbacks, swing trading
Full Trend (13/21/34/55/89) — Trend strength, compression/expansion
Macro (55/89/144) — Position trading, regime context
Standard (20/50/100/200) — Traditional reference levels
Options
MA Type — EMA or SMA
Price Source — Close, HL2, HLC3, OHLC4, etc.
Uniform Color — Apply single color to all active lines
Individual Colors — Set unique color per line in each stack
Line Style — Solid or Dotted
Line Width — 1–4 pixels
Fill — Shaded area between outer EMAs
Labels — Period numbers displayed at line ends
VIX Crossing# VIX Crossing Strategy
## Overview
VIX Crossing is a quantitative trading strategy that combines volatility signals from the VIX index with trend confirmation from the Nasdaq-100 (NDX) to generate long entry signals. The strategy employs multiple exit conditions to manage risk and lock in profits systematically.
## Strategy Logic
### Entry Condition
The strategy initiates a long position when:
- **VIX Crossunder**: The VIX closing price crosses below its 5-bar simple moving average (SMA), signaling a decrease in implied volatility
- **AND NDX Confirmation**: The Nasdaq-100 closes above its 21-bar exponential moving average (EMA), confirming uptrend strength
This dual-signal approach reduces false entries by requiring both volatility normalization and positive market momentum.
### Exit Conditions
The strategy automatically closes positions when any of the following conditions are met:
1. **VIX Crossover (Volatility Exit)**: VIX closes above its SMA, indicating rising volatility
2. **Time-Based Exit**: Position is force-closed after 10 bars from entry, preventing prolonged drawdowns
3. **Take-Profit Exit**: Position closes when unrealized profit exceeds $3,000 per contract
4. **Stop-Loss Exit**: Position closes when unrealized loss exceeds $1,500 per contract
Exit conditions are evaluated each bar while the position is open, with explicit logging of the exit reason for trade analysis.
## Configuration Parameters
| Parameter | Default | Purpose |
|-----------|---------|---------|
| VIX SMA Length | 5 | Smoothing period for VIX volatility baseline |
| NDX EMA Length | 21 | Smoothing period for Nasdaq-100 trend confirmation |
| Force Close After X Bars | 10 | Maximum holding period in bars |
| TP Amount per Contract | $3,000 | Profit target per contract |
| SL Amount per Contract | $1,500 | Loss limit per contract |
## Risk Management Features
- **Position Sizing**: Capital allocation based on profit/loss per contract rather than fixed units, allowing for scalable risk
- **Dual Risk Controls**: Combined time-based and price-based exits prevent extended exposure
- **Profit Asymmetry**: 2:1 profit-to-loss ratio encourages risk/reward discipline
- **Contract-Based Accounting**: Profit targets and stop losses scale with position size
## Capital Requirements
- **Initial Capital**: $50,000
- **Commission**: $3 per contract (cash-based)
- **Instrument**: Designed for index-based derivatives or equities with liquid options markets
## Technical Indicators Used
- Simple Moving Average (SMA) for VIX smoothing
- Exponential Moving Average (EMA) for NDX trend detection
- Crossover/Crossunder detection for signal generation
## Underlying Assumptions
1. VIX crossunder events represent mean-reversion opportunities in Nasdaq-heavy portfolios
2. NDX EMA confirmation filters out uncorrelated volatility spikes
3. 10-bar holding period aligns with typical mean-reversion timeframes
4. Contract-based profit targets accommodate varying leverage levels
BNF (Kotegawa) Strategy [CB Algos]STRATEGY: BNF (Kotegawa) Mean Reversion Strategy
DEVELOPED BY: CB Algos
DESCRIPTION:
This indicator replicates the trading style of Takashi Kotegawa (BNF).
It calculates the percentage deviation of the price from the 25-period SMA.
HOW TO USE:
1. Look for 'Lime' bars (Extreme Buy) or 'Teal' bars (Moderate Buy). These indicate the price has dropped significantly below the average.
2. Look for 'Red' bars (Extreme Sell) as profit-taking zones.
3. Use the Info Panel to see the exact current deviation %.
Tao of Trading Moving Averages (MM)This is the Tao of Trading script with color shifts for Muffin Man's color needs.
RS Proxy Suite (Sector-Weighted) - by kuokkuokIndicator Description
RS Proxy Suite (Sector-Weighted) is a Pine Script indicator for TradingView, designed for stock traders to calculate a stock's Relative Strength (RS) proxy score. This indicator simulates a market proxy universe by weighting multiple sector ETFs, evaluating a stock's strength relative to a benchmark like the SPX. Inspired by the M.E.T.S. (Multiple Edge Trading Strategy) system, it helps users identify market-leading stocks, potential breakout opportunities, and low-risk entry points.
Key Features and Benefits:
RS Proxy Rating (1–99 Score): Computes the stock's RS score (higher is stronger), aiding in screening super-strong stocks. A score above 80 indicates the stock outperforms most peers, making it a prime buy candidate.
RS Line and Blue Dot Divergence: Displays the RS line trend and marks RS-leading new high divergences. This acts like an "early warning light," signaling potential low-risk entries (e.g., when RS hits a new high but price hasn't caught up yet).
Sector-Weighted Design: Integrates Growth, Cyclical, Defensive, and Policy ETFs to simulate a comprehensive market environment. Weights are adjustable for flexibility across market phases.
Dashboard Display: A concise panel shows RS Rating, RS Trend, and Blue Dot status for quick decision-making.
Application Scenarios: Ideal for technical analysts to screen leaders, spot trend reversals, or confirm breakouts with VCP patterns (Volatility Contraction Patterns). Its strength lies in avoiding single-index bias for more stable RS assessments.
This indicator avoids subjective judgments, relying on quantitative momentum calculations to help traders "go with the flow" and reduce false breakout risks. Shared for community use—feedback welcome for improvements.
User Manual -
This manual guides you on installing and using the RS Proxy Suite (Sector-Weighted) indicator on TradingView. It's suited for daily or weekly charts, applicable to US stocks or markets correlated with SPX. Ensure your TradingView account supports Pine Script v6.
1. Installation Steps
Step 1: Log in to TradingView and open the Chart page.
Step 2: Click the "Indicators" button in the top toolbar, search for "RS Proxy Suite (Sector-Weighted)" (or paste the Pine Script code into the Pine Editor and add it).
Step 3: If installing from the Community Scripts library, click "Add to Chart"; for custom code, save and add to the chart.
Step 4: The indicator will appear below the chart (overlay=false). Confirm no error messages.
2. Parameter Adjustment Guide
The indicator offers multiple input parameters in TradingView's "Settings" panel. Defaults are optimized, but adjust based on market conditions. Here's a grouped breakdown:
Data Source:
Market Index SPX: Default "SP:SPX", changeable to other indices (e.g., "TVC:NDX").
Calculation Price: Default close (closing price), switch to high/low/open for sensitivity tweaks.
RS Momentum Periods (Adjustable):
Short Term (Default 63 days): Short-term momentum; larger values smooth it out.
Medium Term (Default 126 days): Mid-term momentum.
Long Term (Default 252 days): Long-term momentum for capturing major trends.
Momentum Weights:
Short Term Weight: Default 0.4, emphasizes recent performance.
Medium Term Weight: Default 0.2.
Long Term Weight: Default 0.4. Sum doesn't need to be 1; system normalizes automatically.
Sector Weights: Each ETF weight is independently adjustable (step 0.1). Defaults reflect sector importance, e.g., higher for growth ETFs.
XLK Weight (Technology): Default 1.5.
SOXX Weight (Semiconductors): Default 1.3.
XLY Weight (Consumer Discretionary): Default 1.2.
XLC Weight (Communication Services): Default 1.1.
XLG Weight (Large Cap Growth): Default 1.3.
XLI Weight (Industrials): Default 1.0.
XLF Weight (Financials): Default 1.0.
XLB Weight (Materials): Default 0.9.
XLE Weight (Energy): Default 0.9.
XLV Weight (Health Care): Default 0.8.
XLP Weight (Consumer Staples): Default 0.8.
XLU Weight (Utilities): Default 0.7.
XLRE Weight (Real Estate): Default 0.7.
PPA Weight (Aerospace & Defense): Default 0.9.
Adjustment Tips: Boost XLK/SOXX for tech-favorable markets; increase XLV/XLP for defensive phases.
Visualization Settings:
Show RS Line: Displays RS line (black) and 50-day MA (gray).
Show Blue Dot Divergence (Blue Dot): Marks divergence signals.
Show Dashboard: Enables the dashboard.
Dashboard Position: Choose locations like "Bottom Right".
3. Output Interpretation
RS Line: Black line shows stock strength vs. SPX; upward trend means outperforming. Gray line is 50-day MA—breaking above signals strength.
Blue Dot: Blue circle appears for RS leading price new highs (like a "coiled spring"), indicating potential low-risk entries. Confirm with: RS > 50-day MA and volume surge.
Dashboard:
RS Rating: Score 1–99; green (>80) for strong, yellow (50–80) neutral, red (<50) weak.
RS Trend: Green "Strong" or red "Weak".
Blue Dot: Blue "Present" or red "None".
Interpretation Analogy: RS Rating is like a stock's "health score"—above 80 is an "athlete" worth tracking for breakouts; Blue Dot is a "green light," but pair with volume to confirm true breakouts (avoid fakes).
4. Usage Examples
Screening Leaders: Add to AAPL chart—if RS Rating > 85 and Blue Dot appears, check if price nears VCP pivot; this is a low-risk buy setup.
Trend Judgment: Rising RS line with M.E.T.S. Stage 2 (uptrend) confirms trend-following trades.
Weight Tweaks: For defensive markets, raise XLV/XLU weights and recalculate RS Proxy.
5. Common Issues and Warnings
Q: Indicator not showing? A: Verify ETF symbols (e.g., AMEX:XLK) or switch timeframes.
Q: Inaccurate scores? A: Adjust periods/weights and backtest on historical data.
Q: Avoiding false breakouts? A: Combine with volume and support/resistance; Blue Dot is a alert, not a buy signal.
Warnings: Based on historical data; markets are volatile—use with other tools. Results are for reference only, not investment advice. Test in a demo account.
10x Multi-Timeframe SMA Suite📊 Professional Multi-Timeframe Simple Moving Average Indicator
Track up to 10 independent Simple Moving Averages from different timeframes on a single chart with full customization control.
✨ KEY FEATURES:
- 10 independent SMA lines
- Individual timeframe selection for each SMA (Daily, Weekly, Monthly, 4H, 1H, etc.)
- Flexible source options (Close, Open, High, Low, HL2, HLC3, OHLC4)
- Fully customizable colors
- Adjustable line thickness (1-5)
- Toggle on/off for each SMA
- Clean and intuitive interface
- Optimized for performance
🎯 DEFAULT SETTINGS:
First 4 SMAs are enabled by default:
- SMA 1: 200-period Daily (Red)
- SMA 2: 50-period Weekly (Blue)
- SMA 3: 100-period Weekly (Green)
- SMA 4: 200-period Weekly (Orange)
Additional 6 SMAs are ready to activate and customize as needed!
💡 PERFECT FOR:
- Multi-timeframe trend analysis
- Support and resistance level identification
- Long-term and short-term momentum tracking
- Professional traders who need multiple MAs simultaneously
⚡ Simple to use, powerful in functionality - All your moving averages in one indicator!
Daily SMA (Historical Plotting with RTH/ETH, (5))Daily SMA (RTH/ETH Dynamic Session Handling) — Midnight + RTH Open Locks
This indicator plots projected daily Simple Moving Averages (SMAs) on intraday charts by anchoring calculations to a Regular Trading Hours (RTH) daily SMA reference, while visualizing how the daily SMA evolves intraday during Extended Trading Hours (ETH) and RTH sessions.
When daily SMAs are evaluated strictly at the daily timeframe, they do not form a continuous intraday history and may appear flat on historical intraday bars until realtime bars begin updating. This script visualizes the daily SMA’s intraday progression while keeping the underlying daily SMA reference unchanged.
Purpose
Standard daily SMAs plotted on intraday charts are evaluated at the daily timeframe and therefore do not form a continuous intraday history. When charts are refreshed or reloaded, these values may appear flat until realtime data resumes.
This script addresses that visualization limitation by projecting the daily SMA across historical and realtime intraday bars, while keeping the daily SMA reference intact.
How it works
• Daily SMA seed values are sourced exclusively from an RTH-only daily timeframe series.
• At ETH midnight, the SMA seed is locked using completed daily closes from the RTH daily series.
• At the RTH open, the seed is re-locked using the completed RTH daily window.
• After each seed event, the SMA is projected intraday using the active chart bar’s price.
Price semantics
• Historical bars use fully closed candle data only.
• The realtime bar uses the last traded price until the candle closes.
• Once a bar closes, its value is final and does not repaint.
Higher-timeframe data usage
• request.security() is used intentionally to access daily SMA data.
• lookahead=barmerge.lookahead_on is used only to reference the developing daily timeframe value during the active session for projection purposes.
• No future bars are accessed and no historical values are retroactively altered.
Data integrity
• SMA seed values are derived solely from the daily timeframe and do not depend on intraday bar history.
• SMA values are computed forward from the locked seed and do not revise prior bars.
• If insufficient daily history exists for a symbol, values safely return na.
Scope and limitations
• Intended for chart timeframes up to and including daily.
• Designed for instruments with defined RTH sessions (such as equities and equity-based products).
• This script does not replace or modify the underlying daily SMA reference; it visualizes an intraday projection anchored to the RTH daily SMA.
Other notes
• Pine Script version: v6
• No future data access
• No historical repainting; only the active realtime bar updates until close
6 Moving Averages (SMA, WMA, EMA etc.)6 Moving Averages is a simple and flexible overlay indicator that lets you plot up to six moving averages on the price chart. Each moving average can be customized by type (SMA, EMA, WMA, etc.), length, color, and visibility, making it ideal for trend analysis, dynamic support and resistance, and moving-average confluence across any market or timeframe.
EMA 8 48 System v1Short Description:
A trend-following indicator using EMA crossovers, ATR-based volatility filter, and a cooldown period to reduce false signals. Designed for clear buy/sell signals in trending markets.
Full Description:
What is this indicator?
This script implements a dual EMA crossover system (8-period and 48-period EMAs) with a trend filter (EMA200), ATR-based volatility filter, and a cooldown period to avoid overtrading.
It visually plots EMAs, buy/sell signals, and ATR-based stop loss/target levels.
Why is it useful?
Helps traders identify high-probability trend entries and avoid choppy, low-volatility conditions.
Reduces false signals by requiring trend confirmation, sufficient volatility, and spacing out trades.
Suitable for intraday and swing trading on most liquid assets.
When to use:
Best used in markets showing clear trends (not sideways).
Works on most timeframes, but higher timeframes (15m, 1h, 4h, daily) tend to give more reliable signals.
How to spot buy and sell:
Buy: Green “BUY” label appears when EMA8 crosses above EMA48, price is above EMA200, and ATR is above the minimum threshold.
Sell: Red “SELL” label appears when EMA8 crosses below EMA48, price is below EMA200, and ATR is above the minimum threshold.
ATR-based stop loss and target levels are plotted for each signal.
Additional tips:
Adjust the minimum ATR and cooldown settings to match your asset’s volatility and your trading style.
Use in conjunction with price action or higher timeframe analysis for best results.
Avoid trading during low volatility or sideways markets, as signals may be less reliable.
Always backtest and forward-test before using live.
How to add signals and update settings:
Use the script’s input panel to adjust EMA lengths, ATR settings, minimum ATR, and cooldown period.
To add alerts, use TradingView’s “Add Alert” feature and select the buy or sell conditions from the script’s alert options.
For further customization, you can edit the script to add additional filters or notification logic.
This indicator is for educational purposes only. Always use proper risk management and do your own research before trading.
Disclaimer:
This script is for informational and educational purposes only and does not constitute financial advice or a recommendation to buy or sell any financial instrument.
Trading involves risk. Past performance is not indicative of future results. Always do your own research and use proper risk management.
The author is not responsible for any losses incurred from the use of this script. By using this script, you agree to take full responsibility for your trading decisions.






















