SeaSide420

EURNZDbot

This Strategy watches 3 pairs at once.
EUR/USD NZD/USD EUR/NZD
it trades on EUR/NZD based on HULL_MA movements of all 3.
It also uses SAR and DT on the EUR/NZD chart.
Taken from the MT4 robot EURNZDbot
從常用腳本中移除 新增至常用腳本

評論

operation add to chart failed, reason: line 51: mismatched imput 'strategy.close' expecting 'end of line without line continuation'
+1 回覆
hi can i use it? please
回覆
SeaSide420 behzadh666
@behzadh666,
//@version=2
// for EURNZD
strategy("EURNZDbot", shorttitle="ENbot", overlay=true, default_qty_type=strategy.percent_of_equity, max_bars_back=720, default_qty_value=100, calc_on_order_fills= true, calc_on_every_tick=true, pyramiding=0)
keh=input(title="Double HullMA",type=integer,defval=3, minval=1)
dt = input(defval=0.0010, title="Decision Threshold (0.001)", type=float, step=0.0001)
SL = input(defval=-2100.00, title="Stop Loss in $", type=float, step=1)
TP = input(defval=4200.00, title="Target Point in $", type=float, step=1)
ot=1
src = ohlc4
EU=(security("EURUSD", '15', src))
e2ma=2*wma(EU,round(keh/2))
ema=wma(EU,keh)
ediff=e2ma-ema
esqn=round(sqrt(keh))
e2ma1=2*wma(EU,round(keh/2))
ema1=wma(EU,keh)
ediff1=e2ma1-ema1
esqn1=round(sqrt(keh))
e1=wma(ediff,esqn)
e2=wma(ediff1,esqn)
NZ=(security("NZDUSD", '15', src))
n2ma=2*wma(NZ,round(keh/2))
nma=wma(NZ,keh)
ndiff=n2ma-nma
nsqn=round(sqrt(keh))
n2ma1=2*wma(NZ,round(keh/2))
nma1=wma(NZ,keh)
ndiff1=n2ma1-nma1
nsqn1=round(sqrt(keh))
n1=wma(ndiff,nsqn)
n2=wma(ndiff1,nsqn)
CUR=(security("EURNZD", '15', src))
s2ma=2*wma(CUR,round(keh/2))
sma=wma(CUR,keh)
sdiff=s2ma-sma
ssqn=round(sqrt(keh))
s2ma1=2*wma(CUR,round(keh/2))
sma1=wma(CUR,keh)
sdiff1=s2ma1-sma1
ssqn1=round(sqrt(keh))
s1=wma(sdiff,ssqn)
s2=wma(sdiff1,ssqn)
confidence=(security(tickerid, 'D', src)-security(tickerid, 'D', src))/security(tickerid, 'D', src)
// b=s1>s2?lime:black
// c=s1>s2?black:red
// c1=plot(s1, color=b, title="hull1", linewidth=2, transp=0)
// c2=plot(s2, color=c, title="hull1", linewidth=2, transp=0)
// fill(c1, c2, color=c, transp=75)
closelong = e1<e2 and n1>n2 and s1<s2 and confidence<dt or strategy.openprofit<SL or strategy.openprofit>TP
if (closelong)
strategy.close("Long")
closeshort = e1>e2 and n1<n2 and s1>s2 and confidence>dt or strategy.openprofit<SL or strategy.openprofit>TP
if (closeshort)
strategy.close("Short")
longCondition = e1>e2 and n1<n2 and s1>s2 and strategy.opentrades<ot and confidence>dt
if (longCondition)
strategy.entry("Long",strategy.long)
shortCondition = e1<e2 and n1>n2 and s1<s2 and strategy.opentrades<ot and confidence<dt
if (shortCondition)
strategy.entry("Short",strategy.short)
回覆
Giving error after pasting in pine editor and saving :
line 51: mismatched input 'strategy.close' expecting 'end of line without continuation'
回覆
SeaSide420 Arpi2018
@Arpi2018, https://i.gyazo.com/105dc1d88e199b9fa13913d646143fe5.png
maybe need the spaces before the words start? on line 51
回覆
Arpi2018 SeaSide420
@SeaSide420, Hmm, error has gone . But after applying to chart, i do not see any long or short signal on 15 mins chart. What may be problem ?
回覆
Arpi2018 SeaSide420
@SeaSide420, Can you look in this problem: after applying to chart, i do not see any long or short signal on 15 mins chart. What may be problem ?
回覆
SeaSide420 Arpi2018
@Arpi2018, supposed to use newer indicator. eurnzd bot is old and unsupported. i would delete it if i could
回覆
//@version=2
// for EURNZD
strategy("EURNZDbot", shorttitle="ENbot", overlay=true, default_qty_type=strategy.percent_of_equity, max_bars_back=720, default_qty_value=100, calc_on_order_fills= true, calc_on_every_tick=true, pyramiding=0)
keh=input(title="Double HullMA",type=integer,defval=3, minval=1)
dt = input(defval=0.0010, title="Decision Threshold (0.001)", type=float, step=0.0001)
SL = input(defval=-2100.00, title="Stop Loss in $", type=float, step=1)
TP = input(defval=4200.00, title="Target Point in $", type=float, step=1)
ot=1
src = ohlc4
EU=(security("EURUSD", '15', src))
e2ma=2*wma(EU,round(keh/2))
ema=wma(EU,keh)
ediff=e2ma-ema
esqn=round(sqrt(keh))
e2ma1=2*wma(EU,round(keh/2))
ema1=wma(EU,keh)
ediff1=e2ma1-ema1
esqn1=round(sqrt(keh))
e1=wma(ediff,esqn)
e2=wma(ediff1,esqn)
NZ=(security("NZDUSD", '15', src))
n2ma=2*wma(NZ,round(keh/2))
nma=wma(NZ,keh)
ndiff=n2ma-nma
nsqn=round(sqrt(keh))
n2ma1=2*wma(NZ,round(keh/2))
nma1=wma(NZ,keh)
ndiff1=n2ma1-nma1
nsqn1=round(sqrt(keh))
n1=wma(ndiff,nsqn)
n2=wma(ndiff1,nsqn)
CUR=(security("EURNZD", '15', src))
s2ma=2*wma(CUR,round(keh/2))
sma=wma(CUR,keh)
sdiff=s2ma-sma
ssqn=round(sqrt(keh))
s2ma1=2*wma(CUR,round(keh/2))
sma1=wma(CUR,keh)
sdiff1=s2ma1-sma1
ssqn1=round(sqrt(keh))
s1=wma(sdiff,ssqn)
s2=wma(sdiff1,ssqn)
confidence=(security(tickerid, 'D', src)-security(tickerid, 'D', src))/security(tickerid, 'D', src)
// b=s1>s2?lime:black
// c=s1>s2?black:red
// c1=plot(s1, color=b, title="hull1", linewidth=2, transp=0)
// c2=plot(s2, color=c, title="hull1", linewidth=2, transp=0)
// fill(c1, c2, color=c, transp=75)
closelong = e1<e2 and n1>n2 and s1<s2 and confidence<dt or strategy.openprofit<SL or strategy.openprofit>TP
if (closelong)
strategy.close("Long")
closeshort = e1>e2 and n1<n2 and s1>s2 and confidence>dt or strategy.openprofit<SL or strategy.openprofit>TP
if (closeshort)
strategy.close("Short")
longCondition = e1>e2 and n1<n2 and s1>s2 and strategy.opentrades<ot and confidence>dt
if (longCondition)
strategy.entry("Long",strategy.long)
shortCondition = e1<e2 and n1>n2 and s1<s2 and strategy.opentrades<ot and confidence<dt
if (shortCondition)
strategy.entry("Short",strategy.short)
回覆
May I have access to this? Thank you.
回覆
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 如何運作 圖表功能 價格 推薦朋友 網站規則 幫助中心 網站 & 經紀商解決方案 小工具 圖表解決方案 輕量圖表庫 部落格 & 新聞 推特
概覽 個人資料設定 賬戶和賬單 推薦朋友 代幣 我的客服工單 幫助中心 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出