Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:模型没信号,帮忙修改

1楼
jzt666 发表于:2019/4/24 20:20:31
variable:dt:=0,kt:=0;
ma5:ma(close,5);
ma10:ma(close,10);
ma20:ma(close,20);
dtpl:=ma5>ma10 and ma10>ma20;
ktpl:=ma5<ma10 and ma10<ma20;

if close-enterprice>=20*mindiff and holding>0 then
begin
dt:=if(dtpl,1,0);
sell(holding>0,holding,market);
end
dt:=if(dt=1 and dtpl,1,0);

if dtpl and dt=0 then buy(holding=0,1,market);

if enterprice-close>=20*mindiff and holding<0 then
begin
kt:=if(ktpl,1,0);
sellshort(holding<0,holding,market);
end
kt:=if(kt=1 and ktpl,1,0);

if ktpl and kt=0 then buyshort(holding=0,1,market);

2楼
wenarm 发表于:2019/4/25 8:38:04


图片点击可在新窗口打开查看此主题相关图片如下:9.png
图片点击可在新窗口打开查看
我在测试品种上有信号的。你自己在你本都输出自己的条件看下。具体什么地方不满足。

共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.03125 s, 3 queries.