原有止損功能. [金字塔]
- 咨詢內容:
你好.我模型原有止損功能.可否重加一個移動止盈功能?好可以怎增加代碼.謝謝!
[此貼子已經被作者于2014/2/18 10:09:03編輯過]
- 金字塔客服:
您好,論壇有很多例子,您可以搜下
http://www.weistock.com/bbs/dispbbs.asp?BoardID=4&ID=3007
- 用戶回復:
http://www.weistock.com/bbs/dispbbs.asp?boardid=10&Id=2160
您看可以看下這個代碼范例,論壇相關的帖子您也可以搜索下。
- 網友回復:
自己無水評看不懂.可否幫寫一個移動止盈代碼我自行加上去謝謝
- 網友回復:
手數:1;
ma5:=ma(c,5);
ma20:=ma(c,20);
開多條件:=cross(ma5,ma20);
開空條件:=cross(ma20,ma5);//移動止盈
//多單
variable:win=0;
if 開多條件 and holding=0 then begin
BUY(1,手數,THISCLOSE);;
win:=c-enterprice;
end
if c-enterprice>win then win:=c-enterprice;
if win>=10 and c-enterprice<=3 then 平多1:sell(1,0,THISCLOSE); //盈利10個點后回撤達到7個點后平倉。
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容