OPEN-SOURCE SCRIPT
Mickey's EMA

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
⚙️ 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
🔔 Alerts & Webhooks
Pine Script®
Use these alerts to integrate with bots, chat systems, manual, or any webhook-driven workflow.
🚀 Why Use Mickey’s EMA?
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.
🔍 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
- Fast EMA (blue) & Slow EMA (white) overlayed on price.
- BUY 🟢 label below bar when Fast EMA crosses above Slow EMA.
- SELL 🔴 label above bar when Fast EMA crosses below Slow EMA.
- ❌ (Custom) bubble at entry price if an opposite EMA crossover occurs before price hits your custom stop-loss.
- ❌ bubble at the stop-loss price when price actually breaches the stop level.
- 🎯 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.:
{
"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.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.