以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 如何将交易系统编写成程序 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=70439) |
-- 作者:zhuzhixian -- 发布时间:2014/9/25 16:39:45 -- 如何将交易系统编写成程序 请问老师如何编写这个交易系统!
1 连续止损次数N始值为0,止损+1,连续止损连续+1,止赢后变回0; 2 开盘价以上开多,以下开空; 3 止损(>=5)点,止赢【>=10+(5*N)】点;
平仓后循环运行! |
-- 作者:jinzhe -- 发布时间:2014/9/25 16:56:16 -- 开盘价以上开多,以下开空; 什么价格在开盘价上开多开空的? |
-- 作者:zhuzhixian -- 发布时间:2014/9/25 17:12:57 -- 如菜粕RM1501,23号开盘价2120,在此价格以上买开,此价格以下就卖空,整天开仓都是如此 |
-- 作者:zhuzhixian -- 发布时间:2014/9/25 17:13:49 -- 如菜粕RM1501,23号开盘价2120,在此价格以上买开,此价格以下就卖空,整天开仓都是如此 |
-- 作者:pyd -- 发布时间:2014/9/25 17:34:55 -- VARIABLE:n=0; oo:VALUEWHEN(TODAYBAR=1,o); buy(h>oo and holding=0,1,market); buyshort(l<oo and holding=0,1,market); if ENTERPRICE-l>=5 and holding>0 then begin//多头止损 sell(1,holding,market); n:=n+1; end if h-ENTERPRICE>=5 and holding<0 then begin//空头止损 sellshort(1,holding,market); n:=n+1; end if h-enterprice>=10+(5*n) and holding>0 then begin//多头止盈 sell(1,holding,market); n:=0; end if ENTERPRICE-l>=10+(5*n) and holding<0 then begin//空头止盈 sellshort(1,holding,market); n:=0; end [此贴子已经被作者于2014/9/25 17:36:27编辑过]
|
-- 作者:zhuzhixian -- 发布时间:2014/9/25 18:15:02 -- 谢谢老师,我去试试看好不好用 |