OPEN-SOURCE SCRIPT
Aggiornato MA Deviation Indicator

# MA Deviation Indicator (MADI)
A TradingView indicator designed to visualize price deviation from moving averages and help identify optimal entry and exit points.
## Overview
This indicator measures how much the current price deviates from its moving average and provides the following features:
- Moving average line display
- Configurable deviation rate levels
- Signal display based on deviation rates
- Real-time deviation rate calculation
## Key Features
### 1. Moving Average Display
- Choose between **EMA (Exponential Moving Average)** or **SMA (Simple Moving Average)**
- Default period: 21
- Displayed as an aqua-colored line
### 2. Deviation Rate Levels
- **Level 1 (Default 0.7%)**: Light gray lines
- **Level 2 (Default 2.0%)**: Dark gray lines
- Displayed symmetrically above and below the moving average
### 3. Deviation Rate Signals
- **Red triangles**: Within 0.7% deviation (optimal range)
- **Orange triangles**: 0.7%-2.0% deviation (caution range)
- Displayed as small triangles at the top of the chart
## Configuration Parameters
### Moving Average Settings
| Parameter | Default Value | Description |
|-----------|---------------|-------------|
| Moving Average Period | 21 | Calculation period for moving average (1-200) |
| Moving Average Type | EMA | Type of moving average (EMA/SMA) |
### Deviation Rate Settings
| Parameter | Default Value | Description |
|-----------|---------------|-------------|
| Deviation Rate 1 (%) | 0.7 | First deviation rate level (0.1-10.0%) |
| Deviation Rate 2 (%) | 2.0 | Second deviation rate level (0.1-10.0%) |
### Display Settings
| Parameter | Default Value | Description |
|-----------|---------------|-------------|
| Show Moving Average Line | true | Show/hide moving average line |
| Show Deviation Rate Signals | false | Show/hide deviation rate signals |
| Show Deviation Rate Levels | true | Show/hide deviation rate level lines |
---
**Disclaimer**: This indicator is not investment advice. In actual trading, combine multiple indicators and implement proper risk management.
A TradingView indicator designed to visualize price deviation from moving averages and help identify optimal entry and exit points.
## Overview
This indicator measures how much the current price deviates from its moving average and provides the following features:
- Moving average line display
- Configurable deviation rate levels
- Signal display based on deviation rates
- Real-time deviation rate calculation
## Key Features
### 1. Moving Average Display
- Choose between **EMA (Exponential Moving Average)** or **SMA (Simple Moving Average)**
- Default period: 21
- Displayed as an aqua-colored line
### 2. Deviation Rate Levels
- **Level 1 (Default 0.7%)**: Light gray lines
- **Level 2 (Default 2.0%)**: Dark gray lines
- Displayed symmetrically above and below the moving average
### 3. Deviation Rate Signals
- **Red triangles**: Within 0.7% deviation (optimal range)
- **Orange triangles**: 0.7%-2.0% deviation (caution range)
- Displayed as small triangles at the top of the chart
## Configuration Parameters
### Moving Average Settings
| Parameter | Default Value | Description |
|-----------|---------------|-------------|
| Moving Average Period | 21 | Calculation period for moving average (1-200) |
| Moving Average Type | EMA | Type of moving average (EMA/SMA) |
### Deviation Rate Settings
| Parameter | Default Value | Description |
|-----------|---------------|-------------|
| Deviation Rate 1 (%) | 0.7 | First deviation rate level (0.1-10.0%) |
| Deviation Rate 2 (%) | 2.0 | Second deviation rate level (0.1-10.0%) |
### Display Settings
| Parameter | Default Value | Description |
|-----------|---------------|-------------|
| Show Moving Average Line | true | Show/hide moving average line |
| Show Deviation Rate Signals | false | Show/hide deviation rate signals |
| Show Deviation Rate Levels | true | Show/hide deviation rate level lines |
---
**Disclaimer**: This indicator is not investment advice. In actual trading, combine multiple indicators and implement proper risk management.
Note di rilascio
# MA Deviation Indicator (MADI)A TradingView indicator designed to visualize price deviation from moving averages and help identify optimal entry and exit points.
## Overview
This indicator measures how much the current price deviates from its moving average and provides the following features:
- Moving average line display
- Configurable deviation rate levels
- Signal display based on deviation rates
- Real-time deviation rate calculation
## Key Features
### 1. Moving Average Display
- Choose between **EMA (Exponential Moving Average)** or **SMA (Simple Moving Average)**
- Default period: 21
- Displayed as an aqua-colored line
### 2. Deviation Rate Levels
- **Level 1 (Default 0.7%)**: Light gray lines
- **Level 2 (Default 2.0%)**: Dark gray lines
- Displayed symmetrically above and below the moving average
### 3. Deviation Rate Signals
- **Red triangles**: Within 0.7% deviation (optimal range)
- **Orange triangles**: 0.7%-2.0% deviation (caution range)
- Displayed as small triangles at the top of the chart
## Configuration Parameters
### Moving Average Settings
| Parameter | Default Value | Description |
|-----------|---------------|-------------|
| Moving Average Period | 21 | Calculation period for moving average (1-200) |
| Moving Average Type | EMA | Type of moving average (EMA/SMA) |
### Deviation Rate Settings
| Parameter | Default Value | Description |
|-----------|---------------|-------------|
| Deviation Rate 1 (%) | 0.7 | First deviation rate level (0.1-10.0%) |
| Deviation Rate 2 (%) | 2.0 | Second deviation rate level (0.1-10.0%) |
### Display Settings
| Parameter | Default Value | Description |
|-----------|---------------|-------------|
| Show Moving Average Line | true | Show/hide moving average line |
| Show Deviation Rate Signals | false | Show/hide deviation rate signals |
| Show Deviation Rate Levels | true | Show/hide deviation rate level lines |
---
**Disclaimer**: This indicator is not investment advice. In actual trading, combine multiple indicators and implement proper risk management.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.