以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://222.73.7.161/bbs/index.asp)
--  金字塔软件问题提交  (http://222.73.7.161/bbs/list.asp?boardid=2)
----  asset 函数的 bug?  (http://222.73.7.161/bbs/dispbbs.asp?boardid=2&id=103)

--  作者:bhwhui
--  发布时间:2009/10/19 23:39:08
--  asset 函数的 bug?

我的理解:交易系统测试中 Asset 对 Buy ,sell 应该有输出,现在是没有反应,数值一直是200

 

交易中Tasset  对 TBuy ,Tsell 应该有输出,没错,可是Asset也有反应,不理解了。


--  作者:admin
--  发布时间:2009/10/20 9:28:27
--  
把公式贴出来
--  作者:bhwhui
--  发布时间:2009/10/20 21:51:55
--  

很简单,双ma .

 

input:man1(2),man2(5);

ASSET,LINETHICK0;

ma1:ma(close,man1),colorred;
ma2:ma(close,man2),colorgreen;

crossuper:=cross(ma1,ma2);
crossdown:=cross(ma2,ma1);

if man1<=man2 then
begin
{平多}
sell(holding>0 and crossdown,0);

{平空}
sellshort(holding<0 and crossuper,0);

{开多}
buy(vol>5000 and holding=0 and crossuper,intpart(asset*0.4/close));

{开空}
buyshort(vol>5000 and holding=0 and crossdown,intpart(asset*0.4/close));
end;

 

 

上面asset没有反应。

如果buy,sell 等改成Tbuy,Tsell 等Asset就有显示,同样asset改成Tasset也会有反应。

[此贴子已经被作者于2009-10-20 21:53:15编辑过]

--  作者:bhwhui
--  发布时间:2009/10/20 23:28:20
--  

唉,经管理员帮助,知道原因了,在金字塔中输出的指标线必须要有名称,否则没输出。

上面将

ASSET,LINETHICK0;

 

改为 资产:asset就ok了,记忆中和飞狐,分析家还是不同的,谢谢;