金字塔超簡單海龜代碼,供入門者學習[金字塔模型]
//超簡單海龜代碼,供入門者學習,
h10:ref(hhv(h,10),1),colorgreen;//前10根K線高點
l10:ref(llv(l,10),1),colorgreen;//前10根K線低點
h20:ref(hhv(h,20),1),colorred;//前20根K線高點
l20:ref(llv(l,20),1),colorred;//前20根K線低點。
?
long:=cross(c,h20);//價格上穿前20根線高點,做多條件
longend:=cross(l10,c);//價格跌破前10根K線低點,做多終止條件
?
short:=cross(l20,c);//價格跌破前20根K線低點,做空條件
shortend:=cross(c,h10);//價格上穿前10根K線高點,做空終止條件
if holding=0 then begin//建倉代碼 來源 www.kzuj.com.cn
buy(long,1,thisclose);
buyshort(short,1,thisclose);
end
?
if holding<>0 then begin//平倉代碼
sell(longend,1,thisclose);
sellshort(shortend,1,thisclose);
end
?
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容