OPEN-SOURCE SCRIPT

MA Cross MTF Alert (Miu)

129
This script extends the classic moving average crossover strategy with support for up to 8 user-defined symbols across 4 custom timeframes, combined with a visual and alert system designed for traders who monitor multiple assets simultaneously.

Unlike traditional MA crossover tools, this script enables traders to receive real-time alerts for crossovers across multiple assets and timeframes, even when the script is not actively displayed on the chart — ideal for passive monitoring in multi-asset strategies.

What it does:
This script calculates two customizable moving averages (SMA or EMA) for each selected symbol and timeframe.
It then tracks crossover events:
- Bullish crossover when the fast MA crosses above the slow MA
- Bearish crossunder when the fast MA crosses below the slow MA

On the chart, it also displays the crossover signals for the current symbol and timeframe using color-coded cross icons.

Key features:
- Select SMA or EMA type for both moving averages
- Customize MA lengths and colors
- Works with any asset and timeframe
- Alerts include symbol and timeframe info for easy identification

How to use:
1) Add the indicator to your chart.
2) Choose the moving average type and lengths.
3) Enable/disable any of the 8 symbols and 4 timeframes.
4) Set up TradingView alerts by clicking “Create Alert” and selecting one of the alert() calls.
5) You will receive a message like:
BTC (1h) | MA Crossover ▲ or ETH (15m) | MA Crossunder ▼

Technical note:
This script uses request.security() to retrieve moving average values from up to 8 different symbols and 4 different timeframes in real time.

Feel free to leave your feedback or suggestions in the comments section below.

Enjoy!

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.