When the is Red the Far is above the Near
The color changes when the Near and Far cross
The single line is the Signal line
The Signal line can be set at any look back period.
Changing the Signal will not change when the Near and Far cross, or when the color of the Signal changes
Changing the Look Back Period of the Signal will change how near or far it is from current price
You can change the look back period of any of the EMAs
What this does for you.....
This allows you to implement an Cross while only displaying 1 on the chart.
This means less clutter and allows you to adjust your "warning track" for exit rules.
In other words your for your exit rule does not have to be one of the EMAs crossing.
You can tighten your exit rule closer or give it more room without effecting the cross parameter.
Notice that in these images the point at which the changes color (the crossover) does not change
but the proximity to current price of the Signal line does.
study("DW-3 Signal Line",overlay=true)
// Open Source
EMA_Near = input(defval=8, type=integer)
EMA_Signal = input(defval=14, type=integer)
EMA_Far = input(defval=21, type=integer)
EMAblue = (close,EMA_Near)
EMAred = (close,EMA_Far)
//color = SMAblue > SMAred ? #6DBEE5 : red
color = EMAblue > EMAred ? lime : red
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.