{自用指标}
箱顶:MA(REF(HHV(CLOSE,30),1),2)linethick2,,ColorFF9DFF; 箱底:MA(REF(LLV(CLOSE,30),1),2),linethick2,ColorFFAAAA; DRAWTEXT(CROSS(REF(ZIG(3,13),1),ZIG(3,13)) ,high*1.01 ,' ★老哥' ),color00ff00; DRAWTEXT(CROSS(ZIG(3,13) ,REF(ZIG(3 ,13),1)) ,low*0.98,'★兄涨') ,coloryellow; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,9,0 ),COLOR009900; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR00cc00; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.4,0 ),COLOR33ff00; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.1,0 ),COLOR66ff00; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,9,0 ),COLOr000099; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6 ,0 ),COLOR0000cc; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.4 ,0 ),COLOR0000ff; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.1 ,0 ),COLOR0033ff; STICKLINE(CLOSE>OPEN,OPEN,LOW,0.5,0 ),COLOr000099; STICKLINE(CLOSE>OPEN,CLOSE,HIGH,0.5 ,0 ),COLOr000099; STICKLINE(OPEN>=CLOSE,CLOSE,LOW,0.5 ,0 ),COLOR009900; STICKLINE(OPEN>=CLOSE,OPEN,HIGH,0.5 ,0 ),COLOR009900; { 宝塔线 } Var1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2); Var2:=REF(Var1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); Var3:=REF(Var2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); Var4:=REF(Var3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); Var5:=REF(Var4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); Var6:=REF(Var5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); Var7:=REF(Var6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); Var8:=REF(Var7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); Var9:=REF(Var8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VarA:=REF(Var9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VarB:=REF(VarA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VarC:=REF(VarB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); 持股:STICKLINE(Var1 OR Var2 OR Var3 OR Var4 OR Var5 OR Var6 OR Var7 OR Var8 OR Var9 OR VarA OR VarB OR VarC,CLOSE,REF(CLOSE,1),8,1),COLORRED; VarD:=CLOSEVarE:=REF(VarD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VarF:=REF(VarE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); Var10:=REF(VarF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); Var11:=REF(Var10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); Var12:=REF(Var11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); Var13:=REF(Var12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); Var14:=REF(Var13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); Var15:=REF(Var14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); Var16:=REF(Var15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); Var17:=REF(Var16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); Var18:=REF(Var17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); 持币:STICKLINE(VarD OR VarE OR VarF OR Var10 OR Var11 OR Var12 OR Var13 OR Var14 OR Var15 OR Var16 OR Var17 OR Var18,CLOSE,REF(CLOSE,1),8,0),colorblue,,ColorFFFF00; Var19:=REF(VarD OR VarE OR VarF OR Var10 OR Var11 OR Var12 OR Var13 OR Var14 OR Var15 OR Var16 OR Var17 OR Var18,1) AND Var1; 底:STICKLINE(Var19,REF(CLOSE,1),REF(CLOSE,2),8,0),colorwhite,Color00FFFF ; Var1A:=REF(Var1 OR Var2 OR Var3 OR Var4 OR Var5 OR Var6 OR Var7 OR Var8 OR Var9 OR VarA OR VarB OR VarC,1) AND VarD; 顶:STICKLINE(Var1A,REF(CLOSE,1),REF(CLOSE,2),8,1),,colorgreen ,ColorFF0000; 持仓线:=ma(HIGH,19),linethick2,Color00FFFF; 空仓线:=ma(LOW,19),linethick2,ColorFF8A15; 拉升线:=ma(CLOSE,3),ColorFFFFFF; 涨:EMA(C,8),COLORGREEN,Color00E800;{K上买1} 涨涨:=EMA(涨,3),COLORGREEN; 哥:EMA(涨涨,4),COLORRED,,ColorFF3E9E;{K下空1} 哥哥:=EMA(哥,4),COLORRED,,ColorFF3E9E; 拉升线:=ema(LOW,2); 真假线:=ema(ema(LOW,19)*1.03,26)-0.17,,Color00FFFF,linethick2,ColorFF2DFF; DRAWICON(cross(拉升线,真假线),拉升线,10); {一剑封喉} VAR81:=((AMOUNT / VOL) / 100); VAR82:=(((((3 * HIGH) + LOW) + OPEN) + (2 * CLOSE)) / 7); VAR83:=((SUM(AMOUNT,5) / VAR81) / 100); VAR84:=((SUM(AMOUNT,13) / VAR81) / 100); VAR85:=((SUM(AMOUNT,34) / VAR81) / 100); 一剑封喉:=((CROSS(CLOSE,MA(CLOSE,13)) AND CROSS(CLOSE,MA(CLOSE,34))) AND CROSS(CLOSE,MA(CLOSE,55))); A81:=(((CLOSE - LLV(LOW,22)) / (HHV(HIGH,22) - LLV(LOW,22))) * 100); A82:=(((CLOSE - LLV(LOW,27)) / (HHV(HIGH,27) - LLV(LOW,27))) * 100); A8:=((3 * SMA(A81,5,1)) - (2 * SMA(SMA(A82,5,1),3,1))); YNGS:=(一剑封喉 AND (A8 < 30)),LINETHICK0; DRAWICON((一剑封喉 AND (A8 < 30)),(LOW * 0.99),1); DRAWTEXT((一剑封喉 AND (A8 < 30)),(LOW * 0.98),'一剑封喉'),colorFF; {K线组合} QO:=REF(O,2); QC:=REF(C,2); ZO:=REF(O,1); ZC:=REF(C,1); JYZHK:= ABS(QO-QC)/QO<0.02 AND ZO/ZC>1.02 AND ABS(O-C)/O<0.02 AND C>MA(C,30); JYZHV:=VJYZH:=JYZHK AND JYZHV; DRAWTEXT(JYZH,L,'调到位'),ColorFFFFFF;{金印} {分析趋势} input:N1(3,1,100),N(2,1,100),Q(10,0,100); AA1:=(REF(HIGH,N1) = HHV(HIGH,((2 * N1) + 1))); AAA:=FILTER(AA1,N1); BB1:=BACKSET(AAA,(N1 + 1)); CC1:=FILTER(BB1,N1); CC:=(CC1 OR ISLASTBAR); AA2:=(REF(LOW,N1) = LLV(LOW,((2 * N1) + 1))); AAA2:=FILTER(AA2,N1); BB2:=BACKSET(AAA2,(N1 + 1)); CC22:=FILTER(BB2,N1); GG1:=(ISLASTBAR AND REF(CC1,BARSLAST(CC1))); HH9:=BACKSET(GG1,(BARSLAST(CC1) + 1)); II:=(HH9 > REF(HH9,1)); JJ1:=REF(BARSLAST(CC1),1); KK:=BACKSET(II,(JJ1 + 2)); LL9:=(KK > REF(KK,1)); DRAWLINE(LL9,HIGH,II,HIGH,1),POINTDOT,colorFFFF00; CS:=((REF(HIGH,BARSLAST(II)) - REF(HIGH,BARSLAST(LL9))) / (BARSLAST(LL9) - BARSLAST(II))); 阻力线:=(REF(HIGH,BARSLAST(II)) + (BARSLAST(II) * CS)); 阻力值:阻力线,LINETHICK0,colorFF0000; DRAWICON(CROSS(HIGH,阻力线),(阻力线 * 1.01),4); GG2:=(ISLASTBAR AND REF(CC22,BARSLAST(CC22))); HH2:=BACKSET(GG2,(BARSLAST(CC22) + 1)); II2:=(HH2 > REF(HH2,1)); JJ2:=REF(BARSLAST(CC22),1); KK2:=BACKSET(II2,(JJ2 + 2)); LL2:=(KK2 > REF(KK2,1)); DRAWLINE(LL2,LOW,II2,LOW,1),POINTDOT,colorFF00; CS1:=((REF(LOW,BARSLAST(II2)) - REF(LOW,BARSLAST(LL2))) / (BARSLAST(LL2) - BARSLAST(II2))); 阻力线1:=(REF(LOW,BARSLAST(II2)) + (BARSLAST(II2) * CS1)); 阻力值1:阻力线1,LINETHICK0,colorFF00; DRAWICON(CROSS(阻力线1,LOW),(阻力线1 * 0.99),5); DRAWICON(LL2,LOW,13); DRAWICON(II2,LOW,13); A91:=BACKSET(ISLASTBAR,(PEAKBARS(1,3,N) + 1)); A92:=(A91 > REF(A91,1)); B91:=BACKSET(ISLASTBAR,(PEAKBARS(1,3,(N + 1)) + 1)); B92:=(B91 > REF(B91,1)); A9:=LINEVALUE(B92,HIGH,A92,HIGH,0,0); DRAWICON(CROSS(CLOSE,A9),LOW,4); Ak1:=BACKSET(ISLASTBAR,(PEAKBARS(1,3,1) + 1)); Ak2:=(Ak1 > REF(Ak1,1)); Bk1:=BACKSET(ISLASTBAR,(PEAKBARS(1,3,2) + 1)); Bk2:=(Bk1 > REF(Bk1,1)); Dk1:=BACKSET(ISLASTBAR,(PEAKBARS(1,3,3) + 1)); Dk2:=(Dk1 > REF(Dk1,1)); DRAWLINE(Dk2,HIGH,Bk2,HIGH,1),color66CCFF; DRAWLINE(Bk2,HIGH,Ak2,HIGH,1),colorFFCC; DRAWICON(Ak2,HIGH,13); DRAWICON(Bk2,HIGH,13); DRAWICON(Dk2,HIGH,13); {直效主图}{N3 10 1 50 CX 2 1 2} Ap1:=REF(C,N3)=HHV(C,2*N3+1); Ap2:=REF(C,N3)=LLV(C,2*N3+1); Bp1:=FILTER(Ap1,N3); Ck1:=BACKSET(Bp1,N3+1); HD9:=FILTER(Ck1,N3); Bp2:=FILTER(Ap2,N3); Ck2:=BACKSET(Bp2,N3+1); LD9:=FILTER(Ck2,N3); Ap:=REF(C,BARSLAST(HD9)); Bp:=REF(C,BARSLAST(LD9)); t1:=BARSLAST(HD9)t2:=BARSLAST(HD9)>BARSLAST(LD9) AND NOT(LD9); PARTLINE(t1,Ap),COLORCC6600,LINETHICK2; PARTLINE(t2,Bp),COLORDDDDDD,LINETHICK2; DRAWNUMBER(t1=0 and ref(t1,1)>0 or ISLASTBAR and t1>0,ref(ap,1),ref(ap,1),2),COLORCC6600; DRAWNUMBER(t2=0 and ref(t2,1)>0 or ISLASTBAR and t2>0,ref(bp,1),ref(bp,1),2),COLORDDDDDD; PARTLINE(t1,Ap*0.9),COLORCC6600,LINETHICK1; DRAWNUMBER(t1=0 and ref(t1,1)>0 or ISLASTBAR and t1>0,ref(ap*0.9,1),ref(ap*0.9,1),2),COLORCC6600; PARTLINE(t2,Bp*1.1),COLORDDDDDD,LINETHICK1; DRAWNUMBER(t2=0 and ref(t2,1)>0 or ISLASTBAR and t2>0,ref(bp*1.1,1),ref(bp*1.1,1),2),COLORCDDDDDD; {方向好线 } VARAB:=IF((C > 150),91.3,0.913); 【下沿】:=(INTPART((C / VARAB)) * VARAB); 【上沿】:=(【下沿】 + VARAB); 【中线】:=((【下沿】 + 【上沿】) / 2); STICKLINE(((((SYSPARAM(1) = BARPOS) AND 【下沿】) AND (C > 【下沿】)) AND (C < 【中线】)),【下沿】,【下沿】,50,0),LINETHICK2,colorFF9900; STICKLINE(((((SYSPARAM(1) = BARPOS) AND 【上沿】) AND (C < 【上沿】)) AND (C > 【中线】)),【上沿】,【上沿】,50,0),LINETHICK2,color99FF; STICKLINE(((SYSPARAM(1) = BARPOS) AND 【中线】),【中线】,【中线】,50,0),LINETHICK2,colorFFFFFF; DRAWTEXT(((((SYSPARAM(1) = BARPOS) AND 【下沿】) AND (C > 【下沿】)) AND (C < 【中线】)),【下沿】,'支撑'),SHIFT2,colorFF00; DRAWTEXT(((((SYSPARAM(1) = BARPOS) AND 【下沿】) AND (C > 【下沿】)) AND (C < 【中线】)),【中线】,'压力'),SHIFT2,colorFF; DRAWTEXT(((((SYSPARAM(1) = BARPOS) AND 【上沿】) AND (C < 【上沿】)) AND (C > 【中线】)),【上沿】,'压力'),SHIFT2,colorFF; DRAWTEXT(((((SYSPARAM(1) = BARPOS) AND 【上沿】) AND (C < 【上沿】)) AND (C > 【中线】)),【中线】,'支撑'),SHIFT2,colorFF00; 蓝:【下沿】,LINETHICK0,colorFF9900; 棕:【上沿】,LINETHICK0,color99FF; 白:【中线】,LINETHICK0,colorFFFFFF; {新结构波浪+三角形} A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3);{高点} A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3);{低点} E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2; E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍} H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; L1:=(D2 AND NOT(D1 AND E1=E2)); X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1)); G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{过滤后低点} L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1; X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H1,X2)>0,HHVBARS(IF(H1,HIGH,0),X2)); G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{过滤后高点} A3:=H; B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2)); D3:=A3 AND B3 AND HD; E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2); HH:=E3>REF(E3,1);{找出全部长期高点} A4:=L>REF(L,REF(BARSLAST(LD),1)+1); B4:=REF(L,REF(BARSLAST(LD),1)+1); D4:=A4 AND B4 AND LD; E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1);{找出全部长期低点} DRAWICON(HH,H,10),ALIGN1; DRAWTEXT(HH,H*1,'卖'),Color0000FF; DRAWICON(LL,L,12),ALIGN1; DRAWTEXT(LL,L*1,'买'),Color00FFFF; {箱体宝塔} xiang:=IF(CLOSE>150,91.3,0.913); 箱下沿:INTPART(CLOSE/xiang)*xiang,pointdot,linethick3,colorgreen; 箱上沿:箱下沿+xiang,pointdot,linethick3,coloryellow ; 箱中线:(箱下沿+箱上沿)/2,pointdot,colorwhite,linethick3; {三要素} A:=EMA(CLOSE,3); B:=EMA(CLOSE,5); Z:=EMA(CLOSE,15); 资本:=REF(HHV(A,B),Z); 运作:=A; 体系:=MA(运作,5); 【▲】Z:=MA(Z,7); 获利盘:=WINNER(CLOSE)*100; 套牢盘:=100-获利盘; WIN1:=COST(85); WIN2:=COST(15); 股票卖出价预测:=MA(套牢盘,89)*0.618/50+CLOSE; 股票买进价预测:=CLOSE-MA(套牢盘,60)*0.618/100; 转折价明日:=REF(CLOSE,2)*2-REF(CLOSE,5); 转折价后日:=REF(CLOSE,1)*2-REF(CLOSE,4); 转折价大后日:=CLOSE*2-REF(CLOSE,3); 高:=HHV(HIGH,0); 低:=LLV(LOW,0); DCFL:=COST(95); SCFL:=COST(55); JCFL:=COST(15); CH:=COST(5); DI:=COST(0.38); M:=58; X:=3; P:=SYSPARAM(1); WS:=BARPOS; WS1:=IF(WSWSP:=P-WS1+1; WSP1:=WS1-1; H91:=HHV(HIGH,WS1); L91:=LLV(LOW,WS1); HP:=H91[P]; LP:=L91[P]; HLPX:=(HP-LP)/X; IF WS1[P]>1 THEN BEGIN DRAWSL(WS=WSP[P],HP,0,WSP1[P],3),POINTDOT,LINETHICK1; DRAWSL(WS=WSP[P],LP,0,WSP1[P],3),POINTDOT,LINETHICK1; DRAWSL(WS=WSP[P],LP+HLPX,0,WSP1[P],3),POINTDOT,LINETHICK1; DRAWSL(WS=WSP[P],LP+HLPX*2,0,WSP1[P],3),POINTDOT,LINETHICK1,colorAAAAAA; DRAWNUMBER(WS=WSP[P],HP,HP,2),SHIFT38,colorFF; DRAWNUMBER(WS=WSP[P],LP,LP,2),SHIFT38,colorFF00; DRAWNUMBER(WS=WSP[P],LP+HLPX,LP+HLPX,2),SHIFT38,colorFFFF; DRAWNUMBER(WS=WSP[P],LP+HLPX*2,LP+HLPX*2,2),SHIFT38,colorFFFFFF; END; X91:=(CLOSE+LOW+HIGH)/3; 挑战巅峰:=MA(X91,5); JCZT:=IF(CROSS(体系,【▲】Z),1,0); SCZT:=IF(CROSS(【▲】Z,体系),2,0); A:=SYSPARAM(1)=BARPOS; 时间:=IF(A>0,DATE,体系); MM99:=BARSLAST(DATE=时间); HH99:=HHV(HIGH,MM99+1); LL99:=LLV(LOW,MM99+1); MID:=(HH99+LL99)/2; RENQ:=【▲】Z-(HH99-LL99)/6; 加权移平均:=WMA(CLOSE,5); JNYY:=DMA(加权移平均,VOL/CAPITAL); 历史最高:=高; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 历史最高'+NUMTOSTR(历史最高[SYSPARAM(1)],2)),ALIGN4,colorFF00FF; 历史最低:=低; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 历史最低'+NUMTOSTR(历史最低[SYSPARAM(1)],2)),ALIGN4,colorFFFFFF; 获利★:=获利盘; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,'获利★'+NUMTOSTR(获利★[SYSPARAM(1)],2)),ALIGN5,colorFF00; 套牢★:=套牢盘; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 套牢★'+NUMTOSTR(套牢★[SYSPARAM(1)],2)),ALIGN5,colorFFFFFF; 近卖预测★:=股票卖出价预测; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 近卖预测★'+NUMTOSTR(近卖预测★[SYSPARAM(1)],2)),ALIGN5,colorFF00; 近买预测★:=股票买进价预测; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 近买预测★'+NUMTOSTR(近买预测★[SYSPARAM(1)],2)),ALIGN5,colorFF00CC; 【90%成本】:=WIN1; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 【90%成本】'+NUMTOSTR(【90%成本】[SYSPARAM(1)],2)),ALIGN5,colorFF; 【70%成本】:=WIN2; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 【70%成本】'+NUMTOSTR(【70%成本】[SYSPARAM(1)],2)),ALIGN5,colorFFFFFF; 底出击★:=DI; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,'底出击★'+NUMTOSTR(底出击★[SYSPARAM(1)],2)),ALIGN4,colorFF00CC; 稳建仓:=CH; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 稳建仓'+NUMTOSTR(稳建仓[SYSPARAM(1)],2)),ALIGN4,colorCCCCFF; 快刀手:=JCFL; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 快刀手'+NUMTOSTR(快刀手[SYSPARAM(1)],2)),ALIGN4,colorFFFFFF; 预测★:=DCFL; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 预测★'+NUMTOSTR(预测★[SYSPARAM(1)],2)),ALIGN4,colorFFFF; 升浪:=SCFL; DRAWTEXT(BARPOS=SYSPARAM(2),HIGH,' 升浪'+NUMTOSTR(升浪[SYSPARAM(1)],2)),ALIGN4,color3300CC;
|