OPEN-SOURCE SCRIPT
FIA Trend + Momentum 20/50/200

## FIA Trend + Momentum 20/50/200
The **FIA Trend + Momentum 20/50/200** indicator combines long-term trend structure with momentum analysis and multi-timeframe confirmation.
It is designed to make market direction easier to identify visually while also filtering potential setups through RSI, MACD and Higher Timeframe confirmation.
### EMA Trend Structure
The indicator uses three Exponential Moving Averages:
EMA 20 for the short-term trend
EMA 50 for the medium-term trend
EMA 200 for the long-term trend
The background changes automatically depending on the EMA structure.
**Green**
EMA 20 > EMA 50 > EMA 200
Clearly bullish trend structure.
**Blue**
EMA 20 < EMA 50 while EMA 50 > EMA 200
Short-term weakness within a broader bullish trend.
**Orange**
EMA 20 > EMA 50 while EMA 50 < EMA 200
Short-term strength while the broader trend has not yet turned fully bullish.
**Red**
EMA 20 < EMA 50 < EMA 200
Clearly bearish trend structure.
The background colors are based only on the EMA structure. RSI, MACD and Higher Timeframe confirmation do not change the background color.
### RSI
The indicator uses a classic RSI calculation with a default length of 14.
RSI above 50 supports bullish momentum.
RSI below 50 supports bearish momentum.
The indicator also checks whether RSI is currently rising or falling, which is used as additional confirmation for pullback setups.
### MACD
The indicator uses the classic MACD settings:
Fast Length: 12
Slow Length: 26
Signal Length: 9
The MACD is used to evaluate:
Bullish or bearish momentum
MACD signal-line crossovers
Increasing or decreasing histogram momentum
### Higher Timeframe Confirmation
A selectable Higher Timeframe filter is included.
The indicator calculates the EMA 20/50/200 structure on the selected Higher Timeframe and checks whether the broader trend confirms the current setup.
This filter can be enabled or disabled in the settings.
### Setup Score
The indicator uses a scoring system with a maximum of 6 points.
EMA trend structure: 2 points
RSI confirmation: 1 point
MACD confirmation: 1 point
MACD momentum: 1 point
Higher Timeframe trend: 1 point
The minimum score required for a valid setup can be adjusted in the settings.
The default minimum score is 5 out of 6.
### Pullback Logic
The indicator also searches for potential pullbacks within established trends.
A bullish pullback requires a bullish EMA structure, a retracement toward the EMA 20, a close back above the EMA 20, rising RSI and bullish MACD confirmation.
The bearish logic works in the opposite direction.
### BUY and SELL Signals
A BUY or SELL label is only generated when several conditions align.
A **BUY signal** requires a sufficiently strong bullish setup score and either:
a confirmed bullish pullback
or
a bullish MACD crossover.
A **SELL signal** requires a sufficiently strong bearish setup score and either:
a confirmed bearish pullback
or
a bearish MACD crossover.
Signals are only marked when the condition appears for the first time, helping to avoid repeated labels on consecutive candles.
The signals are intended as confirmation tools and should not be interpreted as automatic trading instructions.
### Alerts
Built-in alerts are available for:
EMA 20/50 bullish crossover
EMA 20/50 bearish crossover
EMA 50/200 Golden Cross
EMA 50/200 Death Cross
FIA BUY setup
FIA SELL setup
### Important
This indicator is designed as a **trend and momentum analysis tool**.
It combines:
**EMA = trend direction**
**RSI = momentum strength**
**MACD = momentum direction and change**
**Higher Timeframe = broader trend confirmation**
It should not be used as a standalone trading system.
Always consider price action, support and resistance levels, volatility, market structure and appropriate risk management before making trading decisions.
For educational purposes only.
**Not financial advice.**
The **FIA Trend + Momentum 20/50/200** indicator combines long-term trend structure with momentum analysis and multi-timeframe confirmation.
It is designed to make market direction easier to identify visually while also filtering potential setups through RSI, MACD and Higher Timeframe confirmation.
### EMA Trend Structure
The indicator uses three Exponential Moving Averages:
EMA 20 for the short-term trend
EMA 50 for the medium-term trend
EMA 200 for the long-term trend
The background changes automatically depending on the EMA structure.
**Green**
EMA 20 > EMA 50 > EMA 200
Clearly bullish trend structure.
**Blue**
EMA 20 < EMA 50 while EMA 50 > EMA 200
Short-term weakness within a broader bullish trend.
**Orange**
EMA 20 > EMA 50 while EMA 50 < EMA 200
Short-term strength while the broader trend has not yet turned fully bullish.
**Red**
EMA 20 < EMA 50 < EMA 200
Clearly bearish trend structure.
The background colors are based only on the EMA structure. RSI, MACD and Higher Timeframe confirmation do not change the background color.
### RSI
The indicator uses a classic RSI calculation with a default length of 14.
RSI above 50 supports bullish momentum.
RSI below 50 supports bearish momentum.
The indicator also checks whether RSI is currently rising or falling, which is used as additional confirmation for pullback setups.
### MACD
The indicator uses the classic MACD settings:
Fast Length: 12
Slow Length: 26
Signal Length: 9
The MACD is used to evaluate:
Bullish or bearish momentum
MACD signal-line crossovers
Increasing or decreasing histogram momentum
### Higher Timeframe Confirmation
A selectable Higher Timeframe filter is included.
The indicator calculates the EMA 20/50/200 structure on the selected Higher Timeframe and checks whether the broader trend confirms the current setup.
This filter can be enabled or disabled in the settings.
### Setup Score
The indicator uses a scoring system with a maximum of 6 points.
EMA trend structure: 2 points
RSI confirmation: 1 point
MACD confirmation: 1 point
MACD momentum: 1 point
Higher Timeframe trend: 1 point
The minimum score required for a valid setup can be adjusted in the settings.
The default minimum score is 5 out of 6.
### Pullback Logic
The indicator also searches for potential pullbacks within established trends.
A bullish pullback requires a bullish EMA structure, a retracement toward the EMA 20, a close back above the EMA 20, rising RSI and bullish MACD confirmation.
The bearish logic works in the opposite direction.
### BUY and SELL Signals
A BUY or SELL label is only generated when several conditions align.
A **BUY signal** requires a sufficiently strong bullish setup score and either:
a confirmed bullish pullback
or
a bullish MACD crossover.
A **SELL signal** requires a sufficiently strong bearish setup score and either:
a confirmed bearish pullback
or
a bearish MACD crossover.
Signals are only marked when the condition appears for the first time, helping to avoid repeated labels on consecutive candles.
The signals are intended as confirmation tools and should not be interpreted as automatic trading instructions.
### Alerts
Built-in alerts are available for:
EMA 20/50 bullish crossover
EMA 20/50 bearish crossover
EMA 50/200 Golden Cross
EMA 50/200 Death Cross
FIA BUY setup
FIA SELL setup
### Important
This indicator is designed as a **trend and momentum analysis tool**.
It combines:
**EMA = trend direction**
**RSI = momentum strength**
**MACD = momentum direction and change**
**Higher Timeframe = broader trend confirmation**
It should not be used as a standalone trading system.
Always consider price action, support and resistance levels, volatility, market structure and appropriate risk management before making trading decisions.
For educational purposes only.
**Not financial advice.**
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.