Göstergeler ve stratejiler
SessionsThis indicator displays 3 minimalistic session boxes.
You can change the time, timezone input, box colors.
This script also has a timeframe filter.
For example, if you wish that the indicator disables itself when you switch to a higher timeframe chart, it will do it automatically.
EMA Slope FilterEMA SLOPE FILTER....50EMA....You’ll see a line oscillating around zero; when it’s within ±0.1, treat the market as “flat.”
Rifle UnifiedThis script is designed for use on 30-second charts of Dow Jones-related symbols (YM, MYM, US30). It provides automated buy and sell signals using a combination of price action, RSI (Relative Strength Index), and volume analysis. The script is intended for both live trading signals and backtesting, with configurable risk management and debugging features.
Core Functionality
1. Signal Generation Logic
Trigger: The algorithm looks for a sharp price move (drop or rise) of a user-defined threshold (default: 80 points) within a specified lookback window (default: 20 minutes).
Levels: It monitors for price drops below specific numerical levels ending in 23, 43, or 73 (e.g., 42223, 42273).
RSI Condition: When price falls below one of these levels and the RSI is below 30, the setup is considered active.
Buy Signal: A buy is triggered if, after setup:
Price rises back above the level,
The RSI rate of change (ROC) indicates exhaustion of the drop,
The current bar shows positive momentum.
2. Trade Management
Stop Loss & Take Profit: Configurable fixed or trailing stop loss and take profit levels are plotted and managed automatically.
Exit Signals: The script signals exit based on price action relative to these risk management levels.
3. Filters & Enhancements
Parabolic Move Filter: Prevents entries during extreme price moves.
Dead Cat Bounce Filter: Avoids false signals after sharp reversals.
Volume Filter: Optionally requires volume conditions for trade entries (especially for shorts).
Multiple Confirmation Layers : Includes checks for 5-minute RSI, momentum, and price retracement.
User Inputs & Customization
Trade Direction: Toggle between LONG and SHORT signal generation.
Trigger Settings: Adjust thresholds for price moves, lookback windows, RSI ROC, and volume requirements.
Trade Settings: Set take profit, stop loss, and trailing stop behavior.
Debug & Visualization: Enable or disable various plots, labels, and debug tables for in-depth analysis.
Backtesting: Integrated backtester with summary and detailed statistics tables.
Technical Features
Uses External Libraries: Relies on RifleShooterLib for core logic and BackTestLib for backtesting and statistics.
Multi-timeframe Analysis: Incorporates both 30-second and 5-minute RSI calculations.
Chart Annotations: Plots entry/exit points, risk levels, and debug information directly on the chart.
Alert Conditions: Built-in alert triggers for key events (initial move, stall, entry).
Intended Use
Markets: Dow Jones symbols (YM, MYM, US30, or US30 CFD).
Timeframe: 30-second chart.
Purpose: Automated signal generation for discretionary or algorithmic trading, with robust risk management and backtesting support.
Notable Customization & Extension Points
Momentum Calculation: Plans to replace the current momentum measure with "sqz momentum".
Displacement Logic: Future update to use "FVG concept" for displacement.
High-Contrast RSI: Optional visual enhancements for RSI extremes.
Time-based Stop: Consideration for adding a time-based stop mechanism.
This script is highly modular, with extensive user controls, and is suitable for both live trading and historical analysis of Dow Jones index movements
Normalized Fibonacci Retracement (MTF/LOG)A question: Instead of creating indicators that constantly plot Fibonacci Retracement levels in a visually overwhelming way, why don't we redefine them on a different scale? 🤨
Overview
The Normalized Fibonacci Retracement indicator converts price data to a 0-100 scale based on the selected timeframe's high-low range, displaying normalized candlesticks alongside standard Fibonacci levels (23.6%, 38.2%, 50%, 61.8%, 78.6%). This normalization reveals patterns that may be hidden in absolute price charts and allows consistent analysis across different instruments.
Originality
By normalizing prices to percentages, this indicator enables pattern recognition independent of absolute price levels. The same formation at $10-$20 and $1000-$2000 appears identical on the normalized scale, helping traders identify recurring structures across various assets and timeframes.
Concepts
The indicator uses a simple formula to transform price data into percentages. This creates a bounded scale where patterns become comparable regardless of the underlying asset's price range. The normalized view often reveals symmetries and relationships not visible in traditional price charts.
Mechanics
The system tracks highs and lows within the selected timeframe as anchor points. When a new period begins, fresh boundaries are established and prices recalculated. Trend direction is determined by timing of extremes. Linear scaling uses direct percentage calculation, while logarithmic scaling applies exponential interpolation for assets with large percentage moves.
Functions
Timeframe Selection: Higher timeframe analysis on any chart resolution
Normalized Display: OHLC data converted to 0-100 percentage scale
Fibonacci Levels: Standard retracement levels plotted automatically
Scaling Options: Linear or logarithmic calculation methods
Pattern Recognition: Reveals formations hidden in absolute price charts
Moving Average: Optional 20-period SMA overlay
Notes
Ensure chart data covers the full selected timeframe for accurate calculations. Use logarithmic scaling for volatile assets with large percentage moves. The normalized scale is effective at revealing patterns and structures that remain consistent across different price ranges, making it particularly useful for comparative analysis and pattern-based trading strategies.
I hope it helps everyone. Do not forget to manage your risk. And trade as safely as possible. Best of luck!
Trend Band Oscillator📌 Trend Band Oscillator
📄 Description
Trend Band Oscillator is a momentum-based trend indicator that calculates the spread between two EMAs and overlays it with a volatility filter using a standard deviation band. It helps traders visualize not only the trend direction but also the strength and stability of the trend.
📌 Features
🔹 EMA Spread Calculation: Measures the difference between a fast and slow EMA to quantify short-term vs mid-term trend dynamics.
🔹 Volatility Band Overlay: Applies an EMA of standard deviation to the spread to filter noise and highlight valid momentum shifts.
🔹 Color-Based Visualization: Positive spread values are shown in lime (bullish), negative values in fuchsia (bearish) for quick directional insight.
🔹 Upper/Lower Bands: Help detect potential overbought/oversold conditions or strong trend continuation.
🔹 Zero Line Reference: A horizontal baseline at zero helps identify trend reversals and neutral zones.
🛠️ How to Use
✅ Spread > 0: Indicates a bullish trend. Consider maintaining or entering long positions.
✅ Spread < 0: Indicates a bearish trend. Consider maintaining or entering short positions.
⚠️ Spread exceeds bands: May signal overextension or strong momentum; consider using with additional confirmation indicators.
🔄 Band convergence: Suggests weakening trend and potential transition to a ranging market.
Recommended timeframes: 1H, 4H, Daily
Suggested complementary indicators: RSI, MACD, OBV, SuperTrend
✅ TradingView House Rules Compliance
This script is open-source and published under Pine Script v5.
It does not repaint, spam alerts, or cause performance issues.
It is designed as an analytical aid only and should not be considered financial advice.
All calculations are transparent, and no external data sources or insecure functions are used.
====================================================================
📌 Trend Band Oscillator
📄 설명 (Description)
Trend Band Oscillator는 두 개의 EMA 간 스프레드(차이)를 기반으로 한 모멘텀 중심의 추세 오실레이터입니다. 여기에 표준편차 기반의 변동성 밴드를 적용하여, 추세의 방향뿐 아니라 강도와 안정성까지 시각적으로 분석할 수 있도록 설계되었습니다.
📌 주요 특징 (Features)
🔹 EMA 기반 스프레드 계산: Fast EMA와 Slow EMA의 차이를 활용해 시장 추세를 정량적으로 표현합니다.
🔹 표준편차 필터링: Spread에 대해 EMA 및 표준편차 기반의 밴드를 적용해 노이즈를 줄이고 유효한 추세를 강조합니다.
🔹 컬러 기반 시각화: 오실레이터 값이 양수일 경우 초록색, 음수일 경우 마젠타 색으로 추세 방향을 직관적으로 파악할 수 있습니다.
🔹 밴드 범위 시각화: 상·하위 밴드를 통해 스프레드의 평균 편차 범위를 보여주며, 추세의 강약과 포화 여부를 진단할 수 있습니다.
🔹 제로 라인 표시: 추세 전환 가능 지점을 시각적으로 확인할 수 있도록 중심선(0선)을 제공합니다.
🛠️ 사용법 (How to Use)
✅ 오실레이터가 0 이상 유지: 상승 추세 구간이며, 롱 포지션 유지 또는 진입 검토
✅ 오실레이터가 0 이하 유지: 하락 추세 구간이며, 숏 포지션 유지 또는 진입 검토
⚠️ 상·하위 밴드를 이탈: 일시적인 과매수/과매도 혹은 강한 추세 발현 가능성 있음 → 다른 보조지표와 함께 필터링 권장
🔄 밴드 수렴: 추세가 약해지고 있음을 나타냄 → 변동성 하락 또는 방향성 상실 가능성 있음
권장 적용 시간대: 1시간봉, 4시간봉, 일봉
보조 적용 지표: RSI, MACD, OBV, SuperTrend 등과 함께 사용 시 신호 필터링에 유리
✅ 트레이딩뷰 하우스룰 준수사항 (TV House Rules Compliance)
이 지표는 **무료 공개용(Open-Source)**이며, Pine Script Version 5로 작성되어 있습니다.
과도한 리페인트, 비정상적 반복 경고(alert spam), 실시간 성능 저하 등의 요소는 포함되어 있지 않습니다.
사용자는 본 지표를 투자 결정의 참고용 보조 도구로 활용해야 하며, 독립적인 매매 판단이 필요합니다.
데이터 소스 및 계산 방식은 완전히 공개되어 있으며, 외부 API나 보안 취약점을 유발하는 구성 요소는 없습니다.
EdgeXplorer - Battle of the BullsEdgeXplorer – Battle of the Bulls
Momentum isn’t a mystery. It’s a battle. And this tool shows you who’s winning.
Battle of the Bulls is a momentum visualizer built for traders who want to track the tug-of-war between bullish and bearish pressure — in real time. It blends raw market energy with simple visuals to help you interpret power shifts, confirm trends, or anticipate reversals.
⸻
🔍 What It Tracks:
At its core, this tool calculates two things on every candle:
• Bull Power = High − EMA
• Bear Power = Low − EMA
These two values are added together to create a net momentum reading — giving you a unique view of pressure on both ends of the candle. The more aggressively price moves above or below the EMA, the stronger the histogram prints in that direction.
This approach allows you to see not just price movement, but the intensity behind it.
⸻
📊 Visual Breakdown:
• Momentum Histogram:
Colored bars show bullish vs. bearish pressure:
• Green bars = bullish net pressure (momentum > 0)
• Red bars = bearish net pressure (momentum < 0)
• Zero Line:
This baseline acts as a key decision zone. Crosses above zero often signal increasing bullish pressure, while crosses below zero can flag incoming bearish strength.
• Raw Momentum Line (optional):
Toggle this ON if you prefer to see a smoother visual of momentum shifts layered over the histogram. It’s helpful for those who like cleaner entries based on slope or curve behavior.
• Background Tinting:
To keep the screen minimal yet informative, a light red or green background tint reflects the prevailing momentum bias without being visually overwhelming.
⸻
🧠 How to Use It:
1. Confirming Trend Strength:
Use the histogram to validate whether a move is driven by real strength or just noise. A strong uptrend with fading green bars? Momentum might be weakening. Choppy range but rising bars? Breakout may be brewing.
2. Spotting Momentum Shifts Early:
The zero line crossover can be used as an early signal for trend reversals or new legs forming. Pair with your existing structure or pattern analysis for high-conviction entries.
3. Filtering False Breakouts:
Sometimes price breaks a level but momentum doesn’t support it — Battle of the Bulls can help you avoid those traps. If the histogram is neutral or fading while price breaks out, caution may be warranted.
4. Scalping Short-Term Swings:
Scalpers can track short bursts of power, riding histogram pulses in one direction. Set the EMA lookback lower (e.g. 5–8) for ultra-sensitive setups, or go higher (20+) for smoother confirmation.
⸻
⚙️ Customizable Inputs:
• Lookback Length – Controls the EMA length used in calculating momentum.
• Lower = more sensitive.
• Higher = more stable.
• Color Inputs – Change bullish and bearish histogram colors to fit your theme.
• Raw Line Option – Toggle for smoother, minimal overlay of momentum data.
⸻
🔔 Built-In Alerts:
We’ve added alert conditions for both:
• Bullish Cross (Momentum > 0)
• Bearish Cross (Momentum < 0)
So whether you want to automate notifications for scalping, swing confirmations, or divergence watching, this script has you covered.
⸻
🔚 Final Notes:
This script is minimal by design — no clutter, no distractions — just the heartbeat of market pressure visualized in a way you can actually trade. Whether you’re using it for confluence, confirmation, or clean pulse reads, Battle of the Bulls gives you insight without overcomplication.
Silver Bull Flag Breakout AlertDescription:
This script detects a bullish breakout in Silver (XAGUSD) above $37.60, confirming a bull flag continuation pattern on the daily chart. It optionally plots a 21 EMA as a trailing stop and includes a customizable alert condition for trade execution or monitoring.
Features:
• Alerts on daily close above $37.60
• Optional trailing stop (21 EMA)
• Visual breakout marker
• Ideal for swing trades targeting $41–$45
Price - MA DifferencePlots the difference between the closing price and a moving average (either SMA or EMA) in a separate pane. It includes:
Dropdown to choose between SMA and EMA
Adjustable length (default 21)
Yellow color as default for the plot
SMA+Volume Buy AlertsOverview
This lightweight indicator combines trend and momentum filters to pinpoint high-conviction, oversold entries on ETFs or stocks. It plots your choice of two SMAs (default 100- & 200-day) and a 20-day volume moving average, then only flags a “BUY” when price crosses below an SMA and daily volume exceeds its average.
Use it to capture institutional-strength reversals without alert noise, and receive a single, clear signal exactly when market participants step in.
Key Features
Dual SMA Trend Lines (100/200-day by default)
Volume Filter (20-day avg): only overshoots on above-average volume signal
One-Shot Buy Markers: triangles appear beneath the precise bar that crosses under your SMA on high volume
Alert Conditions: “Buy 100 SMA + High Vol” and “Buy 200 SMA + High Vol” ready for desktop, mobile, or webhooks
Show/Hide Toggle for your SMA lines
100% Pine v6, optimized for speed and compatibility
Inputs
Short SMA Length (default 100)
Long SMA Length (default 200)
Volume MA Length (default 20)
Show SMA Lines toggle
How to Use
Add to Chart: Copy & paste this script into TradingView’s Pine editor, then Save & Add to Chart.
Configure Inputs: Adjust SMA and volume-MA lengths to your trading style.
Create Alerts:
Open “Create Alert,” select the “SMA-VOL-BUY” indicator.
Choose “Buy 100 SMA + High Vol” or “Buy 200 SMA + High Vol.”
Set trigger to “Once Per Bar Close.”
Trade with Confidence: Only the most significant, high-volume overshoots get flagged—no spam, just high-quality setups.
Best Practices
Frame Alignment: Combine daily signals with a weekly SMA trend filter for multi-timeframe confirmation.
Volume Context: Ensure that “high” volume truly represents above-average activity in your chosen security.
Risk Management: Use the signal bar’s low as your stop, and size positions to match your risk tolerance.
Review & Iterate: Tweak SMA or volume lengths to suit fast-moving sectors (e.g. 50/100 SMAs) or slower large-caps.
NY Open Breakout [ATR-5000]# **New York Open Breakout Indicator **
## **📌 Overview**
This **Pine Script** indicator identifies high-probability breakout opportunities at the **New York market open (13:30 UTC)** based on **volatility filters** using **customizable ATR periods and thresholds**.
### **🔹 Key Features**
✅ **Fully Customizable ATR Periods** (2 to **5000** bars)
✅ **Adjustable Thresholds** (0.01% to 5.00%)
✅ **Opening Range (OR) Filter** (0.01% to 5.00%)
✅ **Clean Visuals** – Only highlights the **13:30 UTC candle** when conditions are met
✅ **Real-Time Info Panel** – Displays current ATR & threshold settings
✅ **Automatic Daily Reset** – Fresh signals every trading day
---
## **📊 How It Works**
### **1️⃣ Volatility Check (13:25 UTC)**
- Calculates **two ATR values** (user-defined periods)
- Compares them against **custom % thresholds**
- Only proceeds if **both ATRs exceed** their required volatility levels
### **2️⃣ Opening Range Confirmation (13:30 UTC)**
- Measures the **high-low range** of the 13:30 candle
- Validates if the range meets the **minimum % threshold**
- If all conditions pass → **Highlights the candle** in your chosen color
### **3️⃣ Visual Feedback**
- **🟣 Colored Candle** → Valid breakout signal
- **📊 Info Table** → Shows current ATR settings & thresholds
---
## **⚙️ Customization Options**
| **Setting** | **Default** | **Adjustable Range** |
|---------------------------|------------|----------------------|
| **First ATR Period** | 14 | **2–5000** bars |
| **Second ATR Period** | 161 | **2–5000** bars |
| **First ATR Threshold** | 0.42% | **0.01%–5.00%** |
| **Second ATR Threshold** | 0.40% | **0.01%–5.00%** |
| **OR Range Threshold** | 0.42% | **0.01%–5.00%** |
| **Candle Color** | Purple | **Any color** |
---
## **📈 Best Use Cases**
✔ **Forex (EURUSD, GBPUSD)** – Captures NY session momentum
✔ **Indices (SPX, NASDAQ)** – Works well with opening volatility
✔ **Commodities (Gold, Oil)** – Filters out low-energy days
---
## **🔧 How to Adjust Settings**
1. **Click the gear icon (⚙️)** on your TradingView chart
2. **Modify ATR periods & thresholds** as needed
3. **Change the candle color** for better visibility
---
## **🚀 Why This Indicator?**
- **No repainting** – Signals lock in after candle close
- **No clutter** – Only marks valid 13:30 candles
- **Adaptable** – Works on **any market & timeframe**
- **Fully automated** – No manual adjustments needed
---
### **📥 Apply & Start Trading!**
Simply **load the script** on TradingView and customize it to fit your strategy! 🚀
Sessions by EC35 (Berlin Zeit)This script displays the Asia session (red), London session (green), and NY session (blue). Have fun
High Selling Point Reversal V6.0Criteria combined for a "High Selling Point" signal: Best used for exiting long positions or entering shorts
Overbought Condition (RSI):
Purpose: Ensures the asset has had a significant run-up and is potentially exhausted.
Criteria: RSI (Relative Strength Index) is above a certain threshold (e.g., 70 or 80).
Bearish Candlestick Reversal Pattern:
Purpose: Identifies specific price action that indicates a shift from buying to selling pressure.
Criteria: We can implement detection for one or more strong bearish patterns. A good starting point would be:
Bearish Engulfing: A bearish candle whose real body completely covers the previous bullish candle's real body. This is a very strong two-candle reversal signal.
Shooting Star: A candle with a small real body at the lower end of the range, a long upper shadow, and little to no lower shadow. It signifies rejection of higher prices.
Evening Star: A three-candle pattern: a large bullish candle, followed by a small-bodied candle (the "star"), and then a large bearish candle. This is a powerful top reversal.
Negative Divergence (Optional but powerful):
Purpose: Indicates weakening momentum despite price continuing to rise, suggesting underlying weakness.
Criteria: Price makes a higher high, but a momentum oscillator (like RSI or MACD) makes a lower high.
Combine with other indicators for confluence
250710 Momentum Buy TriggerWhat It Does (Step by Step)
Sets Up a Moving Average
Calculates a 200-period Simple Moving Average (SMA) of the closing price.
You can change the period by adjusting the maPeriod input.
Calculates Momentum with MACD Histogram
Uses MACD (Moving Average Convergence Divergence) with standard settings:
Fast EMA: 12
Slow EMA: 26
Signal Line: 9
Subtracts the signal line from the MACD line to get the MACD histogram (a momentum indicator).
Defines a Buy Signal
The script checks two conditions:
Price is below the 200-period SMA → suggesting the asset is undervalued.
MACD histogram is rising (i.e., current value is greater than the previous bar) → suggesting bullish momentum is starting.
If both are true on the same bar, a "Buy" signal is generated.
ATR > VXN Alert (5m)ATR > VXN Volatility Divergence Indicator
This custom TradingView indicator monitors real-time volatility divergence between realized volatility (via Average True Range, ATR) and implied volatility (via the CBOE NASDAQ Volatility Index, VXN). It is inspired by the GJR-GARCH (Glosten-Jagannathan-Runkle Generalized Autoregressive Conditional Heteroskedasticity) model, which captures asymmetric volatility dynamics—particularly how markets respond more sharply to negative shocks than to positive ones.
Core Logic:
Chart on NQ 5 minute timeframe
ATR (5-min) reflects realized intraday volatility of the Nasdaq 100 futures (NQ).
VXN (5-min, delayed) represents forward-looking implied volatility.
The indicator highlights regime shifts in volatility:
ATR < VXN: Volatility compression → potential energy building up (market coiling).
ATR > VXN: Volatility expansion → real movement exceeds expectations → potential breakout zone.
Visuals & Alerts:
Background turns green when ATR crosses above VXN, signaling a bullish expansion regime.
Background turns red when ATR drops below VXN, signaling compression or risk-off environment.
Custom alerts trigger on volatility regime shifts for breakout traders.
Application (Manual GJR-GARCH Strategy):
Similar to how the GJR-GARCH model captures volatility clustering and asymmetry, this indicator identifies when actual price volatility (ATR) begins to spike beyond implied forecasts (VXN), often after periods of contraction—mirroring a conditional variance shock in the GARCH framework.
Traders can align with directional bias using technical confluence (order flow, structure breaks, liquidity zones) once expansion is confirmed.
Volume Spike Analyzer(SMA10-Based)📊 **Volume Spike Analyzer (SMA10-Based)**
This indicator highlights abnormal volume activity by comparing current volume to the 10-period Simple Moving Average (SMA) of volume. It helps traders visually identify unusual activity that may precede breakouts, reversals, or news-driven moves.
---
🔧 **Features:**
• ✅ Colors volume bars:
• Green = Volume > SMA(10)
• Red = Volume ≤ SMA(10)
• ✅ Detects and labels spike levels:
• 🔶2x — Volume > 2x SMA(10)
• 🟢3x — Volume > 3x SMA(10)
• 🔴4x — Volume > 4x SMA(10)
• ✅ Built-in alerts for all 3 spike levels
---
📈 **Best Use Cases:**
• Confirm breakouts with strong volume
• Detect accumulation/distribution
• Filter low-volume setups
• Combine with VWAP/EMA for directional confirmation
---
⏱️ **Recommended Timeframes:**
• Intraday: 5m, 15m, 1h
• Also works on daily for swing trades
---
🧠 **Pro Tips:**
• Use with VWAP or EMA(20/50/200) for confluence
• Add SMA(Volume, 10) to your price chart for quick correlation
• Combine with candle pattern detection for signal validation
---
Daily MAs IntradayThis script overlays up to 6 customizable daily moving averages on any intraday chart. It’s designed for traders who want to see higher-timeframe trend levels while operating on lower timeframes (e.g., 5m, 15m, 1h).
Each line is calculated from daily candle data and projected forward into your intraday chart. This makes it ideal for intraday traders who rely on daily MA levels for trend confirmation, support/resistance, or bounce setups.
K棒開盤突破箭頭(4小時邏輯 + 可調距離)This indicator plots visual arrow signals based on specific opening breakout conditions.
🟢 A green upward arrow appears above the bar when:
The current bar’s opening price is greater than the previous bar’s close +10 points, and
The current bar’s open is also higher than the previous bar’s open
🔴 A red downward arrow appears below the bar when:
The current bar’s opening price is lower than the previous bar’s close −10 points, and
The current bar’s open is also lower than the previous bar’s open
These conditions are designed to detect strong opening gaps that suggest potential breakout moves. The indicator is non-repainting and suitable for use in manual signal tracking or alert setup.
Best used on:
Higher timeframes (e.g., 1H, 4H, Daily)
Indexes, futures, or assets with noticeable price gaps
Customized ATR Trailing Stop with Fixed ATR DisplayCustomized ATR Trailing Stop with Fixed ATR Display
Daily, Weekly, Monthly Current/Average RangeThe "Daily, Weekly, Monthly Current/Average Range" calculates and displays current and average price ranges (high - low) for daily, weekly, and monthly timeframes in a customizable table.
Users can adjust the lookback period, table size, and font color, with the table updating on the last bar for efficiency.
When the current range exceeds the average for a timeframe, the corresponding cell highlights green, signaling price possibly reaching maximum expansion and potential retracement or consolidation may follow.
CM SlingShot System (Customizable)//@version=5
indicator("CM SlingShot System (Customizable)", overlay=true, shorttitle="CM_SSS")
// ==== 📌 INPUT SETTINGS ====
group1 = "Entry Settings"
sae = input.bool(true, title="📍 Show Aggressive Entry (pullback)?", group=group1)
sce = input.bool(true, title="📍 Show Conservative Entry (confirmation)?", group=group1)
group2 = "Visual Settings"
st = input.bool(true, title="🔼 Show Trend Arrows (top/bottom)?", group=group2)
sl = input.bool(false, title="🅱🆂 Show 'B' & 'S' Letters Instead of Arrows", group=group2)
pa = input.bool(true, title="🡹🡻 Show Entry Arrows", group=group2)
group3 = "MA Settings"
fastLength = input.int(38, title="Fast EMA Period", group=group3)
slowLength = input.int(62, title="Slow EMA Period", group=group3)
timeframe = input.timeframe("D", title="Timeframe for EMAs", group=group3)
// ==== 📈 EMA CALCULATIONS ====
emaFast = request.security(syminfo.tickerid, timeframe, ta.ema(close, fastLength))
emaSlow = request.security(syminfo.tickerid, timeframe, ta.ema(close, slowLength))
col = emaFast > emaSlow ? color.lime : emaFast < emaSlow ? color.red : color.gray
// ==== ✅ SIGNAL CONDITIONS ====
pullbackUp = emaFast > emaSlow and close < emaFast
pullbackDn = emaFast < emaSlow and close > emaFast
entryUp = emaFast > emaSlow and close < emaFast and close > emaFast
entryDn = emaFast < emaSlow and close > emaFast and close < emaFast
// ==== 🌈 CHART PLOTS ====
plot(emaFast, title="Fast EMA", color=color.new(col, 0), linewidth=2)
plot(emaSlow, title="Slow EMA", color=color.new(col, 0), linewidth=4)
fill(plot(emaSlow, title="", color=color.new(col, 0)), plot(emaFast, title="", color=color.new(col, 0)), color=color.silver, transp=70)
// Highlight bars
barcolor(sae and (pullbackUp or pullbackDn) ? color.yellow : na)
barcolor(sce and (entryUp or entryDn) ? color.aqua : na)
// Trend arrows
upTrend = emaFast >= emaSlow
downTrend = emaFast < emaSlow
plotshape(st and upTrend, title="UpTrend", style=shape.triangleup, location=location.belowbar, color=color.green)
plotshape(st and downTrend, title="DownTrend", style=shape.triangledown, location=location.abovebar, color=color.red)
// Entry indicators
plotarrow(pa and entryUp ? 1 : na, colorup=color.green, offset=-1)
plotarrow(pa and entryDn ? -1 : na, colordown=color.red, offset=-1)
plotchar(sl and entryUp ? low - ta.tr : na, char="B", location=location.absolute, color=color.green)
plotchar(sl and entryDn ? high + ta.tr : na, char="S", location=location.absolute, color=color.red)