8sma34 EURUSD 1h Indicator

Strategy + Indicator script (with the same name).

You can make Alert for the entry. It's simple!
Apply this script to the EURUSD             1h chart and click to the button "Create Alert" (upper panel, alarm clock+).
On the opened window find "Conditions" and choose "8ma34 eu 1h (500, 600)", select "8" and "Crossing", below choose again "8ma34 eu 1h (500, 600)" and select 34. Select the "Frequency" as "Once per bar (on close)". Choose in "Alert Actions" the "Send E-mail" and write your "Message", for example: "Crossing 8ma34 eu 1h (500, 600) on EURUSD             , 1h"
Remove from Favorite Scripts Add to Favorite Scripts
study(title="8sma34 eu", shorttitle="eu", overlay=true)
fast = security(tickerid, "60", sma(close, 8))
slow = security(tickerid, "60", sma(close, 34))
tp = input(title="Take profit", type=integer, defval=500)
sl = input(title="Stop loss", type=integer, defval=600)
buy = cross(fast,slow) and fast>slow and close
sell = cross(fast,slow) and fast<slow and close
long = (buy*close? buy*close : na)
short = (sell*close? sell*close : na)

plot(fast, color=silver, trackprice=false, title="8", transp=80)
plot(slow, color=gray, trackprice=false, title="34", transp=80)

plotshape(long, "Buy", shape.square, location.absolute, blue, offset=0, text="buy", size=size.tiny)
plotshape(short, "Sell", shape.square, location.absolute, red, offset=0, text="sell", size=size.tiny)

//entrybuy = security(tickerid, "60", long)
//plot(entrybuy, "Buy", style=linebr, linewidth=3, color= blue, trackprice=true, offset=0)
//entrysell = security(tickerid, "60", short)
//plot(entrysell, "Sell", style=linebr, linewidth=3, color= red, trackprice=true, offset=0)

tpbuy = long + tp/100000
tpb = security(tickerid, "60", tpbuy)
plot(tpb, "Long Take", style=linebr, linewidth=3, color= lime, trackprice=true, offset=0)
slbuy = long - sl/100000
slb = security(tickerid, "60", slbuy)
plot(slb, "Long Stop", style=linebr, linewidth=3, color= fuchsia, trackprice=true, offset=0)

tpsell = short - tp/100000
tps = security(tickerid, "60", tpsell)
plot(tps, "Short Take", style=linebr, linewidth=3, color= lime, trackprice=true, offset=0)
slsell = short + sl/100000
sls = security(tickerid, "60", slsell)
plot(sls, "Short Stop", style=linebr, linewidth=3, color= fuchsia, trackprice=true, offset=0)

EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out