以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  求帮助 编写一个完整的系统  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=25129)

--  作者:superlotus
--  发布时间:2012/8/31 17:12:40
--  求帮助 编写一个完整的系统

开仓条件:

前一根CROSS 5MA+本周期H>REF(H,1)

 

平仓条件:

1。10个单位 止损

2。下破5MA 平仓()

3。收盘 CLOSE平仓

 

 

 

 


--  作者:jinzhe
--  发布时间:2012/8/31 17:18:05
--  

ma5:=ma(c,5);

if ref(cross(c,ma5),1) and h>ref(h,1) then buy(holding=0,1,market);

 

//止损

 

if enterprice-c>=10*mindiff then sell(holding>0,0,limitr,c);

 

if cross(ma5,c) then sell(holding>0,0,limitr,c);

 

if time>145500 and time<=150000  then sell(holding>0,0,limitr,c);


--  作者:superlotus
--  发布时间:2012/8/31 17:41:36
--  

TKS

 

如果在逐K模式下怎么完成测试 我不想用CLOSE

收盘平仓的维持


--  作者:RogarZ
--  发布时间:2012/9/1 13:39:06
--  
除非你有自己的算法,用限价指令。
目前没很好的办法