以文本方式查看主题

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

--  作者:xian_0_9
--  发布时间:2011/10/7 7:56:12
--  [求助]求个模版

图表逐周期。

均选穿越模型C大于30日均线开多。小于30日均线平多。

当品种是RB的时候图表显示开10手。当品种是TA的时候显示开5手。

谢谢


--  作者:阿火
--  发布时间:2011/10/7 20:14:26
--  
cangwei:=if(stricmp(strleft(stklabel,2),\'rb\')=0,10,if(stricmp(strleft(stklabel,2),\'ta\')=0,5,0));
ma30:=ma(c,30);
if holding>0 and c<ma30 and cangwei>0 then sell(1,cangwei,thisclose);
if holding=0 and c>ma30 and cangwei>0 then buy(1,cangwei,thisclose);

--  作者:xian_0_9
--  发布时间:2011/10/8 9:00:06
--  

谢谢火哥