OPEN-SOURCE SCRIPT
Spread Analyzer

This script plots the relative performance of the viewed security with respect to a selected benchmark. It can be used to identify assets higher than market average potential.
- The plot above is the relative volume.
- The plot below is the relative performance.
Computation is done by applying stochastic to the spread of the asset's current price/obv value to the benchmark defined by the Part1, 2 and 3.
The benchmark can be a portfolio as well:
Part1 = 4*SPY+2*QQQ
Part2 = XAUUSD+EURUSD
-PS: Each part may contain up to 10 symbols.
- The spread is calculated with the following formula
close / (Part1 + Part2 + Part3)
- Color code is based on the stochastic of macd of the spread.
The inputs:
length : lookback length for the stochastic
lenk : Smoothing factor(K) for stochastic
lend : EMA length(D)
MACD Fast / Slow / Smooth : MACD parameters used to determine the color code
- The plot above is the relative volume.
- The plot below is the relative performance.
Computation is done by applying stochastic to the spread of the asset's current price/obv value to the benchmark defined by the Part1, 2 and 3.
The benchmark can be a portfolio as well:
Part1 = 4*SPY+2*QQQ
Part2 = XAUUSD+EURUSD
-PS: Each part may contain up to 10 symbols.
- The spread is calculated with the following formula
close / (Part1 + Part2 + Part3)
- Color code is based on the stochastic of macd of the spread.
The inputs:
length : lookback length for the stochastic
lenk : Smoothing factor(K) for stochastic
lend : EMA length(D)
MACD Fast / Slow / Smooth : MACD parameters used to determine the color code
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.