strategy MACD and RSI alert fixed

867 4 83
I notice that my previous request for help has gathered alot of attention. This is the fixed alert for anyone who wants it, sorry it has been so long since the initial video but I have been super busy with exam work.
Remove from Favorite Scripts Add to Favorite Scripts
study(title="Strategy MACD and RSI alert", shorttitle="Strategy MACD and RSI alert", overlay = false )
fastLength = input(8, minval=1)
slowLength = input(16,minval=1)
hline(0, color=purple, linestyle=dashed)
fastMA = ema(close, fastLength)
slowMA = ema(close, slowLength)
macd = fastMA - slowMA
signal = sma(macd, signalLength)

Length = input(10, minval=1)
Oversold = input(49, minval=1)
Overbought = input(51, minval=1)
xRSI = rsi(close, Length)

pos = iff(xRSI > Overbought and signal < macd, 1,
        iff(xRSI < Oversold and signal > macd, -1, nz(pos[1], 0))) 
poschange = (pos[1] == -1 and pos == 1) or (pos[1] == 1 and pos == -1 ) ? 1 : 0  
barcolor(pos == -1 ? red: pos == 1 ? green : blue)

//plot(pos, title="pos", style=line, linewidth=1, color=red )
plot(poschange, title="change of colour alert", style=line, linewidth=1, color=yellow )
Can you teach me how it works? I am a programmer and new to trading. TIA.
munsifk GMOTruths
You want to know how to set up the alerts? or how the internals of the indicator work?
Love this setup, works a treat. Here's how I display mine for trading bitcoin. Still not too sure how to set an alert though.

+1 Reply
munsifk Arcadia

This will tell you
+1 Reply
Ideas Scripts Chart
United States
United Kingdom
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out