Famous 7 Time World Trading Champion Chuck Hughes found the 50 and 100 EMA to be the best Signal for a Change in Trend. Through extensive back-testing he found these EMA’s to give the earliest signal that also resulted in a Long-Term Change in Trend.
Dotted Line represents Long-Term EMA. The 100 EMA in this example. Solid line represents the Short-Term EMA. The 50 EMA in this example.
If Short-Term EMA is ABOVE Long-Term EMA...Color = Green. If Short-Term EMA is BELOW Long-Term EMA...Color = Red.
@TheObDur, Hey! 2012 here. Can I have that answer back, please?
TradeWithConfidence
⋅
Can anyone help me please! I built an indicator that has uses only 1 line! But it has 2 colors!
I want to get an alert when line color changes (Example: Line turns green = "Buy", line turns red = "Sell"
I try everything and I can't get it to work. Can anyone please help please!
linecolor2=direction2 < 0 ? red : direction2 > 0 ? green : red
ChrisMoody
⋅
Code is Below:
//Created by user ChrisMoody
//Long EMA = Dots, Short EMA = Line
//If Short EMA is ABOVE Long EMA = Lime Color, If Short EMA is BELOW Long EMA = Red Color
study(title="_CM_Double EMA Trend Color", shorttitle="_CM-2EMA-Trend", overlay=true)
src = close, len = input(50, minval=1, title="Short EMA")
src2 = close, len2 = input(100, minval=1, title="Long EMA")
emaShort = ema(src, len)
emaLong = ema(src2, len2)
//If you do not want the Fill gradient between the EMA's follow the steps below.
//Erase the p1 = in line 12 and 13 so plot is at the far left
//Erase line 15 or put two forward slashes in front of the word fill, just like the two forward slashes at the beginning of this line.
KenvinZone
⋅
@ChrisMoody,
Hello, thanks for your Tutorials & Code.
Could you help me to know how to code like this, your code is 99% like this but I dont know how to code like this one.
shane1994
⋅
how can we get it to where i can run the strategy tester with this code its not letting me
akilli951
⋅
Hi Chris, Can you tell me please how I can compare two ma lines with the same period and different offset on chart my purpose the cross points in shifted moving Average with same period and different offset
UnknownUnicorn2285229
⋅
Hi, thanks for your script, I'm trying to modify it but I'm getting this error "Add to Chart operation failed, reason: Script could not be translated from: |B|ema10 close, len10 = input"
What am I doing wrong?
Script:
study(title="_5 EMA Trend Color", shorttitle="_5_EMA-Trend", overlay=true)
Can you please tell me how I can start learning pine script?
Which editor can I use?