GBPJPY 4h Indicator

Strategy + Indicator (with the same name).

Make your personal E-mail Alert for the entry.
Remove from Favorite Scripts Add to Favorite Scripts
study(title="gj4h", shorttitle="gj4h", overlay=true)

fastl = security(tickerid, "240", sma(close, 8))
slowl = security(tickerid, "240", sma(close, 60))
tpl = input(title="Take profit", type=integer, defval=5450)
sll = input(title="Stop loss", type=integer, defval=2950)
fasts = security(tickerid, "240", sma(close, 9))
slows = security(tickerid, "240", sma(close, 71))
tps = input(title="Take profit", type=integer, defval=5970)
sls = input(title="Stop loss", type=integer, defval=3200)

buy = cross(fastl,slowl) and fastl>slowl and close
sell = cross(fasts,slows) and fasts<slows and close
long = (buy*close? buy*close : na)
short = (sell*close? sell*close : na)

plot(fastl, color=silver, trackprice=false, title="8", transp=80)
plot(slowl, color=gray, trackprice=false, title="60", transp=80)
plot(fasts, color=silver, trackprice=false, title="9", transp=80)
plot(slows, color=gray, trackprice=false, title="71", transp=80)

plotshape(long, "Alert Buy", shape.triangleup, location.belowbar, black, offset=0, text="buy", size=size.auto)
plotshape(short, "Alert Sell", shape.triangledown, location.abovebar, black, offset=0, text="sell", size=size.auto)

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

tpbuy = long + tpl/100000*100
tpbb = security(tickerid, "60", tpbuy)
plot(tpbb, "Long Take", style=linebr, linewidth=3, color=green, trackprice=true, offset=0)
slbuy = long - sll/100000*100
slbb = security(tickerid, "60", slbuy)
plot(slbb, "Long Stop", style=linebr, linewidth=3, color=fuchsia, trackprice=true, offset=0)

tpsell = short - tps/100000*100
tpss = security(tickerid, "60", tpsell)
plot(tpss, "Short Take", style=linebr, linewidth=3, color=green, trackprice=true, offset=0)
slsell = short + sls/100000*100
slss = security(tickerid, "60", slsell)
plot(slss, "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
SV Svenska
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