以文本方式查看主题

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

--  作者:muxia5568
--  发布时间:2015/5/15 10:08:05
--  图表程序化交易模板

老师您好,我是个刚开通了标准版的使用权的新手,对金字塔编程有点蒙,因此想请帮助解决一些编程的基本知识,请老师帮助编一个图表程序化编程的模板,我好能照着去编写,指标部分不用了。

4个平空开多条件;AAA,BBB,CCC,DDD,(只要满足4个条件其中之一就平空开多)

4个平多开空条件 ;EEE,FFF,HHH,NNN,(只要满足4个条件其中之一就平多开空)

2个平多条件;WWW,MMM.(只要满足2个条件其中之一就平多)

2个平空条件;ZZZ,XXX..(只要满足2个条件其中之一就平空)

开仓使用资金比例百分之50。

每个交易信号能显示是那一个指令所发出的

 

谢谢!


 


--  作者:jinzhe
--  发布时间:2015/5/15 10:26:09
--  
处理中请稍等
--  作者:pyd
--  发布时间:2015/5/15 11:02:20
--  
if aaa or bbb or ccc or ddd then begin
sellshort(holding<0,holding,market);
buy(holding=0,50%,market);
end
if eee or fff or hhh or nnn then begin
sell(holding>0,holding,market);
buyshort(holding=0,50%,market);
end
if www or mmm then sell(holding>0,holding,market);
if zzz or xxx then sellshort(holding<0,holding,market);