Rss & SiteMap

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

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

标题:30分钟反转系统的问题

1楼
活不明白 发表于:2010/8/6 12:31:26

//《30分钟日内反转系统》
//使用周期30分钟图表
//Desiged by LIKALL
//

//准备需要的中间变量
h30:=ref(hhv(h,1),1);
L30:=ref(llv(l,1),1);

//画出多头的止损线
partline(holding>0,l30,colorred);


//建立多头的进场条件
long:=h>h30  and  time>093000  and  time<145600;
if  long  then
 begin
 sellshort(holding<0,holding,limitr,h30);
 buy(holding=0,1,limitr,h30);
 end
   
//建立空头的进场条件
short:=L<L30 and time>093000 and time<145600;
if short then
 begin
 sell(holding>0,0,limitr,l30);
 buyshort(holding=0,1,limitr,l30);
 end

//画出空头的止损线
partline(holding<0,h30,colorgreen);


//收盘前平仓
sell(time>145800 and holding>0,0,thisclose);
sellshort(time>145800 and holding<0,0,thisclose);


资产:ASSET,LINETHICK0;
可用现金:CASH(0),LINETHICK0;
持仓:HOLDING,LINETHICK0;

[此贴子已经被admin于2010-8-6 13:10:24编辑过]
2楼
活不明白 发表于:2010/8/6 12:52:03

问题补充:以上系统测试时,怎么只是开多或者开空,而没平多开空,或者平空开多的?
是那里出了问题?

 

3楼
admin 发表于:2010/8/6 12:56:17

在我们图表测试,显示一切正常

图片点击可在新窗口打开查看

4楼
活不明白 发表于:2010/8/6 13:03:01
图表上我这边显示也没问题,但是在图表程序化交易窗口上并没有显示平多呀,而只是开空
图片点击可在新窗口打开查看
5楼
活不明白 发表于:2010/8/6 13:04:50

另外,以下的系统是用在1分钟图表上的,但这个30分钟周期是移动的,我想固定这个30分钟周期为9:00~9:30;  9:30~10:00;  10:00~10:45;  10:45~11:15;  11:15~13:45;  13:45~14:15;  14:45~15:00那下面的系统要怎么调整?
//《30分钟日内反转系统》
//使用周期1分钟图表
//Desiged by LIKALL
//

//准备需要的中间变量
h30:=ref(hhv(h,30),1);
L30:=ref(llv(l,30),1);

//画出多头的止损线
partline(holding>0,l30,colorred);


//建立多头的进场条件
long:=h>h30  and  time>093000  and  time<145200;
if  long  then
 begin
 sellshort(holding<0,holding,limitr,h30);
 buy(holding=0,2,limitr,h30);
 end
   
//建立空头的进场条件
short:=L<L30 and time>093000 and time<145200;
if short then
 begin
 sell(holding>0,0,limitr,l30);
 buyshort(holding=0,2,limitr,l30);
 end

//画出空头的止损线
partline(holding<0,h30,colorgreen);


//收盘前平仓
sell(time>145500 and holding>0,0,thisclose);
sellshort(time>145500 and holding<0,0,thisclose);


资产:ASSET,LINETHICK0;
可用现金:CASH(0),LINETHICK0;
持仓:HOLDING,LINETHICK0;

6楼
admin 发表于:2010/8/6 13:10:04

公式在1分钟周期测试正常,恕30分钟周期太长无法测试,只要图表显示正常那么交易一定是不会有问题,如果你无法解决,那么请使用基础的ENTERLONG交易系统做你的交易语言,不要使用这种带头寸的语法。

自定义切分周期的功能 工具-》市场与板块-》双击要定义的市场-》分时周期按钮-》选中30分

7楼
活不明白 发表于:2010/8/6 13:26:00

另外,以下的系统是用在1分钟图表上的,但这个30分钟周期是移动的,我想固定这个30分钟周期为9:00~9:30;  9:30~10:00;  10:00~10:45;  10:45~11:15;  11:15~13:45;  13:45~14:15;  14:45~15:00那下面的系统要怎么调整?
//《30分钟日内反转系统》
//使用周期1分钟图表
//Desiged by LIKALL
//

//准备需要的中间变量
h30:=ref(hhv(h,30),1);
L30:=ref(llv(l,30),1);

//画出多头的止损线
partline(holding>0,l30,colorred);


//建立多头的进场条件
long:=h>h30  and  time>093000  and  time<145200;
if  long  then
 begin
 sellshort(holding<0,holding,limitr,h30);
 buy(holding=0,2,limitr,h30);
 end
   
//建立空头的进场条件
short:=L<L30 and time>093000 and time<145200;
if short then
 begin
 sell(holding>0,0,limitr,l30);
 buyshort(holding=0,2,limitr,l30);
 end

//画出空头的止损线
partline(holding<0,h30,colorgreen);


//收盘前平仓
sell(time>145500 and holding>0,0,thisclose);
sellshort(time>145500 and holding<0,0,thisclose);


资产:ASSET,LINETHICK0;
可用现金:CASH(0),LINETHICK0;
持仓:HOLDING,LINETHICK0;

8楼
活不明白 发表于:2010/8/9 17:36:29

最后的收盘前平仓为什么会提前平仓了,即14:58之前就平仓了

 

9楼
活不明白 发表于:2010/8/9 17:47:51
日内所有多单、空单都平仓出局应该是怎么写?
10楼
蔡宛宏 发表于:2011/12/12 22:59:58
系统效果怎么样?
共11 条记录, 每页显示 10 条, 页签: [1] [2]


Powered By Dvbbs Version 8.3.0
Processed in 0.03906 s, 2 queries.