源码
控盘筹码:IF((0.1-WINNER(C/1.1))*100<0,(0.1-WINNER(C/1.1))*200,0),COLORYELLOW,LINETHICK0,COLORBLUE;
STICKLINE(控盘筹码<0,0,控盘筹码,1,0),COLORBLUE;
-120,COLORGRAY;
乖离率:(C-MA(C,250))/MA(C,250)*100;
N1:=BARSLAST(CROSS(C,MA(C,250)));
N2:=BARSLAST(CROSS(MA(C,250),C));
长期趋势:IF(N1<N2,N1+1,0);
长涨幅:(C-REF(C,长期趋势))/REF(C,长期趋势)*100,COLORGREEN,LINETHICK0;
N3:=BARSLAST(CROSS(C,MA(C,20)));
N4:=BARSLAST(CROSS(MA(C,20),C));
{落井下石}
醍醐灌顶:=IF(C/LLV(C,500)>8 OR C/LLV(C,1000)>20.5 AND C>EMA(C,60) AND C>EMA(C,437),1,0),COLORGREEN,LINETHICK0;
STICKLINE(醍醐灌顶,长涨幅,长涨幅*0.93,5,0),COLORWHITE;
醍醐灌顶1:=IF(C/LLV(C,1900)>20.5 OR C/LLV(C,1000)>20.5 AND C>EMA(C,60) AND C>EMA(C,437),1,0),COLORGREEN,LINETHICK0;
STICKLINE(醍醐灌顶1,长涨幅,长涨幅*0.94,3,0),COLORRED;
买入区域:IF((乖离率<-26 AND EMA(C,37)<REF(EMA(C,37),43) AND C<EMA(C,57) AND C<EMA(C,199)) OR 乖离率<-35,1,0),COLORRED,LINETHICK0;
STICKLINE(买入区域,-乖离率*乖离率/7,0,3,0),COLORYELLOW;
STICKLINE(乖离率<-35,-乖离率*乖离率/7,0,3,0),COLORRED;
0,COLORBLUE,LINETHICK1;
股龄:(BARSCOUNT(CLOSE)),COLORWHITE,LINETHICK0;
买入求和:IF(股龄<300,SUM(买入区域,70),SUM(买入区域,233)),COLORGREEN,LINETHICK0;
{军师}
{成本}
A1:=COST(95);
A2:=COST(85);
A3:=COST(75);
A4:=COST(65);
A5:=COST(55);
A6:=COST(45);
A9:=COST(15);
A10:=COST(10);
A11:=COST(8);
A12:=COST(6);
A13:=COST(4);
A14:=COST(2);
B1:=MA(A1,X);
B2:=MA(A2,X);
B3:=MA(A3,X);
B4:=MA(A4,X);
B5:=MA(A5,X);
B6:=MA(A6,X);
B9:=MA(A9,X);
B10:=MA(A10,X);
B11:=MA(A11,X);
B12:=MA(A12,X);
B13:=MA(A13,X);
B14:=MA(A14,X);
DIS1:=A1-A14;
DIS2:=A2-A13;
DIS3:=A3-A12;
DIS4:=A4-A11;
DIS5:=A5-A10;
DIS6:=A6-A9;
DIS0:=(A1+A2+A3+A4+A5+A6)/6;
DIS00:=MA(DIS0,49),LINETHICK3,COLORBLUE;
向下:=IF(DIS00<REF(DIS00,Y),1,0);
一直向上:=IF(COUNT(向下,60)<30,1,0);
红色将军:=IF(B14>=REF(B14,Y)AND B13 >= REF(B13,Y) AND B12 >= REF(B12,Y) AND B11 >= REF(B11,Y) AND B10 >= REF(B10,Y) AND 一直向上,1,0);
绿色军师:=IF(B1<=REF(B1,Y) AND B14>=REF(B14,Y) AND B13>REF(B13,Y) AND B12>REF(B12,Y) AND B11>REF(B11,Y)AND COUNT(红色将军,70)<35,1,0);
副军师在此:=IF(绿色军师 AND COUNT(绿色军师,50)<=1,1,0);
黄色军师:=IF(B1<=REF(B1,Y) AND B14>=REF(B14,Y) AND B13>REF(B13,Y) AND B12>REF(B12,Y) AND B11>REF(B11,Y)AND COUNT(红色将军,70)<35 AND COUNT(红色将军,210)<40 AND(C/HHV(C,500)<0.65 OR C/HHV(C,1000)<0.65 OR C/HHV(C,1500)<0.65 OR C/HHV(C,2000)<0.65),1,0);
军师在此:=IF(黄色军师 AND COUNT(黄色军师,50)<=1,1,0);
副军师统计:=COUNT(绿色军师,160);
副军师统计1:IF(副军师统计>0 AND 绿色军师=1,副军师统计,0),COLORGRAY,LINETHICK0;
军师统计:=COUNT(黄色军师,160);
军师统计2:IF(军师统计>0 AND 黄色军师=1,军师统计,0),COLORGRAY,LINETHICK0;
IF(军师统计>16 OR 副军师统计>16,副军师统计*2,DRAWNULL),COLORRED,LINETHICK2;
{峰回路转}
DRAWTEXT(ISLASTBAR,1.3,'胜算:83%;'),COLORFF00FF;
VAR2:=REF(CLOSE,1);
VAR3:=(SMA(MAX(CLOSE-VAR2,0),6,1))/(SMA(ABS(CLOSE-VAR2),6,1))*100;
VAR4:=(SMA(MAX(CLOSE-VAR2,0),12,1))/(SMA(ABS(CLOSE-VAR2),12,1))*100;
VAR5:=(BARSLAST(VAR4<20))<=3 AND CROSS(VAR3,VAR4);
VAR6:=(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100<-12.5;
VAR7:=LLV(LOW,5);
VAR8:=HHV(HIGH,5);
VAR9:=EMA((CLOSE-VAR7)/(VAR8-VAR7)*100,4);
VARA:=EMA(0.667*REF(VAR9,1)+0.333*VAR9,2);
VARB:=REF(CLOSE,1);
VARC:=(SMA(MAX(CLOSE-VARB,0),7,1))/(SMA(ABS(CLOSE-VARB),7,1))*100;
VARD:=(SMA(MAX(CLOSE-VARB,0),13,1))/(SMA(ABS(CLOSE-VARB),13,1))*100;
VARE:=(BARSLAST(VARD<20))<=3 AND CROSS(VARC,VARD);
VARF:=(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100<-12.5;
VAR10:=LLV(LOW,5);
VAR11:=HHV(HIGH,5);
VAR12:=EMA((CLOSE-VAR10)/(VAR11-VAR10)*100,4);
VAR13:=EMA(0.667*REF(VAR12,1)+0.333*VAR12,2);
VAR14:=1;
VAR15:=REF(CLOSE,1);
VAR16:=(SMA(MAX(CLOSE-VAR15,0),7,1))/(SMA(ABS(CLOSE-VAR15),7,1))*100;
VAR17:=(SMA(MAX(CLOSE-VAR15,0),13,1))/(SMA(ABS(CLOSE-VAR15),13,1))*100;
VAR18:=(BARSLAST(VAR17<20))<=3 AND CROSS(VAR16,VAR17);
VAR19:=(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100<-12.5;
VAR1A:=LLV(LOW,5);
VAR1B:=HHV(HIGH,5);
VAR1C:=EMA((CLOSE-VAR1A)/(VAR1B-VAR1A)*100,4);
VAR1D:=EMA(0.667*REF(VAR1C,1)+0.333*VAR1C,2);
VAR1E:=REF(CLOSE,1);
VAR1F:=(SMA(MAX(CLOSE-VAR1E,0),6,1))/(SMA(ABS(CLOSE-VAR1E),6,1))*100;
VAR20:=(SMA(MAX(CLOSE-VAR1E,0),12,1))/(SMA(ABS(CLOSE-VAR1E),12,1))*100;
VAR21:=(BARSLAST(VAR20<20))<=3 AND CROSS(VAR1F,VAR20);
VAR22:=(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100<-12.5;
VAR23:=LLV(LOW,5);
VAR24:=HHV(HIGH,5);
VAR25:=EMA((CLOSE-VAR23)/(VAR24-VAR23)*100,4);
VAR26:=EMA(0.667*REF(VAR25,1)+0.333*VAR25,2);
VAR27:=REF(CLOSE,1);
VAR28:=(SMA(MAX(CLOSE-VAR27,0),7,1))/(SMA(ABS(CLOSE-VAR27),7,1))*100;
VAR29:=(SMA(MAX(CLOSE-VAR27,0),13,1))/(SMA(ABS(CLOSE-VAR27),13,1))*100;
VAR2A:=(BARSLAST(VAR29<20))<=3 AND CROSS(VAR28,VAR29);
VAR2B:=(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100<-12.5;
VAR2C:=LLV(LOW,5);
VAR2D:=HHV(HIGH,5);
VAR2E:=EMA((CLOSE-VAR2C)/(VAR2D-VAR2C)*100,4);
VAR2F:=EMA(0.667*REF(VAR2E,1)+0.333*VAR2E,2);
VAR30:=DMA(EMA(CLOSE,12),SUM(VOL,5)/3/CAPITAL);
VAR31:=(CLOSE-VAR30)/VAR30*100;
柳暗花明:VAR2A AND VAR2B AND CROSS(VAR2E,VAR2F) AND VAR2E<=25 OR VAR21 AND VAR22 AND CROSS(VAR25,VAR26) AND VAR25<=25 OR VAR18 AND VAR19 AND CROSS(VAR1C,VAR1D) AND VAR1C<=25 OR VARE AND VARF AND CROSS(VAR12,VAR13) AND VAR12<=25 OR VAR5 AND VAR6 AND CROSS(VAR9,VARA) AND VAR9<=25 OR REF(VAR31,1)<-35 AND VAR31>REF(VAR31,1) AND REF(VAR31,1)<REF(VAR31,2) AND VAR31-REF(VAR31,1)>2.5,LINETHICK0;
DRAWICON(柳暗花明,-280,3);
STICKLINE(柳暗花明,200,0,6,0),COLORGRAY;