主图指标
MX:=EMA(C,2);
MXA:=EMA(SLOPE(C,21)*20+C,42);
AA:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);
牛熊线:DMA((2*CLOSE+LOW+HIGH)/4,AA),LINETHICK3,COLORRED;
CC:=(CLOSE/牛熊线);
MA1:=MA(CC*(2*CLOSE+HIGH+LOW)/4,3);
MAAA:=((MA1-牛熊线)/牛熊线)/3;
TMP:=MA1-MAAA*MA1;
JJ:IF(TMP<=牛熊线,牛熊线,DRAWNULL),LINETHICK3,COLORGREEN;
XJ:IF(TMP<=牛熊线,TMP,DRAWNULL),LINETHICK2,COLORBLUE;
建仓:CROSS(MX,MXA),NODRAW;
SEL:=CROSS(MXA,MX);
DRAWICON(建仓,L-0.8,42);
STICKLINE(建仓,O,C,2.5,0),COLORMAGENTA;
DRAWICON(SEL,H+0.1,43);
STICKLINE(MX>=MXA,LOW,HIGH,0.0,1),COLORRED;
STICKLINE(MX>=MXA,CLOSE,OPEN,3,1),COLORRED;
STICKLINE(MX<MXA,LOW,HIGH,0.0,1),COLORGREEN;
STICKLINE(MX<MXA,CLOSE,OPEN,3,1),COLORGREEN;
STICKLINE(建仓,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(SEL,OPEN,CLOSE,2,0),COLORBLUE;
CP:=MA(CLOSE,9),COLORCYAN,LINETHICK1;
JD:=MA(CLOSE,18),COLORMAGENTA;
DRAWICON(CROSS(CP,JD) AND MX>=MXA,JD-0.1,1);
DRAWTEXT(CROSS(CP,JD) AND MX>=MXA,JD-0.38,'加仓'),COLORYELLOW;
BL:=VOL>=REF(V,1)*1.91 AND C>REF(C,1)*1.01;
DRAWTEXT(FILTER(BL,3),H+0.2,'倍量柱');
STICKLINE(FILTER(BL,3),OPEN,CLOSE,1.5,0);
程序化指标:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,25))/3;
牛熊分界线:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,20)+MA(CLOSE,30)+MA(CLOSE,60)+MA(CLOSE,120))/6;
公式:=(MA(CLOSE,13)+MA(CLOSE,34)+MA(CLOSE,55))/3;
STICKLINE(程序化指标>公式,程序化指标,公式,0.1,1),COLORFF0080;
STICKLINE(程序化指标<公式,程序化指标,公式,0.1,1),COLOR00FF00;
副图1
VAR1:=EMA(CLOSE,12)-EMA(CLOSE,26);
VAR2:=EMA(VAR1,9);
VAR3:=VAR1>VAR2;
VAR4:=(CLOSE-LLV(LOW,12))/(HHV(HIGH,12)-LLV(LOW,12))*100;
VAR5:=SMA(VAR4,3,1);
VAR6:=SMA(VAR5,3,1);
VAR7:=VAR5>VAR6;
VAR8:=REF(CLOSE,1);
VAR9:=SMA(MAX(CLOSE-VAR8,0),9,1)/SMA(ABS(CLOSE-VAR8),9,1)*100;
VAR10:=SMA(MAX(CLOSE-VAR8,0),26,1)/SMA(ABS(CLOSE-VAR8),26,1)*100;
VAR11:=VAR9>VAR10;
VAR12:=SMA(VAR4,3,1);
VAR13:=SMA(VAR12,3,1);
VAR14:=VAR12>VAR13;
VAR15:=(MA(CLOSE,3)+MA(CLOSE,9)+MA(CLOSE,12)+MA(CLOSE,26))/4;
VAR16:=CLOSE>VAR15;
VAR17:=CLOSE-REF(CLOSE,1);
VAR18:=100*EMA(EMA(VAR17,9),9)/EMA(EMA(ABS(VAR17),9),3);
VAR19:=100*EMA(EMA(VAR17,26),12)/EMA(EMA(ABS(VAR17),26),12);
VAR20:=VAR18>VAR19;
VAR21:=DMA((HIGH+LOW+CLOSE*2)/4,0.9);
VAR22:=REF(EMA(VAR21,3),1);
VAR23:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
VAR24:=IF(CLOSE>OPEN,VAR23*(HIGH-LOW),IF(CLOSE<OPEN,VAR23*(HIGH-OPEN+CLOSE-LOW),VOL/2))+IF(CLOSE>OPEN,0-VAR23*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,0-VAR23*(HIGH-LOW),0-VOL/2));
VAR25:=VAR24/20/1.15;
VAR26:=VAR25*0.55+REF(VAR25,1)*0.33+REF(VAR25,2)*0.22;
VAR27:=EMA(VAR26,8);
VAR28:=EMA(VAR26,3);
VAR29:=VAR28;
VAR30:=VOL;
VAR31:=MA(VAR30,5);
VAR32:=MA(VAR30,10);
VAR33:=VAR31>=VAR32;
VAR34:=VAR29>=0;
VAR35:=VAR34 AND VAR33;
DRAWICON(VAR35,1,25);
VAR36:=MA(KDJ.K#WEEK(9,3,3),5);
VAR37:=EMA(CLOSE,12/2)-EMA(CLOSE,26/2);
VAR38:=EMA(VAR37,9/2);
VAR39:=VAR36>=REF(VAR36,1) AND VAR37>=VAR38;
DRAWICON(VAR39,0.9,7);
VAR40:=VAR39 OR VAR35;
VAR41:=VAR3 AND VAR7 AND VAR11 AND VAR14 AND VAR16 AND VAR20;
VAR42:=COST(50)*COST(50)/COST(80);
VAR43:=COST(40)*COST(40)/COST(60);
VAR44:=VAR43-VAR42;
VAR45:=VAR44>0 AND CLOSE>VAR43;
VAR46:=VAR44<0 AND CLOSE>VAR42;
VAR47:=VAR45 OR VAR46 OR (VAR45 AND VAR46);
VAR48:=VAR47=0 OR (VAR44>0 AND CLOSE>VAR43 AND CLOSE<MA(CLOSE,10)) OR (VAR44<0 AND CLOSE>VAR42 AND CLOSE<MA(CLOSE,5));
VAR49:=VAR47 AND REF(VAR48,1);
VAR50:=VAR48 AND REF(VAR47,1);
STICKLINE(VAR48,0.5,0.8,3,0),COLORGREEN;
STICKLINE(VAR48,0.5,0.8,2.5,0),COLOR006000;
STICKLINE(VAR48,0.5,0.8,2,0),COLOR007500;
STICKLINE(VAR48,0.5,0.8,1.5,0),COLOR009100;
STICKLINE(VAR48,0.5,0.8,1,0),COLOR00A600;
STICKLINE(VAR48,0.5,0.8,0.5,0),COLOR00BB00;
STICKLINE(VAR48,0.5,0.8,0,0),COLOR00CC00;
STICKLINE(VAR47,0.5,0.8,3,0),COLORYELLOW;
STICKLINE(VAR47,0.5,0.8,2.5,0),COLOR0035FF;
STICKLINE(VAR47,0.5,0.8,2,0),COLOR0064FF;
STICKLINE(VAR47,0.5,0.8,1.3,0),COLOR0093FF;
STICKLINE(VAR47,0.5,0.8,0.8,0),COLOR00C2FF;
STICKLINE(VAR47,0.5,0.8,0.3,0),COLOR00FFFF;
STICKLINE(VAR41,0.5,0.8,3,0),COLORRED;
STICKLINE(VAR41,0.5,0.8,2.5,0),COLOR000055;
STICKLINE(VAR41,0.5,0.8,2,0),COLOR000077;
STICKLINE(VAR41,0.5,0.8,1.5,0),COLOR000099;
STICKLINE(VAR41,0.5,0.8,1,0),COLOR0000BB;
STICKLINE(VAR41,0.5,0.8,0.5,0),COLOR0000DD;
STICKLINE(VAR41,0.5,0.8,0,0),COLOR0000FF;
DRAWICON(VAR47 OR VAR41 AND REF(VAR47 OR VAR41,1)=0 AND VAR40,0.5,25);
副图2
X_8:=(3*CLOSE+LOW+OPEN+HIGH)/6;
X_9:=(20*X_8+19*REF(X_8,1)+18*REF(X_8,2)+17*REF(X_8,3)+16*REF(X_8,4)+15*REF(X_8,5)+14*REF(X_8,6)+13*REF(X_8,7)+12*REF(X_8,8)+11*REF(X_8,9)+10*REF(X_8,10)+9*REF(X_8,11)+8*REF(X_8,12)+7*REF(X_8,13)+6*REF(X_8,14)+5*REF(X_8,15)+4*REF(X_8,16)+3*REF(X_8,17)+2*REF(X_8,18)+REF(X_8,20))/210;
X_10:=MA(X_9,10);
X_11:=(CLOSE+HIGH+OPEN+LOW)/4;
X_12:=XMA(X_11,20)*(1+80/1000);
X_13:=XMA(X_11,32)*(1-100/1000);
金钱豹区间:DRAWBAND(X_13>X_10,RGB(155,50,50),X_13<X_10,RGB(250,250,0));