OPEN-SOURCE SCRIPT
250710 Momentum Buy Trigger

What It Does (Step by Step)
Sets Up a Moving Average
Calculates a 200-period Simple Moving Average (SMA) of the closing price.
You can change the period by adjusting the maPeriod input.
Calculates Momentum with MACD Histogram
Uses MACD (Moving Average Convergence Divergence) with standard settings:
Fast EMA: 12
Slow EMA: 26
Signal Line: 9
Subtracts the signal line from the MACD line to get the MACD histogram (a momentum indicator).
Defines a Buy Signal
The script checks two conditions:
Price is below the 200-period SMA → suggesting the asset is undervalued.
MACD histogram is rising (i.e., current value is greater than the previous bar) → suggesting bullish momentum is starting.
If both are true on the same bar, a "Buy" signal is generated.
Sets Up a Moving Average
Calculates a 200-period Simple Moving Average (SMA) of the closing price.
You can change the period by adjusting the maPeriod input.
Calculates Momentum with MACD Histogram
Uses MACD (Moving Average Convergence Divergence) with standard settings:
Fast EMA: 12
Slow EMA: 26
Signal Line: 9
Subtracts the signal line from the MACD line to get the MACD histogram (a momentum indicator).
Defines a Buy Signal
The script checks two conditions:
Price is below the 200-period SMA → suggesting the asset is undervalued.
MACD histogram is rising (i.e., current value is greater than the previous bar) → suggesting bullish momentum is starting.
If both are true on the same bar, a "Buy" signal is generated.
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.