OPEN-SOURCE SCRIPT
DW-3 EMA Signal Line

When the EMA is Green the Near EMA is above the Far EMA
When the EMA is Red the EMA Far is above the EMA Near
The color changes when the EMA Near and EMA Far cross
The single line EMA is the EMA Signal line
The EMA Signal line can be set at any look back period.
Changing the EMA Signal will not change when the EMA Near and EMA Far cross, or when the color of the EMA Signal changes
Changing the Look Back Period of the EMA 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 EMA Cross while only displaying 1 EMA on the chart.
This means less clutter and allows you to adjust your "warning track" for exit rules.
In other words your EMA for your exit rule does not have to be one of the EMAs crossing.
You can tighten your exit rule EMA closer or give it more room without effecting the cross parameter.
Notice that in these images the point at which the EMA changes color (the crossover) does not change
but the proximity to current price of the EMA Signal line does.


//version=3
study("DW-3 EMA Signal Line",overlay=true)
//SMAs
// Open Source
//======================================================
EMA_Near = input(defval=8, type=integer)
EMA_Signal = input(defval=14, type=integer)
EMA_Far = input(defval=21, type=integer)
EMAblue = sma(close,EMA_Near)
EMAred = sma(close,EMA_Far)
//color = SMAblue > SMAred ? #6DBEE5 : red
color = EMAblue > EMAred ? lime : red
plot(ema(close,EMA_Signal),color=color,linewidth=4)
When the EMA is Red the EMA Far is above the EMA Near
The color changes when the EMA Near and EMA Far cross
The single line EMA is the EMA Signal line
The EMA Signal line can be set at any look back period.
Changing the EMA Signal will not change when the EMA Near and EMA Far cross, or when the color of the EMA Signal changes
Changing the Look Back Period of the EMA 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 EMA Cross while only displaying 1 EMA on the chart.
This means less clutter and allows you to adjust your "warning track" for exit rules.
In other words your EMA for your exit rule does not have to be one of the EMAs crossing.
You can tighten your exit rule EMA closer or give it more room without effecting the cross parameter.
Notice that in these images the point at which the EMA changes color (the crossover) does not change
but the proximity to current price of the EMA Signal line does.
//version=3
study("DW-3 EMA Signal Line",overlay=true)
//SMAs
// Open Source
//======================================================
EMA_Near = input(defval=8, type=integer)
EMA_Signal = input(defval=14, type=integer)
EMA_Far = input(defval=21, type=integer)
EMAblue = sma(close,EMA_Near)
EMAred = sma(close,EMA_Far)
//color = SMAblue > SMAred ? #6DBEE5 : red
color = EMAblue > EMAred ? lime : red
plot(ema(close,EMA_Signal),color=color,linewidth=4)
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.