通用源码
布林 主图叠加
中轨:MA(CLOSE,20),COLOR0080FF;
上轨:中轨+STD(CLOSE,20),COLORFFFF00;
下轨:中轨-STD(CLOSE,20),COLORFFFF00;
上极:中轨+2*STD(CLOSE,20),COLORBLUE;
下极:中轨-2*STD(CLOSE,20),COLORBLUE;
黑马波段 主图叠加
上线:=SMA(C,6.5,1);
下线:=SMA(C,13.5,1);
上线1:=SMA(C,3,1);
下线1:=SMA(C,8,1);
STICKLINE(上线>下线,上线,下线,2,2),COLORRED,LINETHICK2;
STICKLINE(下线>上线,上线,下线,2,2),COLORGREEN,LINETHICK2;
DRAWTEXT(CROSS(上线,下线),LOW,'●
全仓买'),COLOR00FF00;
DRAWTEXT(CROSS(下线1,上线1),H,'◆
清仓'),COLORYELLOW;
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
UPR:=BBI+3*STD(BBI,13),LINETHICK2;
DWN:=BBI-3*STD(BBI,13);
安全:=MA(CLOSE,60),LINETHICK2;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWTEXT( CROSS(82,RSI) , HIGH,'◆
减仓') ,COLORFF9966,LINETHICK2;
A7:=(2*C+H+L)/4;
操作:MA(A7,5),LINETHICK2;
操作1:=MA(A7,5)*1.03,LINETHICK2;
操作2:=MA(A7,5)*0.97,LINETHICK2;
VAR1:LLV(A7,21);
VAR0:HHV(A7,21);
SK:=EMA((A7-VAR1)/(VAR0-VAR1)*100,7);
SD:=EMA(0.667*REF(SK,1)+0.333*SK,5);
DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>6/10 AND VOL>=1.5*MA(VOL,5) AND
COUNT(SK>=SD,3) AND REF(LOW,1)=LLV(LOW,120),1,0),LOW*0.98,'●
买进') ,COLOR0099FF;
DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),13)/13>6/10 AND
COUNT(SK>SD,6) AND REF(LOW,5)=LLV(LOW,120) AND REF(CLOSE>=OPEN,4) AND
REF(CLOSE>OPEN,3) AND REF(CLOSE>OPEN,2) AND REF(OPEN>CLOSE,1) AND
OPEN>REF(CLOSE,1),1,0),LOW*0.98,'●
买进') ,COLORYELLOW;
D:=MA(CLOSE,80)-MA(CLOSE,10)/3;
DRAWTEXT(IF(CLOSE<D AND VOL/240>MA(VOL,5)/240 AND CLOSE>REF(CLOSE,1)*1.08
AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW*0.98,'●
抄底'),COLORYELLOW;
VAR12:=((VOL / CAPITAL) * 100);
VAR15:=HHVBARS(HIGH,50);
VAR17:=(((CLOSE - REF(OPEN,VAR15)) / REF(OPEN,VAR15)) * 100);
VAR22:=(REF(CLOSE,2) * 0.865);
VAR23:=(REF(CLOSE,13) * 0.772);
VAR24:=MIN(VAR22,VAR23);
超跌反弹:=(IF((((((CLOSE - VAR24) / CLOSE) < 0.03) AND (VAR17 < (0 - 35))) AND ((SUM(VAR12,5) / 5) < 1.8)),1,0) * 5);
DRAWTEXT(超跌反弹,L,'♂'),COLORRED;
VAR2:=C<0.98*REF(C,1);
VAR3:=O<REF(C,1);
VAR4:=(C-REF(C,1))/REF(C,1)*100;
VAR5:=(C-REF(O,29))/REF(O,29)*100;
VAR6:=MA(COST(22)/L,3);
成功率99:=VAR6>1.5 AND VAR4>5 AND VAR5<-30;
DRAWTEXT(成功率99>0 AND REF(成功率99,1)=0,L,'↑99%'),COLORRED;
仓:=EMA((WINNER(C*1.1)-WINNER(C*0.9))*80,5);
仓1:=INDEXC;
仓2:=MA(仓1,5);
仓3:=MA(仓1,20);
仓4:=MA(仓1,30);
B2:=仓2>仓1*1.03 AND 仓3>仓1*1.13;
操盘手:=仓<6 AND B2;
DRAWTEXT(操盘手,L,'仓'),COLORRED;
底1:=IF((((((EMA(CLOSE,5) / EMA(EMA(CLOSE,9),16)) <= 0.85) AND ((CLOSE / REF(CLOSE,1)) > 0.905)) AND ((CLOSE / REF(CLOSE,1)) < 1.05)) AND (((VOL / CAPITAL) * 100) < 5)),50,0);
底2:=((0 - ((100 * (HHV(HIGH,34) - CLOSE)) / (HHV(HIGH,34) - LLV(LOW,34)))) + 100);
底3:=((0 - ((100 * (HHV(HIGH,50) - CLOSE)) / (HHV(HIGH,50) - LLV(LOW,50)))) + 100);
底:=((0 - ((100 * (HHV(HIGH,70) - CLOSE)) / (HHV(HIGH,70) - LLV(LOW,70)))) + 100);
底4:=(((((CLOSE - MA(CLOSE,34)) / MA(CLOSE,34)) * 100) + 10) * 5);
底5:=(((((CLOSE - MA(CLOSE,50)) / MA(CLOSE,50)) * 100) + 10) * 5);
底6:=(((((CLOSE - MA(CLOSE,70)) / MA(CLOSE,70)) * 100) + 10) * 5);
S1:=((((((底2 + 底3) + 底) + 底4) + 底5) + 底6) / 6);
S2:=EMA(S1,3);
S3:=ABS((底4 - 底6));
S4:=((S1 + S3) / 2);
S5:=(((0 - 1) * (EMA((100 * (1 - WINNER(CLOSE))),1) - 50)) + 50);
S6:=(S5 + S4);
S7:=IF(((底1 > 0) AND (S6 < 0)),200,0);
S8:=IF((((((S4 < 0) AND (CLOSE = LLV(CLOSE,5))) AND ((CLOSE / REF(CLOSE,1)) > 0.905)) AND ((CLOSE / REF(CLOSE,1)) < 1.05)) AND (((VOL / CAPITAL) * 100) < 5)),(0 - 50),0);
S9:=IF(((S6 < 0) AND (S8 = (0 - 50))),100,0);
底C0:=(REF(CLOSE,2) * 0.865);
底C1:=(REF(CLOSE,13) * 0.772);
底C2:=MIN(底C0,底C1);
底C3:=((100 * VOL) / CAPITAL);
底C4:=IF(((((CLOSE - 底C2) / CLOSE) < (3 / 100)) AND ((SUM(底C3,5) / 5) < 1.8)),1,0);
底AA:=IF(((底C4 > 0) AND ((S8 < 0) OR (底1 > 0))),100,0);
V1:=(((((S7 > 0) AND (S9 > 0)) AND ((SUM(((VOL / CAPITAL) * 100),5) / 5) < 1)) OR (底C4 > 0)) AND ((S8 < 0) OR (底1 > 0)));
V2:=((((S7 > 0) AND (S9 > 0)) AND ((SUM(((VOL / CAPITAL) * 100),5) / 5) < 1)) OR ((底C4 > 0) AND ((REF(CLOSE,1) / REF(CLOSE,2)) > 0.902)));
V3:=(V1 OR V2);
V4:=(底AA OR V3);
V5:=底AA;
G:=(MA(CLOSE,80) - (MA(CLOSE,10) / 3));
Z:=IF((V4 > 0),87,0);
Z1:=IF((V5 > 0),91,0);
Z2:=IF(((底AA > 0) AND (CLOSE < G)),97,0);
Z3:=MAX(MAX(Z2,Z),Z1);
DRAWTEXT(FILTER(((((Z > 80) AND (Z1 > 90)) AND (Z2 > 90)) AND (Z3 > 90)),13),L,'↑底95%'),COLORRED;
战神买卖 主图叠加
MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
VAR1:=EMA((C-(LLV(L,25)))/((HHV(H,25))-(LLV(L,25)))*100,5);
VAR2:=VAR1,COLORRED,LINETHICK2;
VAR3:=MA((V-REF(V,1))/REF(V,1),5);
VAR4:=(C-MA(C,24))/MA(C,24)*100;
VAR5:=VAR4*(1+VAR3);
VAR6:=REF(VOL,1);
VAR7:=SMA(MAX(VOL-VAR6,0),6,1)/SMA(ABS(VOL-VAR6),6,1)*100;
VAR8:=VAR5>REF(VAR5,1) AND VAR2<REF(VAR2,1) AND VAR7>REF(VAR7,1);
VAR9:=VAR5<REF(VAR5,1) AND VAR2>REF(VAR2,1) AND VAR7>REF(VAR7,1);
VAR10:=VAR5>REF(VAR5,1) AND VAR2<REF(VAR2,1) AND VAR7<REF(VAR7,1);
VAR11:=VAR5<REF(VAR5,1) AND VAR2>REF(VAR2,1) AND VAR7<REF(VAR7,1);
VAR12:=VAR5>REF(VAR5,1);
VAR13:=VAR5<REF(VAR5,1);
VAR14:=VAR2<REF(VAR2,1);
VAR15:=VAR2>REF(VAR2,1);
VAR16:=VAR8 OR VAR10;
VAR17:=VAR9 OR VAR11;
VAR18:=VAR13 AND VAR14;
VAR19:=VAR16 OR VAR18;
VAR20:=VAR12 AND VAR15;
VAR21:=VAR17 OR VAR20;
VAR22:=LAST(VAR19,N1,1) AND VAR20;
VAR23:=LAST(VAR21,N2,1) AND VAR18;
DRAWTEXT(VAR22,L,'★买'),COLOR00FFFF;
DRAWTEXT(VAR23,H,'★卖'),COLORWHITE;
黑马趋势 副图
{黑马趋势}
A1:3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1);
黑马线:EMA(A1,5),LINETHICK2,COLOR6600FF;
A2:=(黑马线-REF(黑马线,1))/REF(黑马线,1)*100;
A3:=EMA(C,5);
A4:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
趋势线:(MA(3*SMA(A4,6,1)-2*SMA(SMA(A4,5,1),5,1),2)),LINETHICK2,COLORYELLOW;
A5:=(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60))*100;
DRAWTEXT(FILTER(REF(黑马线,1)>90 AND A2<0,7),黑马线,'跑'),COLOR00FF00;
DRAWTEXT(CROSS(A1,黑马线)AND 黑马线<A5,黑马线,'黑马');
DRAWTEXT(CROSS(黑马线,A5)AND 趋势线<80,黑马线,'追涨');
DRAWTEXT(CROSS(趋势线,0)AND 黑马线<40,5,'大黑马');
底部:(A2<-10 AND A2>REF(A2,1))*25,COLORRED;
DRAWICON(底部 AND A3>REF(A3,1),25,4);
机会来临:REF(IF((MA(C,5)-C)/C>0.04 AND (MA(C,10)-MA(C,5))/MA(C,5)>0.04,30,0),1),COLORF00FF0;
大势已去:IF(CROSS(黑马线,A1)AND 黑马线>70 AND 趋势线>80,90,100),COLORFF0000;
牛市操盘线 主图叠加
MA5:MA(CLOSE,5),COLORFFFFFF;
MA10:MA(CLOSE,10),COLOR00FFFF;
MA21:MA (CLOSE,21),COLOR00FF00;
MA30:MA(CLOSE,30),COLOR0000FF;
买线:=EMA (C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
BUY1:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);DRAWTEXT(BUY1,LOW*0.95,'B'),COLORWHITE,LINETHICK5;
DRAWTEXT (SEL,HIGH*1.05,'S'),COLORWHITE,LINETHICK5;
STICKLINE(买线>=卖线,LOW,HIGH |