以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  策略编写求助区  (http://weistock.com/bbs/list.asp?boardid=11)
----  求组。。。。。  (http://weistock.com/bbs/dispbbs.asp?boardid=11&id=7816)

--  作者:幸运60
--  发布时间:2011/9/1 10:26:33
--  求组。。。。。

两根线,站上两根,多,跌穿一根,平多,跌穿二根,空,站上一根,平空,想测试下这个模型,求完整 程序模型。。。。

线就用a和b代替。。。。。谢谢!!


--  作者:26327756l
--  发布时间:2011/9/1 11:17:51
--  

a:自定义;
b:自定义
if c>a and c>b then

begin

sellshort(holding<0,holding,market);

buy(holding=0,1,market);
end

if (c<a or c<b)and holding>0, then sell(holding>0,1,market);
if C<a and C<b then

begin

sell(holding>0,holdiing,market);

buyshort(holding=0,1,market);
end

if (c>a or c>b)and holding<0, then sellshort(holding<0,1,market);

框架而已,

[此贴子已经被作者于2011-9-1 11:23:14编辑过]

--  作者:gilon
--  发布时间:2011/9/1 12:43:25
--  

太简单的公式了!  以前飞狐、分析家都差不多,不过函数好像稍稍有些不同!

 

金字塔我还是第一次用,真得开发潜力很大!  我以前怎么不知道!太OUT了!

 

从今天开始好好研究!


--  作者:幸运60
--  发布时间:2011/9/1 15:56:35
--  

没通过呀。说未定义变量holding


--  作者:fly
--  发布时间:2011/9/1 16:03:25
--  

笔误,

sell(holding>0,holdiing,market);

本行多写了个i,改为

sell(holding>0,holding,market);

 

楼主新手,推荐多学学视频教程和置顶的文档教程