OPEN-SOURCE SCRIPT

Multi SMA Analyzer

92
Multi SMA Analyzer with Custom SMA Table & Advanced Session Logic

A feature-rich SMA analysis suite for traders, offering up to 7 configurable SMAs, in-depth trend detection, real-time table, and true session-aware calculations.
Ideal for those who want to combine intraday, swing, and higher-timeframe trend analysis with maximum chart flexibility.
Key Features

📊 Multi-SMA Overlay

- 7 SMAs (default: 5, 20, 50, 100, 200, 21, 34)—individually configurable (period, source, color, line style)
- Show/hide each SMA, custom line style (solid, stepline, circles), and color logic
- Dynamic color: full opacity above SMA, reduced when below

⏰ Session-Aware SMAs
- Each SMA can be calculated using only user-defined session hours/days/timezone
- “Ignore extended hours” option for accurate intraday trend

📋 Smart Data Table
- Live SMA values, % distance from price, and directional arrows (↑/↓/→)
- Bull/Bear/Sideways trend classification
- Custom table position, size, colors, transparency
- Table can run on chart or custom (higher) timeframe for multi-TF analysis

🎯 Golden/Death Cross Detection
- Flexible crossover engine: select any two from (5, 10, 20, 50, 100, 200) for fast/slow SMA cross signals
- Plots icons (★ Golden, 💀 Death), optional crossover labels with custom size/colors

🏷️ SMA Labels
- Optional on-chart SMA period labels
- Custom placement (above/below/on line), size, color, offset

🚨 Signal & Trend Engine
- Bull/Bear/Sideways logic: price vs. multiple SMAs (not just one pair)
- Volume spike detection (2x 20-period SMA)
- Bullish engulfing candlestick detection
- All signals can use chart or custom table timeframe

🎨 Visual Customization
- Dynamic background color (Bull: green, Bear: red, Neutral: gray)
- Every visual aspect is customizable: label/table colors, transparency, size, position

🔔 Built-in Alerts
- Crossovers (SMA20/50, Golden/Death)
- Bull trend, volume spikes, engulfing pattern—all alert-ready

How It Works
- Session Filtering:
- SMAs can be set to count only bars from your chosen market session, for true intraday/trading-hour signals

Dynamic Table & Signals:
- Table and all signal logic run on your selected chart or custom timeframe

Flexible Crossover:
- Choose any pair (5, 10, 20, 50, 100, 200) for cross detection—SMA 10 is available for crossover even if not shown as an SMA line

Everything is modular:
- Toggle features, set visuals, and alerts to your workflow

🚨 How to Use Alerts

- All key signals (crossovers, trend shifts, volume spikes, engulfing patterns) are available as alert conditions.
To enable:
- Click the “Alerts” (clock) icon at the top of TradingView.
- Select your desired signal (e.g., “Golden Cross”) from the condition dropdown.
- Set your alert preferences and create the alert.
- Now, you’ll get notified automatically whenever a signal occurs!

Perfect For
- Multi-timeframe and swing traders seeking higher timeframe SMA confirmation
- Intraday traders who want to ignore pre/post-market data
- Anyone wanting a modern, powerful, fully customizable multi-SMA overlay

// P.S: Experiment with Golden Cross where Fast SMA is 5 and Slow SMA is 20.
// Set custom timeframe for 4 hr while monitoring your chart on 15 min time frame.
// Enable Background Color and Use Table Timeframe for Background.
// Uncheck Pine labels in Style tab.

Clean, open-source, and loaded with pro features—enjoy!
Like, share, and let me know if you'd like any new features added.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。