PROTECTED SOURCE SCRIPT
מעודכן

SMMA Strategy [SMMA ULTIMATE]

23
SMMA 21/50/200 + RSI — M5/M15 (Rule-marked entries & exits)
Release Notes (EN)
Version: 1.0 (Pine v6 — Indicator)
Date: 14 Oct 2025
Type: Multi-TF overlay indicator with rule-based entry/exit markers and optional runtime alerts

🚀 Summary
A disciplined multi-timeframe scanner for M5 and M15 that highlights rule-driven setups (R1…R4) around SMMA 21/50/200, RSI (buy > 52 / sell < 48), directional VWAP, volume, and ATR activity.
It also simulates ATR-based TP/SL/Break-Even to provide immediate visual feedback and tags each trade idea with the origin rule.

✨ Highlights
• Full MTF stack (M5 & M15) with dedicated series (price, volume, SMMA, ATR, VWAP, RSI) and lookahead_off to avoid repaint.
• 4 modular entry rules (enable/disable independently):
◦ R1: Price crosses the max/min of SMMA(21/50/200) + RSI filter + market OK.
◦ R2: Touch of SMMA21 (pullback) + trend alignment + RSI + market OK.
◦ R3: Three candles impulse + engulfing reversal + RSI + market OK.
◦ R4: SMMA21/SMMA50 cross (structural momentum) + market OK.
• Stackable filters (toggle): Trend (price vs SMMA200), Directional VWAP (price vs VWAP + slope), Volume (Vol > MA×k), ATR activity (ATR > MA(ATR,20)×k).
• RSI thresholds: BUY if RSI > 52, SELL if RSI < 48 (per TF).
• ATR exit simulation: SL = k×ATR, TP = k×ATR, Break-Even armed after ATR gain (return to entry → BE exit).
• Clear rule tags: Entry/exit markers carry R1…R4 for immediate provenance.
• Optional runtime alerts: Human-readable messages on entries and exits, per TF and rule.

🔧 Key Inputs
General
• Price source for display: chart candles / force regular / force Heikin Ashi.
• Lengths: SMMA 21/50/200, RSI (14), ATR (14), Volume MA (20).
• RSI thresholds: Buy > 52, Sell < 48.
Filters (on/off)
• Trend (price vs SMMA200).
• Directional VWAP (price relative to VWAP and VWAP slope).
• ATR activity gate.
• Volume gate (Volume > MA×multiplier).
Rules (on/off)
• Enable R1/R2/R3/R4 individually.
Exit simulation
• Use ATR stops (SL/TP multipliers).
• Break-Even (armed by ATR progress).
Alerts
• Enable runtime alerts to fire alert() at bar close.

🧠 Rule Logic (condensed)
• R1 BUY/SELL: Cross of max/min(SMMA21,50,200) + RSI gate + all selected filters OK.
• R2 BUY/SELL: Touch of SMMA21 + price aligned vs SMMA50/200 + RSI + filters OK.
• R3 BUY/SELL: Three consecutive bars in one direction + engulfing opposite + RSI + filters OK.
• R4 BUY/SELL: SMMA21/SMMA50 crossover + filters OK.
Entry priority per TF: R1 > R4 > R2 > R3.

🔔 Runtime Alerts
When enabled, the script emits close-of-bar alerts with TF and rule tag:
• 🚀 M5/M15 ENTRY LONG (R#)
• 🔻 M5/M15 ENTRY SHORT (R#)
• ✅ M5/M15 EXIT TP (R#)
• ❌ M5/M15 EXIT SL (R#)
• 🟨 M5/M15 EXIT BE (R#)
(You can still build custom UI alerts if you need additional combinations.)

🖼 Visuals
• SMMA 21/50/200 and VWAP (green when price above, red below).
• Plotshape per rule and exit type (TP/SL/BE) with R1…R4 tags on M5 and M15.
• Optional Heikin Ashi for display (core MTF calculations remain consistent).

🔒 Robustness & No-Repaint Notes
• All MTF request.security calls use lookahead_off.
• Pattern logic (three bars, engulfing) is evaluated on bar close.
• ATR/TP/SL/BE are indicator-level simulations using the chart’s H/L/Close (standard intrabar limitations).

⚠️ Limitations & Tips
• This is an indicator, not a strategy: no orders are sent; exits are simulated for visualization.
• Signals are generated on bar close.
• MTF signals synchronize to the chart TF’s close, not intrabar ticks.
הערות שחרור
Update

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.