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.
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。