variable:a2=0;
variable:p1=0;
做多趋势:5+EMA(((((BIGORDER(1,2) - BIGORDER(2,2)) * VOL) / CAPITAL) * 100),MIN((COUNT(ORDER(2),0)),60)) * MIN((COUNT(ORDER(2),0)*100),60),colorred;
做空趋势:5+-EMA(((((BIGORDER(1,2) - BIGORDER(2,2)) * VOL) / CAPITAL) * 100),MIN((COUNT(ORDER(2),0)),60)) * MIN((COUNT(ORDER(2),0)*100),60),colorgreen;
dt:3*SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1),3,1),LINETHICK0;
c1:=INTPART(cyc(5)*100*0.96)/100;
p2:=intpart(ref(cyc(5),1)*100)/100;
p3:=intpart(ref(cyc(5),1)*0.96*100)/100;
vv:=intpart(min(capital*0.05,ref(ma(vol,34),1))/100);
p40:=intpart(maxcyc*100)/100;
p41:=intpart(ref(MAXCYC,1)*100)/100;
p4:=a2=0 and c>p2 or (ref(vol/100,1)<vv and c>intpart(p2*0.98*100)/100 and vol>min(capital*0.05,ref(ma(vol,34),1)));
p5:=a2=1 and c<min(p3,p41);
a2:=if(p4=1,1,if(p5=1,0,ref(a2,1)));
5,dotline,colorblue;
a1:=IF((CLOSE < 800),((AMOUNT / VOL) / 100),((((CLOSE * 2) + HIGH) + LOW) / 4));
a2:=((HHV(HIGH,15)) + (LLV(LOW,30))) / 2;
a3:=EMA((MA(a1,5)),10);
a4:=EMA((MA(a1,15)),10);
a5:=EMA((MA(a1,13)),21);
a6:=((a3 + a4) + a5) / 3;
决策线:=EMA((MA(CLOSE,5)),3);
a7:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.191;
a8:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 1.236;
a9:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.809;
a10:=(((REF(a6,1)) + a6) + (REF(a6,2))) / 3 * 0.764;
a37:=((CLOSE - (EMA(a1,25))) / (EMA(a1,25))) * 100;
a38:=(((a37 > 12) AND (CROSS(决策线,CLOSE))));
DRAWICON((((a37 > 12) AND (CROSS(决策线,CLOSE)))),10.5,1 );
STICKLINE( a38,9 ,10 ,3 ,400 ),colorgreen;
a38:=BIGORDER(1,2);
a39:=BIGORDER(2,2);
a40:=(((a38 - a39) * VOL) / CAPITAL) * 500;
a50:=((CROSS(CLOSE,(REF(a9,1)))) AND (a40 > 0));
STICKLINE( a50,做多趋势 ,做多趋势+1 ,3 ,400 ),colorMagenta;
a51:=((CROSS((REF(a7,1)),CLOSE)) AND (a40 < 0));
STICKLINE( a51,9 ,10 ,3 ,400 ),coloryellow;
a52:=(CROSS(CLOSE,(REF(a10,1))));
STICKLINE( a52,做多趋势 ,做多趋势+1 ,3 ,400 ),colorred;
gj:=if(c=INDEXC,(INDEXC+INDEXh+INDEXl+INDEXO)/4,AMOUNT/(v+0.01)/100);
明日阻力:=l+(gj-l)+(c-l);
明日支撑:=l+(c-gj);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
DRAWTEXTREL(830,20,'今日支撑:'+NUMTOSTRN(今日支撑 ,2 )),Colorred,LINETHICK3;
DRAWTEXTREL(830,120,'今日阻力:'+NUMTOSTRN(今日阻力 ,2 )),ColorGREEN,LINETHICK3;
c1:=INTPART(cyc(5)*100*0.96)/100;
p2:=intpart(ref(cyc(5),1)*100)/100;
p3:=intpart(ref(cyc(5),1)*0.96*100)/100;
vv:=intpart(min(capital*0.05,ref(ma(vol,34),1))/100);
p40:=intpart(maxcyc*100)/100;
p41:=intpart(ref(MAXCYC,1)*100)/100;
p4:=p1=0 and c>p2 or (ref(vol/100,1)<vv and c>intpart(p2*0.98*100)/100 and vol>min(capital*0.05,ref(ma(vol,34),1)));
p5:=p1=1 and c<min(p3,p41);
p1:=if(p4=1,1,if(p5=1,0,ref(p1,1)));
dt:= cross(p1,0);
dt1:=FILTER( dt,10 );
dt2:=cross(1,p1) ;
dt4:=FILTER(dt2,10);
STICKLINE( dt1,做多趋势 ,做多趋势+1 ,3 ,400 ),colorMagenta;
STICKLINE( dt4,9 ,10 ,3 ,400 ),colorgreen;
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5); V4:=2*(V2-V3)*5.5;
主力撤:= IF(V4<=0,V4,0);
主力进:= IF(V4>=0,V4,0);
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
大盘资金进场:=IF(VB>=0,VB,0);
大盘资金撤走:=IF(VB<=0,VB,0);
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势线:= EMA(V11,3);
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
STICKLINE(趋势线<=13,5,6,5,0),colorcc9900;
aa:=(趋势线<=13) and filter((趋势线<=13),15);
drawtext (aa,4,'建仓'),colorcc9900;
连续建仓:last(趋势线<=13),LINETHICK0;
bb:= (趋势线<=13 AND V12>13) and filter((趋势线<=13 AND V12>13),10) ;
STICKLINE(bb,做多趋势,做多趋势+1,3,400),COLORred;
DT:=FILTER(趋势线>90 and 趋势线>ref(趋势线,1) ,7 );
STICKLINE(dt,9,10,3,400),COLORyellow;
aa1:=filter(趋势线>90 and 趋势线<ref(趋势线,1) and 主力进<ref(主力进,1),8);
aa2:=FILTER(aa1 ,12 ) ;
STICKLINE(aa2,9,10,3,400),COLORgreen;
DRAWTEXTABS( 0, 0,'即时买卖 '),COLORWHITE;