老师 这个变成文华源码怎么变 [文华财经]
- 咨询内容:
文华源码简化 简单 这总不能十几句能完成吧?/========================================================//交易控制变量variable:a1=1;variable:a2=1;
//**********************************//交易手数:tn:=1;
//最大持仓量cx:=6;
//提前下单量(秒)xd:=3;
//交易时间区间p1:=time>091500 and time<151000;p2:=if(islastbar,dynainfo(207),time);p3:=time0-timetot0(p2),linethick0;
//********************************r1:=barslast(date<>ref(date,1));r2:=ref(o,r1);
//********************************hd:=if(islastbar,3,1.2);hd1:=if(islastbar,3,0.1);
//********************************cc:=(h+l+o+c)/4;mid:=ma(cc,26);upper:=mid+1.7*std(cc,26);lower:=mid-1.7*std(cc,26);
//********************************r12:=asset-ref(asset,135);r13:=valuewhen(r1=134,r12);
if r13>6000*cx and a2>0 then begina1:=barpos;a2:=-1;endr16:=if(barpos-a1>810,1,-1);if r16>0 and r1<2 then a2:=1;
if abs(r2-c)>34 or (abs(r2-c)>24 and r1<40) then c6:=1;r17:=r16>0 or c6>0;//********************************q2:=valuewhen(r1=0,sum(h-l,270)/270);r20:=upper-lower<6.5*q2;
//********************************nn:=4*q2;if holding>0 and o-l>=nn and enterbars>0 thenbeginsell(holding>0,holding,limitr,o-nn-hd);endif holding<0 and h-o>=nn and enterbars>0 thenbeginsellshort(holding<0,abs(holding),limitr,o+nn+hd);end
//********************************if c>upper and r20 and h-upper<3.5*q2 and p1 and p3<=xd and r17>0 thenbeginbuy(holding<cx,tn,limitr,c+hd1);endif c<lower and r20 and lower-l<3.5*q2 and p1 and p3<=xd and r17>0 thenbeginbuyshort(abs(holding)<cx,tn,limitr,c-hd1);end
//---------------------------------if holding>0 and l<mid thenbeginsell(1,0,limitr,c-hd1);endif holding<0 and h>mid thenbeginsellshort(1,0,limitr,c+hd1);end
//******************************** //收盘前清仓if p2>=151300 thenbeginsellshort(holding<0,0,limitr,c+hd1);sell(holding>0,0,limitr,c-hd1);c6:=-1;c1:=1;end
- 文华技术人员:
改写需要时间,改写后回复,请稍后
- 文华客服:
真的吗?谢谢老师
- 网友回复:
参考:
VARIABLE:A1:=1,A2:=1;
P1:=TIME>0915 AND TIME<1510;
CX:=6;
XD:=3;
R1:=BARSLAST(DATE<>REF(DATE,1));
R2:=REF(O,R1);
HD:=IF(ISLASTBAR,3,1.2);
HD1:=IF(ISLASTBAR,3,0.1);
CC:=(H+L+O+C)/4;
MID:=MA(CC,26);
UPPER:=MID+1.7*STD(CC,26);
LOWER:=MID-1.7*STD(CC,26);
R12:=MONEY-REF(MONEY,135);
R13:=VALUEWHEN(R1=134,R12);
IF R13>6000*CX AND A2>0 THEN
BEGIN
A1:=BARPOS;
A2:=-1;
END
R16:=IF(BARPOS-A1>810,1,-1);
IF R16>0 AND R1<2 THEN
BEGIN
A2:=1;
END
C6:=IF(ABS(R2-C)>34 OR (ABS(R2-C)>24 AND R1<40),1,NULL);
R17:=R16>0 OR C6>0;
Q2:=VALUEWHEN(R1=0,SUM(H-L,270)/270);
R20:=UPPER-LOWER<6.5*Q2;
NN:=4*Q2;
O-L>=NN,SP;
H-O>=NN,BP;
C>UPPER AND R20 AND H-UPPER<3.5*Q2 AND P1 AND R17>0,BK;
C<LOWER AND R20 AND LOWER-L<3.5*Q2 AND P1 AND R17>0,SK;
L<MID,SP;
H>MID,BP;
TIME>=1513,CLOSEOUT;
AUTOFILTER; - 网友回复: R12:=MONEY-REF(MONEY,135);R13:=VALUEWHEN(R1=134,R12); 老师 这里面 135 R1=134 这是什么意思啊
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容