TradingView
repo32
Jul 24, 2015 2:40 AM

Moving Average Colored EMA/SMA 

Apple Inc.NASDAQ

Description

This script will give you the ability to put an EMA and/or SMA on the chart that changes color based upon the direction. Default at startup is EMA visible and SMA hidden. When the MA is moving up, it is green. When the MA is moving down, it is red. You can change the color to whatever you like.
Comments
kimbosabe79
there seem to be 3 colors.. what does the blue color stand for?
vitalycool
can this indicator give message when price crossing line?
repo32
@vitalycool, You can do that with most indicators. Just right click on the line and setup an alert.
JunisNalik
How can I use the 'Colored EMA/SMA' (repo32) indicator so that it compares every asset on Tradingview and sends me an email as soon as it goes to green uptrend on the Monthly time-frame? I would love it if it could do this. It would save the trader from spending huge amounts of time in looking for an asset on Tradingview that has just gone into an uptrend.
rsree82
which language it is> and howto use?
OTMRob
This is really great, thanks for making it available.

I'm trying to apply the idea to this HPotter's ADV Line indicator, but can't figure it out. Any chance you could help?
This is the code:

study(title="Advance/Decline Volume Line", shorttitle="ADV Line", overlay = false)
AdvSymbolVolume = input(title="Advancing Volume Symbol", type=symbol, defval="USI:UVOL")
DecSymbolVolume = input(title="Declining Volume Symbol", type=symbol, defval="USI:DVOL")
Resolutin = input(title="Resolution", type=resolution, defval="D")
xASVValue = security(AdvSymbolVolume, Resolutin, close)
xDSVValue = security(DecSymbolVolume, Resolutin, close)
NetADV = xASVValue - xDSVValue
nRes = nz(nRes[1], 0) + NetADV
plot(nRes, color=green, title="ADV Line", style=line)

Many thanks in advance.
repo32
@OTMRob, At first glance you are trying to create a new value that is referencing itself (nRes): nRes = nz(nRes, 0) + NetADV
OTMRob
@repo32, thanks for the reply, sorry to take so long to reply myself, I hadn't noticed the alert...
I'm not familiar enough with pine to understand what you're saying there about the self referencing value, unfortunately, but would love to try to understand if you have the time to explain. This is @HPotter 's script.

I would be happy to pay for the script above with code that changes color based upon the direction added in.

Thanks,
Rob
repo32
@OTMRob, Please post the link to the script.
OTMRob
More