以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  这个用图表怎样表达?求助!  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=33959)

--  作者:123abc
--  发布时间:2012/12/24 10:37:44
--  这个用图表怎样表达?求助!

1分钟周期,日内,本周期限价交易。集合竟价不参与交易。

交易时间9:00到14:50,14:50全部平仓后,停止交易。

当价格向上突破10分钟高点时开多单,向下突破5分钟低点时平多单,

向下突破10分钟低点时开空单,向上突破5分钟高点时平空单。

 

 


--  作者:jinzhe
--  发布时间:2012/12/24 10:44:09
--  

t1:= time>090100 and time<145000;

 

if h>ref(hhv(h,10),1)  and t1 then buy;

if l<ref(llv(l,5),1) and t1 then sell;

 

if l<ref(llv(l,10),1) and t1 then buyshort;

 

if h>ref(hhv(h,5),1) and t1 then sellshort;


--  作者:123abc
--  发布时间:2012/12/24 11:11:40
--  

H:=REF(HHV(H,X),1);
l:=REF(LLV(L,X),1);

通不过?

[变量名H不能为系统保留字]

 


--  作者:jinzhe
--  发布时间:2012/12/24 11:21:28
--  
把H改为H1,
--  作者:123abc
--  发布时间:2012/12/24 11:48:40
--  

麻烦金蛰把这个模型写完整,好吗?我自己写不来!

辛苦了!!!

 


--  作者:jinzhe
--  发布时间:2012/12/24 13:20:06
--  

t1:= time>090100 and time<145000;

 

if h>ref(hhv(h,10),1)  and t1 then buy(holding=0,1,limitr,c);

if l<ref(llv(l,5),1) and t1 then sell(holding>0,0,limitr,c);

 

if l<ref(llv(l,10),1) and t1 then buyshort(holding=0,1,limitr,c);

 

if h>ref(hhv(h,5),1) and t1 then sellshort(holding<0,0,limitr,c);