0.小天趋势至上
(小天旗舰)
SJ:=DATE<=1091231;
VAR1:=SPLITDATA(1)+SPLITDATA(2);
CAP:=CLOSE;
CAP[DATACOUNT]:=1;
FOR I=DATACOUNT DOWNTO 2 DO BEGIN
CAP[I-1]:=CAP[I]/(1+VAR1[I]/10);
I:=I-1;
END;
CAPI:=CAP*CAPITAL/100;
HS:=VOL/CAPI;
成本:="xt1@CYCMAX";
成本1:=DMA(AMOUNT/VOL/100,0.8*HS/100);
FILLRGN(成本<成本1 AND CLOSE<100,成本,成本1),colorCC6666;
FILLRGN(成本>=成本1 AND CLOSE<100,成本,成本1),color5022DD;
AA:=REF(HIGH,N)=HHV(HIGH,2*N+1);
AAA:=FILTER(AA,N);
BB:=BACKSET(AAA,N+1);
CC1:=FILTER(BB,N);
CC:=CC1 OR ISLASTBAR;
AA2:=REF(LOW,N)=LLV(LOW,2*N+1);
AAA2:=FILTER(AA2,N);
BB2:=BACKSET(AAA2,N+1);
CC22:=FILTER(BB2,N);
CC2:=CC22 AND NOT(CC1);
EA:=BACKSET(CC,REF(BARSLAST(CC2),1)+1);
EB:=EA>REF(EA,1);
EE:=BACKSET(EB,2);
FF1:=EE>REF(EE,1);
EE2:=BACKSET(FF1 AND COUNT(CC,REF(BARSLAST(CC2),1)+2)=0,REF(BARSLAST(CC2),1)+2);
FF2:=EE2>REF(EE2,1);
EE3:=BACKSET(FF2 AND COUNT(CC,REF(BARSLAST(CC2),1)+2)=0,REF(BARSLAST(CC2),1)+2);
FF3:=EE3>REF(EE3,1);
JS:=IF(CC,COUNT(CC2,REF(BARSLAST(CC),1)+1),0);
G1:=IF(JS=1 AND CC,BARSLAST(FF1),0);
GA:=IF(CC AND REF(LOW,BARSLAST(FF1))>=REF(LOW,BARSLAST(FF2)),BARSLAST(FF2),BARSLAST(FF1));
G2:=IF(JS=2 AND CC,GA,0);
G3:=IF(JS>=3 AND CC,IF(CC AND REF(LOW,GA)>=REF(LOW,BARSLAST(FF3)),BARSLAST(FF3),GA),0);
GG:=G1+G2+G3;
JA:=BACKSET(CC,GG);
JB:=JA>REF(JA,1);
JJ:=BACKSET(JB,2);
LD:=JJ>REF(JJ,1);
LD1:=LD OR ISLASTBAR;
HEA:=BACKSET(LD1,REF(BARSLAST(CC),1)+1);
HEB:=HEA>REF(HEA,1);
HEE:=BACKSET(HEB,2);
HFF1:=HEE>REF(HEE,1);
HEE2:=BACKSET(HFF1 AND COUNT(LD1,REF(BARSLAST(CC),1)+2)=0,REF(BARSLAST(CC),1)+2);
HFF2:=HEE2>REF(HEE2,1);
HEE3:=BACKSET(HFF2 AND COUNT(LD1,REF(BARSLAST(CC),1)+2)=0,REF(BARSLAST(CC),1)+2);
HFF3:=HEE3>REF(HEE3,1);
HJS:=IF(LD1,COUNT(CC1,REF(BARSLAST(LD1),1)+1),0);
HG1:=IF(HJS=1 AND LD1,BARSLAST(HFF1),0);
HGA:=IF(LD1 AND REF(HIGH,BARSLAST(HFF1))<=REF(HIGH,BARSLAST(HFF2)),BARSLAST(HFF2),BARSLAST(HFF1));
HG2:=IF(HJS=2 AND LD1,HGA,0);
HG3:=IF(HJS>=3 AND LD1,IF(LD1 AND REF(HIGH,HGA)<=REF(HIGH,BARSLAST(HFF3)),BARSLAST(HFF3),HGA),0);
HGG:=HG1+HG2+HG3;
HJA:=BACKSET(LD1,HGG);
HJB:=HJA>REF(HJA,1);
HJJ:=BACKSET(HJB,2);
HD:=HJJ>REF(HJJ,1);
X1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
X2:=X1>REF(X1,1);
Y1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
Y2:=Y1>REF(Y1,1);
Z1:=IF(BARSLAST(X2)<BARSLAST(Y2),X2,Y2);
Z2:=IF(BARSLAST(X2)<BARSLAST(Y2),LOW,HIGH);
UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
WWW:=BACKSET(XX,REF(BARSLAST(LD),1)+2);
XXX:=WWW>REF(WWW,1);
DRAWLINE(XXX,LOW,XX,LOW,0),POINTDOT,colorFF00;
WWWW:=BACKSET(WWW,REF(BARSLAST(LD),1)+2);
XXXX:=WWWW>REF(WWWW,1);
SC2:=(REF(LOW,BARSLAST(VV))-REF(LOW,BARSLAST(XX)))/(BARSLAST(XX)-BARSLAST(VV));
支撑1:REF(LOW,BARSLAST(VV))+BARSLAST(VV)*SC2,POINTDOT,LINETHICK2,colorFFFF;
SC3:=(REF(LOW,BARSLAST(XX))-REF(LOW,BARSLAST(XXX)))/(BARSLAST(XXX)-BARSLAST(XX));
支撑2:REF(LOW,BARSLAST(XX))+BARSLAST(XX)*SC3,POINTDOT,LINETHICK2,colorFF00;
SC4:=(REF(LOW,BARSLAST(XXX))-REF(LOW,BARSLAST(XXXX)))/(BARSLAST(XXXX)-BARSLAST(XXX));
支撑3:REF(LOW,BARSLAST(XXX))+BARSLAST(XXX)*SC4,POINTDOT,LINETHICK2,colorFFFF00;
DRAWLINE(XXXX,LOW,XXX,LOW,0),POINTDOT,colorFFFF00;
DRAWLINE(XX,LOW,VV,LOW,0),POINTDOT,colorFFFF;
WW13:=BACKSET(WW,REF(BARSLAST(HD),1)+2);
WW14:=BACKSET(WW13,REF(BARSLAST(HD),1)+2);
UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
WW3:=BACKSET(WW2,REF(BARSLAST(HD),1)+2);
XX3:=WW3>REF(WW3,1);
WW4:=BACKSET(WW3,REF(BARSLAST(HD),1)+2);
XX4:=WW4>REF(WW4,1);
CS2:=(REF(HIGH,BARSLAST(XX2))-REF(HIGH,BARSLAST(XX3)))/(BARSLAST(XX3)-BARSLAST(XX2));
压力2:REF(HIGH,BARSLAST(XX3))+BARSLAST(XX3)*CS2,colorFF00;
CS3:=(REF(HIGH,BARSLAST(VV2))-REF(HIGH,BARSLAST(XX2)))/(BARSLAST(XX2)-BARSLAST(VV2));
压力1:REF(HIGH,BARSLAST(VV2))+BARSLAST(VV2)*CS3,colorFF00FF;
CS4:=(REF(HIGH,BARSLAST(XX3))-REF(HIGH,BARSLAST(XX4)))/(BARSLAST(XX4)-BARSLAST(XX3));
压力3:REF(HIGH,BARSLAST(XX3))+BARSLAST(XX3)*CS4,colorFF;
DRAWLINE(XX2,HIGH,VV2,HIGH,0),colorFF00FF;
DRAWLINE(XX3,HIGH,XX2,HIGH,0),colorFF00;
DRAWLINE(XX4,HIGH,XX3,HIGH,0),color5200F1;
PARTLINE(HD AND WW4,HIGH*1.01),CIRCLEDOT,colorFFFF;
PARTLINE(HD AND WW4,HIGH*1.01),CROSSDOT,colorFF;
PARTLINE(LD AND (WW14 OR WWWW),LOW*0.98),CIRCLEDOT,colorFFFF;
PARTLINE(LD AND (WW14 OR VV2 OR VV OR WWWW),LOW*0.98),CROSSDOT,colorFF00;
SCSM:=(REF(HIGH,BARSLAST(VV2))-REF(LOW,BARSLAST(XX)))/(BARSLAST(XX)-BARSLAST(VV2));
趋势生命:REF(LOW,BARSLAST(VV))+BARSLAST(VV)*SCSM,LINETHICK2,colorFFFFFF;
FSL:=(REF(HIGH,BARSLAST(VV2))-REF(LOW,BARSLAST(VV)))/(BARSLAST(VV2)-BARSLAST(VV));
分水领1:=REF(LOW,BARSLAST(VV))+BARSLAST(VV)*FSL;
分水领2:=REF(HIGH,BARSLAST(VV2))+BARSLAST(VV2)*FSL;
分水领:IF(BARSLAST(VV2)-BARSLAST(VV)>0,分水领1,分水领2),LINETHICK2,colorFF0000;
DRAWNUMBER(HD AND (WW14 OR VV2 OR VV),HIGH*1.02,HIGH,2),SHIFT1,colorFF00FF;
DRAWNUMBER(LD AND (WW14 OR VV2 OR VV OR WWWW),LOW*0.975,LOW,2),SHIFT1,colorFFFF00;
SXK:=支撑1>=支撑2 AND 支撑2>=支撑3;
TP:=CROSS(CLOSE,压力1) OR CROSS(CLOSE,压力2) OR CROSS(CLOSE,压力3);
DRAWICON(SXK AND TP AND BARSLAST(VV)>=3,CLOSE*1.01,'T03');
周K:=STKINDI(STKLABEL,'kdj.k',0,7);
周D:=STKINDI(STKLABEL,'kdj.d',0,7);
历史流通盘:=CAPI;
ZF:=(HIGH-LOW)*100/LOW;
STZF:=(CLOSE-OPEN)*100/OPEN;
SPZF:=(CLOSE-LOW)*100/LOW;
STZFB:=STZF/ZF;
SPZFB:=SPZF/ZF;
最大震幅:=REF(HHV(ZF,5),1);
最小震幅:=REF(LLV(ZF,5),1);
XZFB:=ZF/最大震幅;
DZFB:=ZF/最小震幅;
XHSB:=HS/REF(HHV(HS,4),1);
DHSB:=HS/REF(LLV(HS,4),1);
DY1:=-5*STZFB>=0.48 AND SPZFB>0.5 AND DZFB>2 AND DHSB>2 AND CLOSE>OPEN;
DY2:=-5*STZFB>=0.8 AND DZFB>1.5 AND DHSB>1.5 AND CLOSE>OPEN;
DY3:=-5*STZFB>=0.82 AND XZFB>0.9 AND DZFB>1.5 AND XHSB>0.9 AND DHSB>1.5 AND CLOSE>OPEN;
单阳:=FILTER((DY1 OR DY2 OR DY3) AND 周K>周D,3);
VV1:=单阳*LOW;
TS:=(BARSLAST(单阳>0))+1>=1 AND (BARSLAST(单阳>0))<=13;
单阳高:=REF(HHV(HIGH,BARSLAST(单阳>0)),1);
单阳攻击:=CROSS(CLOSE,单阳高) AND TS;
强势攻击:=IF(单阳=1 AND 单阳攻击=1,1,0);
单阳低点:=REF(LOW,BARSLAST(VV));
单阳不破:=TS AND LOW>=单阳低点;
时间:=IF(LOW>=单阳低点,BARSLAST(单阳<0),0);
单阳启稳:=CROSS(HS,ZF) AND CLOSE>OPEN AND TS;
STICKLINE(CLOSE>=OPEN,LOW,HIGH,0.1,0),colorFF;
STICKLINE(CLOSE>=OPEN,OPEN,CLOSE,7,1),colorFF;
STICKLINE(CLOSE<=OPEN,LOW,HIGH,0.1,0),colorFFFF00;
STICKLINE(CLOSE<=OPEN,OPEN,CLOSE,7,0),colorFFFF00;
STICKLINE(单阳=1 AND 周K<50,CLOSE,OPEN,8,0),colorFFFF;
STICKLINE(单阳=1 AND 周K<50,HIGH,LOW,0,0),colorFFFF;
STICKLINE(单阳启稳=1,CLOSE,OPEN,8,0),colorFF00FF;
STICKLINE(单阳启稳=1,HIGH,LOW,0,0),colorFF00FF;
STICKLINE(单阳=1 AND 周K>50 AND 周K<80,CLOSE,OPEN,8,0),colorFFFF;
STICKLINE(单阳=1 AND 周K>50 AND 周K<80,HIGH,LOW,0,0),colorFFFF;
STICKLINE(CLOSE>=OPEN AND 单阳攻击=1,CLOSE,OPEN,8,0),colorFF;
STICKLINE(CLOSE>=OPEN AND 单阳攻击=1,CLOSE |