justsayok

Mirocana.com V4.20

253
//@version=2
// Microcana.com strategy by pilotgsms - version 4.20 <<<< Edited by Seaside420 >>>> special thanks to 55cosmicpineapple
// Hull_MA_cross added to script
strategy("Mirocana.com V4.20", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
dt = input(defval=0.0010, title="Decision Threshold", type=float, step=0.0001)
keh=input(title="Double HullMA Cross",type=integer,defval=7, minval=1)
confidence=(security(tickerid, 'D', close)-security(tickerid, 'D', close))/security(tickerid, 'D', close)
prediction = confidence > dt ? true : confidence < -dt ? false : prediction
n2ma=2*wma(close,round(keh/2))
nma=wma(close,keh)
diff=n2ma-nma,sqn=round(sqrt(keh))
n2ma1=2*wma(close,round(keh/2))
nma1=wma(close,keh)
diff1=n2ma1-nma1,sqn1=round(sqrt(keh))
n1=wma(diff,sqn)
n2=wma(diff1,sqn)
if (prediction and n1>n2)
strategy.exit("Close", "Short")
strategy.entry("Long", strategy.long)
if (not prediction and n2>n1)
strategy.exit("Close", "Long")
strategy.entry("Short", strategy.short)
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?