反手開倉 [金字塔]
- 咨詢內容:
我現在想編寫一段反手的代碼!5日均線上穿10日均線做多,下穿反手做空,再上穿就直接平倉不再開倉!求大神指教!
- 金字塔客服:
ma5:ma(c,5);
ma10:ma(c,10);
variable:n=0;
if cross(ma5,ma10) and holding=0 and n=0 then begin
buy(holding=0,1,market);
n:=1;
end
if cross(ma10,ma5) then begin
sell(holding>0,1,market);
buyshort(holding=0,1,market);
end
if cross(ma5,ma10) and holding>0 and n=1 then begin
sellshort(holding<0,1,market);
end
[此貼子已經被作者于2014/3/28 14:50:57編輯過]
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容