DRAWTEXT(CROSS(DDX1,DDX2) and DDX1>REF(DDX1,1) and CROSS(K,D) and
K<50,DDX1*1.2,'↑'),ALIGN1,color0000FF;
DDY优化
DDY优化 -涨跌动因
input:p1(60),p2(5),p3(10);
ZZZD:=BIGORDER(1,3)-BIGORDER(2,3);ZZD:=BIGORDER(1,2)-BIGORDER(2,2);ZD:=B
IGORDER(1,1)-BIGORDER(2,1);
VAR0:=MIN(COUNT(ORDER(2),0),P1);{AAA:=BIGORDER(1,1)-(BIGORDER(2,1));}
TEMP:=CAPITAL*C; TEMP5K:=TEMP/50000000000; TEMP4K5:=TEMP/45000000000; TEMP4K:=TEMP/40000000000; TEMP3K5:=TEMP/35000000000; TEMP3K:=TEMP/30000000000; TEMP2K5:=TEMP/25000000000; TEMP2K:=TEMP/20000000000; TEMP1K5:=TEMP/15000000000; TEMP1K2:=TEMP/12000000000; TEMP1K:=TEMP/10000000000; TEMP8M:=TEMP/8000000000; TEMP6M:=TEMP/6000000000; TEMP5M:=TEMP/5000000000; TEMP4M:=TEMP/4000000000; TEMP3M:=TEMP/3000000000; TEMP2M5:=TEMP/2500000000; TEMP2M:=TEMP/2000000000; TEMP1M5:=TEMP/1500000000; TEMP1M:=TEMP/1000000000; JE10X15:=CLOSE>=10 and CLOSE<15;
AAA:=IF(TEMP5K>=1 and CLOSE<10,ZZZD,IF(TEMP5K>=1 and
JE10X15,ZZD,IF(TEMP5K>=1 and CLOSE>=15,ZD,
IF(TEMP4K5>=1 and TEMP5K<1 and CLOSE<10,ZZZD,IF(TEMP4K>=1 and TEMP5K<1 and
JE10X15,ZZD,IF(TEMP4K5>=1
and TEMP5K<1 and CLOSE>=15,ZD,
IF(TEMP4K>=1 and TEMP4K5<1 and CLOSE<10,ZZZD,IF(TEMP4K>=1 and TEMP4K5<1 and
JE10X15,ZZD,IF(TEMP4K>=1 and TEMP4K5<1 and CLOSE>=15,ZD,
IF(TEMP3K5>=1 and TEMP4K<1 and CLOSE<10,ZZZD,IF(TEMP3K5>=1 and TEMP4K<1 and
JE10X15,ZZD,IF(TEMP3K5>=1 and TEMP4K<1 and CLOSE>=15,ZD,
IF(TEMP3K>=1 and TEMP3K5<1 and CLOSE<10,ZZZD,IF(TEMP3K>=1 and TEMP3K5<1 and
JE10X15,ZZD,IF(TEMP3K>=1 and TEMP3K5<1 and CLOSE>=15,ZD,
IF(TEMP2K5>=1 and TEMP3K<1 and CLOSE<10,ZZZD,IF(TEMP2K5>=1 and TEMP3K<1 and
JE10X15,ZZD,IF(TEMP2K5>=1 and TEMP3K<1 and CLOSE>=15,ZD,
IF(TEMP2K>=1 and TEMP2K5<1 and CLOSE<10,ZZZD,IF(TEMP2K>=1 and TEMP2K5<1 and
JE10X15,ZZD,IF(TEMP2K>=1 and TEMP2K5<1 and CLOSE>=15,ZD,
IF(TEMP1K5>=1 and TEMP2K<1 and CLOSE<10,ZZZD,IF(TEMP1K5>=1 and TEMP2K<1 and
JE10X15,ZZD,IF(TEMP1K5>=1 and TEMP2K<1 and CLOSE>=15,ZD,
IF(TEMP1K2>=1 and TEMP1K5<1,ZZZD,IF(TEMP1K2>=1 and TEMP1K5<1 and
JE10X15,ZZD,IF(TEMP1K2>=1 and TEMP1K5<1 and CLOSE>=15,ZD,
IF(TEMP1K>=1 and TEMP1K2<1 and CLOSE<10,ZZZD,IF(TEMP1K>=1 and TEMP1K2<1 and
JE10X15,ZZD,IF(TEMP1K>=1 and TEMP1K2<1 and CLOSE>=15,ZD,
IF(TEMP8M>=1 and TEMP1K<1 and CLOSE<10,ZZZD,IF(TEMP8M>=1 and TEMP1K<1 and
JE10X15,ZZD,IF(TEMP8M>=1 and TEMP1K<1 and CLOSE>=15,ZD,
IF(TEMP6M>=1 and TEMP8M<1 and CLOSE<10,ZZZD,IF(TEMP6M>=1 and TEMP8M<1 and
JE10X15,ZZD,IF(TEMP6M>=1 and TEMP8M<1 and CLOSE>=15,ZD,
IF(TEMP5M>=1 and TEMP6M<1 and CLOSE<10,ZZZD,IF(TEMP5M>=1 and TEMP6M<1 and
JE10X15,ZZD,IF(TEMP5M>=1 and TEMP6M<1 and CLOSE>=15,ZD,
IF(TEMP4M>=1 and TEMP5M<1 and CLOSE<10,ZZZD,IF(TEMP4M>=1 and TEMP5M<1 and
JE10X15,ZZD,IF(TEMP4M>=1
and TEMP5M<1 and CLOSE>=15,ZD,
IF(TEMP3M>=1 and TEMP4M<1 and CLOSE<10,ZZZD,IF(TEMP3M>=1 and TEMP4M<1 and
JE10X15,ZZD,IF(TEMP3M>=1 and TEMP4M<1 and CLOSE>=15,ZD,
IF(TEMP2M5>=1 and TEMP3M<1 and CLOSE<10,ZZZD,IF(TEMP2M5>=1 and TEMP3M<1 and
JE10X15,ZZD,IF(TEMP2M5>=1 and TEMP3M<1 and CLOSE>=15,ZD,
IF(TEMP2M>=1 and TEMP2M5<1 and CLOSE<10,ZZZD,IF(TEMP2M>=1 and TEMP2M5<1 and
JE10X15,ZZD,IF(TEMP2M>=1 and TEMP2M5<1 and CLOSE>=15,ZD,
IF(TEMP1M5>=1 and TEMP2M<1 and CLOSE<10,ZZZD,IF(TEMP1M5>=1 and TEMP2M<1 and
JE10X15,ZZD,IF(TEMP1M5>=1 and TEMP2M<1 and CLOSE>=15,ZD,
IF(TEMP1M>=1 and TEMP1M5<1 and CLOSE<10,ZZZD,IF(TEMP1M>=1 and TEMP1M5<1 and
JE10X15,ZZD,IF(TEMP1M>=1 and TEMP1M5<1 and CLOSE>=15,ZD,
IF(TEMP1M<1 and CLOSE<10,ZZZD,IF(TEMP1M<1 and JE10X15,ZZD,IF(TEMP1M<1 and CLOSE>=15,ZD,0))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
));
DDY:(ORDER(2)-ORDER(1))/CAPITAL*100,COLOR3d;{\
引用ddY.ddY\DDy1:EMA(DDy,p1)*p1,color00ffff; DDY2:MA(DDY1,P2),colorff00ff; DDY3:MA(DDY1,p3),color00ff00; DDY多头:last(ddy1>ddy2 and ddy1>ddy3 and
ddy2>ddy3),linethick0,ColorFFFF10;
连红:LAST(AAA>0),PRECIS0,color0000FF,linethick0; 连绿:LAST(AAA<0),PRECIS0,color00FF00,linethick0; 十日红:COUNT(AAA>0,10),PRECIS0,colorFFFFFF,linethick0;
DRAWFLAGTEXT(十日红>=2,0,'十日红'+NUMTOSTRN(十日红,0)+'天'), COLORFFFFFF; DRAWFLAGTEXT(连红>=2,0,' 连红'+NUMTOSTRN(连红,0)+'天'), COLORYELLOW;
DRAWTEXTABS(0,0,'涨跌动因'),Color00EEFF;