OPEN-SOURCE SCRIPT

Mickey's EMA

271
Mickey’s EMA is a lightweight, overlay indicator that combines two Exponential Moving Averages (EMAs) with automatic entry, stop-loss and target visual signals—plus dynamic JSON alerts for seamless webhook integration. It’s designed for both day-traders and swing-traders who want clear, on-chart cues and fully-customizable risk parameters.

🔍 Overview
  • Dual EMAs (fast & slow) to capture trend changes.
  • Automated “BUY” / “SELL” markers at every EMA crossover.
  • Customizable Stop-Loss % and Target % levels, plotted as ❌ and 🎯 bubbles.
  • “SL Hit (Custom)” if the opposite EMA crossover occurs before price touches your stop level.
  • JSON-formatted alerts containing ticker, instrument type, timeframe, trend (“CE” for bullish, “PE” for bearish), and price—ready for webhooks.


⚙️ Inputs
| Setting | Default | Description |
| ------------------------ | ------- | ----------------------------------------------- |
| **Fast EMA Length** | 20 | Period for the faster EMA. |
| **Slow EMA Length** | 200 | Period for the slower EMA. |
| **Price Source** | Close | Data series to calculate EMAs on. |
| **Custom Stop Loss %** | 0.1% | Stop-loss level as a percentage of entry price. |
| **Target %** | 0.5% | Profit-target level as a percentage of entry. |
| **Show Entry/SL/Target** | ON | Toggle all entry, SL and target visuals. |

📊 What It Plots
  1. Fast EMA (blue) & Slow EMA (white) overlayed on price.
  2. BUY 🟢 label below bar when Fast EMA crosses above Slow EMA.
  3. SELL 🔴 label above bar when Fast EMA crosses below Slow EMA.
  4. ❌ (Custom) bubble at entry price if an opposite EMA crossover occurs before price hits your custom stop-loss.
  5. ❌ bubble at the stop-loss price when price actually breaches the stop level.
  6. 🎯 bubble at target price when price first reaches your profit-target level.


🔔 Alerts & Webhooks
  • On-screen alert conditions “Mickey’s EMA → BUY” and “Mickey’s EMA → SELL” appear in the Create-Alert dialog.
  • Dynamic JSON payload sent via alert() when a crossover fires, e.g.:

Pine Script®
{ "script": "AAPL", "scriptType": "equity", "instrumentType": "NASDAQ", "timeframe": "5", "trend": "CE", "price": 174.25 }

Use these alerts to integrate with bots, chat systems, manual, or any webhook-driven workflow.

🚀 Why Use Mickey’s EMA?
  • Clarity & Precision: All signals appear exactly at the EMA or price-level of interest.
  • Custom Risk Management: Define your own stop-loss and target percentages.
  • Seamless Automation: Dynamic JSON alerts mean zero manual setup for webhooks.
  • Versatile: Equally effective on intraday charts or daily/weekly timeframes.


Add Mickey’s EMA to your TradingView chart today and get instant, aesthetically-pleasing guidance on trend entries, risk exits, and profit targets—all in one elegant overlay.

免責聲明

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