Session HL + Candles + AMD (Nephew_Sam_)Session HL + Candles + AMD (Nephew_Sam_)
This indicator marks out intraday sessions summarized into single candles, with an additional option to mark out the HL of each session. Perfect for understanding AMD within a glance (accumulation-manipulation-distribution)
Features:
Session High/Low lines with customizable colors and labels
Optional session candles displayed on the right side of the chart
Timezone support for global traders
Customizable bull/bear candle colors
Works on timeframes up to 1 hour
Perfect for:
Identifying session liquidity levels
Tracking session ranges and breakouts
Multi-timeframe session analysis
ICT methodology traders
Settings:
Choose your timezone for accurate session detection
Toggle session candles and HL lines independently
Customize colors, line styles, and labels
Set maximum timeframe (up to 1 hour)
Corak carta
Squeeze Breakout Pro🔥 What This Script Does
This is a Breakout Strength Scanner with Squeeze + Pattern Range + Volume Confirmation + Risk Management + Take Profits.
✅ Core Functions:
Squeeze Detector:
Finds low volatility zones using Bollinger Band width compression.
Marks them with a “Squeeze” label — this signals that a big move is likely coming soon.
Pattern Range Detection:
Automatically identifies recent pivot highs (resistance) and pivot lows (support) using the pivotLen.
Draws the current consolidation range visually with horizontal lines.
Breakout Confirmation:
Requires:
✅ A break above resistance or below support.
✅ Confirmed with above-average volume.
✅ Must occur while in a volatility squeeze.
Plots arrows:
🔼 Green Up Arrow = Confirmed Bullish Breakout.
🔽 Red Down Arrow = Confirmed Bearish Breakout.
Trade Management Built-In:
Stop Loss: Just beyond the opposite side of the pattern range.
Take Profits:
✅ TP1 = 1.5x risk.
✅ TP2 = 2x risk.
Position Size Calculator:
Based on your input account size (accountBal) and risk percentage (riskPct).
Shows how many contracts, shares, or units to buy/sell to risk exactly that % of your account.
Higher Timeframe Trend Filter:
Default is 4-hour trend filter (can be changed).
✅ Only shows if the higher timeframe trend is Bullish (EMA50 > EMA200) or Bearish.
Displayed on the dashboard.
📊 How to Use It Step-By-Step
🟧 1. Look for a Squeeze:
A “Squeeze” label will appear.
This means price is coiled tight — a breakout is likely.
🟩 2. Wait for a Breakout Arrow:
🔼 Green Arrow: Bullish breakout (price breaks resistance + volume confirms + squeeze active).
🔽 Red Arrow: Bearish breakout (price breaks support + volume confirms + squeeze active).
🟥 3. Check the Dashboard:
✅ Trend Bias: Should ideally match your breakout.
If the higher timeframe is Bullish, long breakouts have better odds.
If Bearish, short breakouts are higher probability.
✅ Vol Confirm: Will say “Yes” if the volume condition is met.
🏹 4. Manage the Trade (Auto Levels):
The script draws:
🔴 Stop Loss Line (below range for longs, above for shorts).
🟢 Take Profit 1 (1.5x risk).
🟢 Take Profit 2 (2x risk).
Use these as guidelines for exits.
💰 5. Use Position Size Display:
Check the TP and SL distances and the suggested position size based on your account balance and risk percentage.
🚀 Pro Tips for Maximum Success
✅ Use Trend Confluence:
Only trade long breakouts when the higher timeframe trend is Bullish (EMA50 > EMA200).
Only trade short breakouts when the higher timeframe trend is Bearish.
✅ Avoid Fakeouts:
If a breakout arrow forms but the candle closes far away from the pattern breakout — wait for a retest or confirmation.
Higher volume + clean breakout works better than low-volume squeezes.
✅ Best Timeframes:
4H to Daily: For swing trades.
15m to 1H: For intraday trades (adjust htf to "240" for 4H trend confirmation even on lower charts).
✅ Increase Win Rate:
Use this script with key support/resistance zones, weekly ranges, or fib retracements.
Breakouts that happen near macro key levels have the highest follow-through.
✅ Set Alerts:
Right-click the breakout arrow or use alertcondition() events in the script.
Set alerts for:
📈 Breakout UP
📉 Breakout DOWN
🏹 Squeeze Active (prep for breakout)
✅ Walk Away Once In:
Let TP1 or TP2 hit.
Or move stop to breakeven after TP1 hits for free runners.
🔥 What Makes This Script Powerful:
Combines price action (pattern range) + volatility squeeze + volume confirmation + trend bias + risk management.
Most traders use these individually. This does it all in one clean tool.
💎 Professional Edge:
This is the type of script that turns reactive trading into systematic trading. No guessing. Clean rules. Repeatable.
DTC AIO [India]✨ DTC AIO — The Ultimate All-in-One Market Intelligence Suite
DTC AIO isn’t just another indicator—it’s a complete market intelligence dashboard, purpose-built for Indian equities. Designed for traders who demand more than just signals, DTC AIO fuses professional-grade analytics, pattern recognition, and actionable insights into a single, visually stunning overlay.
✨ What Makes DTC AIO Unique?
All-in-One Dashboard: No more juggling multiple indicators. DTC AIO brings together volatility, volume, trend, momentum, pattern recognition, and even earnings data—right on your chart.
Dynamic Visuals: Modern, theme-adaptive tables and color-coded highlights make complex data instantly readable, whether you prefer dark or light mode.
Pattern Powerhouse: Go beyond the basics with advanced pattern detection—mini-coils, inside bars (with candle coloring!), pocket pivots, and strict shakeout logic.
Burst Ranker: Proprietary “Power Gauge” quantifies explosive price action (+5%, +10%, +17% days) and visualizes it with a unique scoring system.
Earnings Intelligence: See quarterly EPS and sales, with YoY and optional QoQ growth, in a clean, auto-updating table—no more hunting for fundamentals.
Sector/Industry Awareness: Instantly know the context of any stock with sector and industry tags, right on your chart.
Customizable Everything: From moving average types to table positions and text sizes, DTC AIO adapts to your workflow.
🚀 Feature Highlights
Main Metrics Table: ADR%, Relative Volume, 50D Avg Volume, U/D Ratio, and RS vs. custom benchmarks.
Momentum Table: See price distance from key EMAs and 52-week highs/lows, color-coded for clarity.
Pattern Recognition: Mini-coil, inside bar (with painted colored bar), pocket pivot, and shakeout detection—each with visual cues.
Burst Ranker Table: Track and score high-momentum days over your chosen lookback period.
Earnings & Sales Table: Quarterly EPS and sales, YoY and optional QoQ growth, all in one place.
Sector/Industry Table: Know the bigger picture at a glance.
🛠️ Built for the Demanding Trader
DTC AIO is engineered for those who want a true edge—combining technical, fundamental, and behavioral analytics in a single, elegant package. Whether you’re scanning for breakouts, tracking momentum, or analyzing earnings, DTC AIO is your all-in-one solution.
Ready to level up your trading? Add DTC AIO to your chart and experience the difference.
Base Finder ProFind bases easily with Base finder pro. For each bases, plots length and depth of the bases.
Renko Color Change AlertProvides ranko alerts on new buy and sell bars.
Option to custom color the bars.
Really only created this to be able to get alerts when the trend changes from buy to sell, or vice versa
Breakout Retest Visualizer (with Confluence)Breakout Retest Visualizer (Smart Money Edition)
This indicator is designed for day traders who rely on price action, breakout structure, and smart confluence filters to identify high-quality trade opportunities during the New York session.
🚀 What It Does:
Plots Yesterday's High & Low as static reference levels.
Tracks the New York open price with a horizontal line.
Detects breakouts above Yesterday’s High or breakdowns below Yesterday’s Low.
Confirms valid breakouts only when 4 key confluences align:
✅ EMA 9 & EMA 21 trend alignment
✅ RSI momentum confirmation (RSI > 55 or < 45)
✅ Volume spike (volume > 20-bar average)
✅ Within New York session hours (9:30am – 4:00pm EST)
Marks Breakout Retests and highlights strong continuation signals with “Runner” labels.
📈 Visual Markers:
🟢 Green "Runner" = Bullish continuation after retest
🔻 Purple Triangle = Bullish breakout retest zone
🔴 Red "Runner" = Bearish continuation
🔺 Yellow Triangle = Bearish breakdown retest
🎯 Who It’s For:
Ideal for intraday scalpers and momentum traders who want:
Clean breakout structure
Smart money-style retests
High-confidence entries backed by volume, trend, and RSI confluence
🧠 Tips for Use:
Use the retest markers to plan precise entries after structure breaks.
Combine this with order blocks or FVG zones for deeper confluence.
Avoid trading during pre-market or low-volume hours.
高级超买超卖 & 变盘信号Very interesting indicator, normalised with four overbought and oversold algorithms, plus a change alert. It's very practical.
Monday's Range by Fortis80This TradingView indicator displays the Monday’s high and low range clearly across all timeframes, making it easy for traders to identify weekly key levels.
Exclusive for Fortis80 Members.
Opening Range Breakout🧭 Overview
The Open Range Breakout (ORB) indicator is designed to capture and display the initial price range of the trading day (typically the first 15 minutes), and help traders identify breakout opportunities beyond this range. This is a popular strategy among intraday and momentum traders.
🔧 Features
📊 ORB High/Low Lines
Plots horizontal lines for the session’s high and low
🟩 Breakout Zones
Background highlights when price breaks above or below the range
🏷️ Breakout Labels
Text labels marking breakout events
🧭 Session Control
Customizable session input (default: 09:15–09:30 IST)
📍 ORB Line Labels
Text labels anchored to the ORB high and low lines (aligned right)
🔔 Alerts
Configurable alerts for breakout events
⚙️ Adjustable Settings
Show/hide background, labels, session window, etc.
⏱️ Session Logic
• The ORB range is calculated during a defined session window (default: 09:15–09:30).
• During this window, the highest high and lowest low are recorded as ORB High and ORB Low.
📈 Breakout Detection
• Breakout Above: Triggered when price crosses above the ORB High.
• Breakout Below: Triggered when price crosses below the ORB Low.
• Each breakout can trigger:
• A background highlight (green/red)
• A text label (“Breakout ↑” / “Breakout ↓”)
• An optional alert
🔔 Alerts
Two built-in alert conditions:
1. Breakout Above ORB High
• Message: "🔼 Price broke above ORB High: {{close}}"
2. Breakout Below ORB Low
• Message: "🔽 Price broke below ORB Low: {{close}}"
You can create alerts in TradingView by selecting these from the Add Alert window.
📌 Best Use Cases
• Intraday momentum trading
• Breakout and scalping strategies
• First 15-minute range traders (NSE, BSE markets)
Previous Day High & Low with Breakout Zones📌 Script Summary: Previous Day High/Low with Breakout Zones and Alerts
This Pine Script plots the previous day’s high and low on intraday charts, and highlights when the current price breaks out of that range during regular trading hours.
✅ Key Features
• Previous Day High/Low Lines: Draws horizontal lines at the prior day’s high and low, updated daily.
• Time-Filtered Session (09:15–15:30 IST): All logic applies only during Indian market hours.
• Breakout Zone Highlighting:
• 🟩 Green background when price closes above previous high
• 🟥 Red background when price closes below previous low
• Dynamic Labels: Displays labeled levels each day on the chart.
• Alerts:
• 🔼 Triggered when price crosses above the previous day’s high.
• 🔽 Triggered when price crosses below the previous day’s low.
• Customizable Inputs:
• Enable/disable alerts
• Toggle breakout zone highlights
• Set label offset
⚙️ Optimized For
• Intraday timeframes (e.g., 5m, 15m, 1h)
• Trading during NSE/BSE market hours
• Breakout strategy traders and range watchers
Hidden Bullish Divergence [1H]Detects hidden bullish divergence on the 1-hour timeframe using RSI. It will plot a label when conditions are met. Watch for the green label under a candle — this indicates hidden bullish divergence.
Multi-TF S/R Lines by Pivots - 15min Chart//@version=5
indicator('Multi-TF S/R Lines by Pivots - 15min Chart', overlay=true, max_lines_count=32)
// تنظیمات کاربری
pivot_lookback = input.int(5, 'تعداد کندل دو طرف پیوت')
search_bars = input.int(200, 'تعداد کندل چکشونده در هر تایمفریم')
line_expire = input.int(40, 'حداکثر کندل بیتست تا پنهان کردن سطح')
h4_color = color.new(color.teal, 0)
h1_color = color.new(color.green, 0)
d1_color = color.new(color.blue, 0)
w1_color = color.new(color.red, 0)
plot_labels = input.bool(true, 'نمایش لیبل')
label_size = input.string('tiny', 'سایز لیبل', )
var float w1_pivothighs = array.new_float(0)
var float w1_pivotlows = array.new_float(0)
var float d1_pivothighs = array.new_float(0)
var float d1_pivotlows = array.new_float(0)
var float h4_pivothighs = array.new_float(0)
var float h4_pivotlows = array.new_float(0)
var float h1_pivothighs = array.new_float(0)
var float h1_pivotlows = array.new_float(0)
//----------------------
// تابع پیوتی (true اگر کندل مرکزی، پیوت سقف/کف باشد)
pivot(cF, length, dir) =>
// dir = 'high' یا 'low'
var bool isP = true
for i = 1 to length
if dir == 'high'
isP := isP and cF > cF and cF > cF
if dir == 'low'
isP := isP and cF < cF and cF < cF
isP
// جمعآوری پیوتها در تایمفریم انتخابی
get_pivots(tf, bars_limit, look, dir) =>
var float pivs = array.new_float(0)
pivs := array.new_float(0) // reset each call: همیشه آخرین ۲۰۰ کندل
h = request.security(tf, 'high', high)
l = request.security(tf, 'low', low)
arr = dir == 'high' ? h : l
// فقط کندلهای وسط برگردد (نه اول و آخر)
for i=look to (bars_limit - look)
if pivot(arr, look, dir)
array.unshift(pivs, arr )
pivs
// بروزرسانی آرایه پیوتها (آخرین سطوح)
if barstate.islastconfirmedhistory
w1_pivothighs := get_pivots('W', search_bars, pivot_lookback, 'high')
w1_pivotlows := get_pivots('W', search_bars, pivot_lookback, 'low')
d1_pivothighs := get_pivots('D', search_bars, pivot_lookback, 'high')
d1_pivotlows := get_pivots('D', search_bars, pivot_lookback, 'low')
h4_pivothighs := get_pivots('240', search_bars, pivot_lookback, 'high')
h4_pivotlows := get_pivots('240', search_bars, pivot_lookback, 'low')
h1_pivothighs := get_pivots('60', search_bars, pivot_lookback, 'high')
h1_pivotlows := get_pivots('60', search_bars, pivot_lookback, 'low')
//--------------
// تابع رسم سطح
draw_lines(pivArr, line_color, label_txt, expiry) =>
int count = math.min(array.size(pivArr), 8)
for i=0 to (count-1)
y = array.get(pivArr, i)
// بررسی در 40 کندل اخیر برخورد بوده یا نه؟
touched = false
for c=0 to (expiry-1)
touched := touched or (low <= y and high >= y)
if touched
l = line.new(bar_index-expiry, y, bar_index, y, color=line_color, width=2, extend=extend.right)
if plot_labels
label.new(bar_index, y, label_txt, color=line_color, style=label.style_label_right, textcolor=color.white, size=label_size)
// اگر طی پیشفرض expiry کندل برخورد نشده بود، خط و لیبل رسم نشود (مخفی شود)
// رسم همه خطوط
draw_lines(w1_pivothighs, w1_color, 'W1', line_expire)
draw_lines(w1_pivotlows, w1_color, 'W1', line_expire)
draw_lines(d1_pivothighs, d1_color, 'D1', line_expire)
draw_lines(d1_pivotlows, d1_color, 'D1', line_expire)
draw_lines(h4_pivothighs, h4_color, 'H4', line_expire)
draw_lines(h4_pivotlows, h4_color, 'H4', line_expire)
draw_lines(h1_pivothighs, h1_color, 'H1', line_expire)
draw_lines(h1_pivotlows, h1_color, 'H1', line_expire)
RSI Overbought ScannerRSI Overbought Scanner
Description
The RSI Overbought Scanner is a Pine Script indicator designed to identify potential overbought conditions across multiple timeframes (1-minute, 5-minute, and 15-minute) using the Relative Strength Index (RSI). This tool is ideal for traders looking to spot stocks or assets that may be overextended to the upside, potentially signaling a reversal or pullback opportunity.
Key Features
Multi-Timeframe Analysis: Evaluates RSI on 1m, 5m, and 15m timeframes to confirm overbought conditions (RSI > 70).
Visual Output: Plots a binary result (1 for overbought, 0 otherwise) for easy integration with TradingView's screener.
Debugging Table: Displays a table in the top-right corner showing RSI values and overbought status for each timeframe, with color-coded indicators (red for overbought, green for not overbought).
Alert Integration: Includes an alert condition that triggers when all three timeframes are overbought, providing a customizable message with the ticker symbol.
How It Works
RSI Calculation: Computes RSI with a default length of 14 for the 1m timeframe and retrieves RSI values for 5m and 15m timeframes using request.security.
Overbought Condition: Checks if RSI exceeds 70 on all three timeframes.
Output: Plots a value of 1 when all conditions are met, otherwise 0. A table updates on the last confirmed bar to show RSI values and overbought status.
Alerts: Triggers an alert when all timeframes are overbought, notifying users of potential trading opportunities.
Usage
Add the indicator to your chart and use it with TradingView's screener to filter assets meeting the overbought criteria.
Customize the RSI length or overbought level (default 70) in the indicator settings to suit your trading strategy.
Set up alerts to receive notifications when the overbought condition is met across all timeframes.
Notes
This script is written in Pine Script v6.
Best used in conjunction with other technical analysis tools to confirm signals.
The table is for debugging and visual confirmation, updating only on the last confirmed bar to avoid performance issues.
Open Range Breakout (ORB) with Alerts
🚀 ChartsAlgo – Open Range Breakout (ORB) with Alerts
The Open Range Breakout (ORB) Indicator by ChartsAlg is designed for intraday traders looking to capitalize on price movements after the market’s opening range. This tool is especially effective for futures (MNQ, MES) and high-volatility stocks or crypto where initial volatility sets the tone for the session.
This indicator identifies a user-defined opening range window, plots the high/low lines of that range, and visually alerts users when price breaks out above or below the range — with options to customize breakout repetitions, background fill, and alerts.
💡 What is an Open Range Breakout (ORB)?
The opening range represents the high and low established during the first few minutes of the trading session — usually 15 or 30 minutes. Many intraday strategies are based on the idea that breaking out of this initial range often signals strong momentum and trend continuation.
Traders often enter:
Long when price breaks above the range high.
Short when price breaks below the range low.
⚙️ How It Works
You define a session window (e.g., 09:30–09:45 EST).
The indicator tracks the high and low during this time.
Once the session ends, the high and low become your range breakout levels.
The indicator then:
Plots lines for visual clarity
Optionally fills background between the range
Triggers breakout signals if price crosses the levels
Provides alerts when breakouts occur
🛠️ Settings Breakdown
🔹 Session Settings
Range Session: Set your preferred window (e.g., 0930–0945). Can be premarket, first 30 mins, or any custom time.
Time zone: Use "America/New York" for EST (default) or change to "GMT+0" for international traders.
🔹 Breakout Settings
Bullish Breakout Signals: Number of allowed breakout alerts above the range.
Bearish Breakout Signals: Number of allowed breakout alerts below the range.
This prevents repeated alerts once breakout has been confirmed.
🔹 Display Settings
Show Background Fill: Fills area between high/low of the range for easier visual analysis.
Show Breakout Signals: Triangle markers plotted on the chart when breakouts happen.
Only Show Today’s Range: Keeps the chart clean by showing only the most current day’s range.
🔹 Color Settings
Range High/Low Line Colors: Choose any color for clarity.
Range Fill Color: Customize the highlight area for your chart style.
📊 Chart Features
Range High/Low Lines: Automatically plotted after range session ends.
Visual Fill Box: Optional background shading between the opening range.
Triangle Breakout Markers: Appear at the breakout candle.
Alerts: Can be used with TradingView’s alert system to notify you of breakouts in real-time.
🔔 Alerts
Two alert conditions are built in:
Bullish Breakout: Triggers when price breaks above the high of the range.
Bearish Breakout: Triggers when price breaks below the low of the range.
Example Alert Message:
📈 “Bullish Breakout above Open Range on AAPL!”
To activate:
Click “🔔 Alerts” on TradingView.
Set condition to this script.
Choose “ORB Breakout Up” or “ORB Breakout Down”.
Choose alert frequency and notification method.
⚠️ DISCLAIMER
ChartsAlgo tools are for informational and educational purposes only.
They are not financial advice or signals. Past performance does not guarantee future results. Use at your own risk and always implement solid risk management.
By using this indicator, you agree that you are solely responsible for any trades or decisions made based on the information provided.
Hidden Bearish Divergence [1H]Detects Hidden Bearish Divergence on the 1-hour timeframe using RSI. This is the opposite of hidden bullish — it suggests bearish continuation in a downtrend. Price forms a Lower High. RSI forms a Higher High. Suggests bearish continuation (ideal in a downtrend).
Clean Day Separator (Vertical Only)Clean Day Separator (Vertical Only) is a minimalist indicator for traders who value clarity and structure on their charts.
This tool draws:
✅ Vertical dashed lines at the start of each new day
✅ Optional day-of-week labels (Monday, Tuesday, etc.)
It’s designed specifically for clean chart lovers — no horizontal lines, no boxes, just what you need to mark time and keep your focus.
Perfect for:
Intraday traders who track market rhythm
Price action purists
Anyone who wants to reduce visual noise
Customizable settings:
Toggle day labels on/off
Choose line and text colors
Set label size to match your chart style
ORB NormanORB with adjustable times for up to 3 ORB's.
High and Low for each defined timeframe with adjustable lenghts for each day.
reversalthis is a simple ema indicator. i specifically set my fast ema to 4 and my slow ema to 13. i only turn on signals after 9;30 am and wait for the ema cross signal to fire once a swing point has been sweeped. i follow the daily. If the daily high has been sweep the previous day and or closed then we are taking highs therefor bullish bias. vice versa for sells. if bullish then only take bullish 4/13 ema cross.THIS CROSS IS MY SIGNAL THAT THERE IS A POTENTIAL CHANGE OF ORDERFLOW, YOU MUST VERIFY THAT THERE IS INDEED A BREAKER BLOCK BEFORE ENTERING. i dont actually just follow a simple ema cross. it means something.
RSI OS/OB Background StripesThe "RSI OS/OB Background Stripes" indicator is a simple tool designed to help traders visualize overbought and oversold market conditions using the Relative Strength Index (RSI). It highlights these conditions by displaying colored background stripes directly on your chart, making it easy to spot potential trading opportunities.
How It Works:RSI Calculation: The indicator calculates the RSI, a popular momentum indicator that measures the speed and change of price movements, using a default period of 14 (customizable).
Overbought/Oversold Levels: It marks areas where the RSI is above a user-defined overbought level (default: 70) with red background stripes, and below an oversold level (default: 30) with green background stripes.
Visual Feedback: The colored stripes appear on the chart when the RSI enters overbought (red) or oversold (green) zones, helping you quickly identify market conditions.
Customization: You can adjust the RSI period, overbought/oversold levels, background colors, and transparency. You can also choose to show the RSI line in a separate panel or display RSI values on the chart for debugging.
Alerts: The indicator includes optional alerts that notify you when the RSI crosses into overbought or oversold territory.
Who It’s For: This indicator is perfect for beginner and intermediate traders who want a clear, visual way to track RSI-based overbought and oversold conditions without cluttering their charts.
Key Features:Easy-to-read background stripes for overbought (red) and oversold (green) conditions.
Fully customizable RSI settings, colors, and transparency.
Optional RSI plot and value display for deeper analysis.
Alerts to keep you informed of key RSI level crossings.
This indicator is a straightforward way to monitor market momentum and make informed trading decisions.
My Custom IndicatorThis script implements a simple yet effective RSI-based trading strategy. It uses the Relative Strength Index (RSI) to generate buy and exit signals based on overbought and oversold conditions.
How It Works:
Buy Entry: When RSI crosses above 30 (indicating recovery from an oversold state).
Exit: When RSI crosses below 70 (potential reversal from an overbought state).
Plots the RSI line and key thresholds (30/70) directly on the chart.
Designed for backtesting with TradingView’s strategy function.
Features:
Fully automated entry and exit logic
Customizable RSI settings (just edit the code)
Visual RSI plot and threshold lines
Works on any asset or timeframe
This strategy is suitable for trend-following or mean-reversion setups, and is best used in combination with other filters (like moving averages or price action patterns) for improved accuracy
4H Crypto System – EMAs + MACD//@version=5
indicator("4H Crypto System – EMAs + MACD", overlay=true)
// EMAs
ema21 = ta.ema(close, 21)
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
// MACD Settings (standard)
fastLength = 12
slowLength = 26
signalLength = 9
= ta.macd(close, fastLength, slowLength, signalLength)
// Plot EMAs
plot(ema21, title="EMA 21", color=color.orange, linewidth=1)
plot(ema50, title="EMA 50", color=color.blue, linewidth=1)
plot(ema200, title="EMA 200", color=color.purple, linewidth=1)
// Candle coloring based on MACD trend
macdBull = macdLine > signalLine
barcolor(macdBull ? color.new(color.green, 0) : color.new(color.red, 0))
// Buy/Sell signal conditions
buySignal = ta.crossover(macdLine, signalLine) and close > ema21 and close > ema50 and close > ema200
sellSignal = ta.crossunder(macdLine, signalLine) and close < ema21 and close < ema50 and close < ema200
// Alerts
alertcondition(buySignal, title="Buy Alert", message="Buy Signal: MACD bullish crossover and price above EMAs")
alertcondition(sellSignal, title="Sell Alert", message="Sell Signal: MACD bearish crossover and price below EMAs")