Gorbie

USDCAD 4h Indicator

Strategy + Indicator

Make your personal Alert for the entry!
Remove from Favorite Scripts Add to Favorite Scripts
study(title="USDCAD 4h", shorttitle="uc4h", overlay=true)

fastl = security(tickerid, "240", sma(close, 8))
slowl = security(tickerid, "240", sma(close, 57))
tpl = input(title="Take profit", type=integer, defval=2080)
sll = input(title="Stop loss", type=integer, defval=1650)
fasts = security(tickerid, "240", sma(close, 40))
slows = security(tickerid, "240", sma(close, 102))
tps = input(title="Take profit", type=integer, defval=920)
sls = input(title="Stop loss", type=integer, defval=550)
c = 100000 //contract size

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)

//Signal
plot(fastl, color=silver, trackprice=false, title="8", transp=100)
plot(slowl, color=gray, trackprice=false, title="57", transp=100)
plot(fasts, color=silver, trackprice=false, title="40", transp=100)
plot(slows, color=gray, trackprice=false, title="102", transp=100)

//Alert
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)

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

//Long
tpbuy = long + tpl/c
tpbb = security(tickerid, "60", tpbuy)
plot(tpbb, "Long Take", style=linebr, linewidth=3, color=green, trackprice=false)
slbuy = long - sll/c
slbb = security(tickerid, "60", slbuy)
plot(slbb, "Long Stop", style=linebr, linewidth=3, color=fuchsia, trackprice=false)

//Short
tpsell = short - tps/c
tpss = security(tickerid, "60", tpsell)
plot(tpss, "Short Take", style=linebr, linewidth=3, color=green, trackprice=false)
slsell = short + sls/c
slss = security(tickerid, "60", slsell)
plot(slss, "Short Stop", style=linebr, linewidth=3, color=fuchsia, trackprice=false)
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