Rss & SiteMap

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

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

标题:图表策略信号显示混乱,附源码

1楼
系统使用者 发表于:2017/6/6 10:39:11
//开多条件
隔夜收盘开多:=KD01>0;
a2:=(KD02+KD03)>0;//开盘开多
//开空条件
隔夜收盘开空:=KK01>0;
b2:=(KK02+KK03)>0;//开盘开空

variable:flag=0;// 全局变量,买开仓时赋值为1
//交易系统1
开多: if todaybar=1 then buy(a2 and HOLDING=0,ss,limitr,open+MINDIFF);
开空: if todaybar=1 then buyshort(b2 and HOLDING=0,ss,limitr,open-MINDIFF);
//日内收盘平仓1
if time>=closetime(4)-5*100 then begin
 平多:sell(1,ss,market);
 平空:sellshort(1,ss,market);
end

//交易系统2
if KD01>0 and timetot0(dynainfo(207))<(timetot0(closetime(0))-60) and holding=0 then
begin
 buy(1,ss,thisclose);
     flag:=1;
end
if holding>0 and flag=0 then sell(1,ss,market);//次日开盘平多
if  time=opentime(2) then flag:=0;//flag赋值为0 

if KK01>0 and timetot0(dynainfo(207))<(timetot0(closetime(0))-60) and holding=0 then
begin
 buyshort(1,ss,thisclose);
     flag:=1;
end
if holding>0 and flag=0 then sellshort(1,ss,market);//次日开盘平空
if  time=opentime(2) then flag:=0;//flag赋值为0
帮忙看看。哪里出问题?


2楼
wenarm 发表于:2017/6/6 10:44:04
具体说明下什么样的混乱。
3楼
pyd 发表于:2017/6/6 10:50:17

您具体描述下什么混乱?信号还是下单?

4楼
系统使用者 发表于:2017/6/7 0:34:06
混乱
5楼
系统使用者 发表于:2017/6/7 0:40:33
图表
6楼
系统使用者 发表于:2017/6/7 0:41:51
信号在5分当天K上,每条都出现,一大饼
7楼
pyd 发表于:2017/6/7 8:43:48

截图看下你的信号情况,指出哪些是你认为不应该有的信号

[此贴子已经被作者于2017/6/7 8:50:13编辑过]
8楼
系统使用者 发表于:2017/6/7 12:43:39
图传不上
图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看
9楼
pyd 发表于:2017/6/7 12:58:30

time>=closetime(4)-5*100

收盘前提前5分钟?上边写法不对

m5:=(t0totime(timetot0(closetime(0))-60*5));

time>=m5

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


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