TradingView
JJeffery817
١٤ آذار مارس ٢٠٢٠ ١٢:٥٨

Color Change 50 SMA 

EUR/USDOANDA

الوصف

This 50 SMA changes color based on the trend of the market.

If the SMA is green, use your edge to determine when to buy.
If the SMA is red, use your edge to determine when to sell.

Can be used on any timeframe and market.

Customize this to meet your needs.
التعليقات
dalld700
How can I get alerts when the color changes?
I know how to setup alerts, but this one doesn't seem to have that function (color change alert).
Is there a script hack for that?
Thanks
jeffkc111
great script thank you
avengine
from your script, what logic do you use to make the color change, since I saw that it is not the peak that the color change, it is a bit early then the middle.
Tinky-17
Is there a way to filter 50 SMA change color from red to green?
GarethSA
Hi

About your color change 50 sma script ....

Can you please add the code to this script of mine below so the line changes color when price crosses like you have in your script?

+++++++++++++++
//@version=4
study(title="SMMA", shorttitle="** SMMA", overlay=true, resolution="D")

len = input(21, minval=1, title="Length")
src = input(close, title="Source")
smma = 0.0
smma := na(smma[1]) ? sma(src, len) : (smma[1] * (len - 1) + src) / len
plot(smma, color=color.blue)

++++++++++++++++++++++++++++++++++++++++

Appreciate it
Michael_Guldbech
Great job
المزيد