通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
P:=2;
N:=26;
涨幅:=(c-ref(c,1))/ref(c,1);
st判断:=STRCMP( st ,STKNAME);
:=if(st判断 1,涨幅 0.099,if(st判断=1,涨幅 0.049,0));
MID:MA(CLOSE,N);
UPPER:MID+P*STD(CLOSE,N),COLOR006600;
LOWER:MID-P*STD(CLOSE,N),COLOR660066;
DRAWLINE(1,C,1,O,00),COLOR00FFFF;
STICKLINE(1,L,H,1.8,0),COLOR333333;
STICKLINE(C REF(C,1),O,C,1.5,0),COLORRED;
STICKLINE(C REF(C,1)*1.095,O,C,5,0),COLOR0066FF;
STICKLINE(C REF(C,1)ANDO C,O,C,1.5,0),COLOR990099;
STICKLINE(C REF(C,1),O,C,1.5,0),COLORBLUE;
STICKLINE(C REF(C,1)*0.9,O,C,5,0),COLORFFFF33;
STICKLINE(C REF(C,1)ANDO C,O,C,1.5,0),COLOR00FF00;
A0:=C REF(C,1)ORC=REF(C,1);
AA0:=L LOWER;
AA1:=REF(AA0,1)ANDC LOWERANDA0;
AA2:=REF(AA0,1)ANDL LOWER;
AA3:=REF(O,1) LOWERANDC LOWER;
AA4:=REF(O,1) LOWERANDL LOWER;
DRAWICON(AA1ANDNOT(REF(AA1,1)),L*0.98,7),ALIGN1;
AA5:=AA1ANDNOT(REF(AA1,1))ANDMID REF(MID,1);
M1:=10;
M2:=60;
EXP1:EXPMA(CLOSE,M1),LINETHICK2;
EXP2:EXPMA(CLOSE,M2),LINETHICK3;
豆豆:=C;
A1:=REF(豆豆,10)=HHV(豆豆,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);HD:=FILTER(C1,10);
A2:=REF(豆豆,10)=LLV(豆豆,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);LD:=FILTER(C2,10);
A:=REF(C,BARSLAST(HD));B:=REF(L,BARSLAST(LD));
T1:=BARSLAST(HD) BARSLAST(LD)ANDNOT(HD);
T2:=BARSLAST(HD) BARSLAST(LD)ANDNOT(LD);
压力:IF(T1,A,A),COLORRED,POINTDOT,LINETHICK4;
支撑:IF(T2,B,B),COLORYELLOW,POINTDOT,LINETHICK4;
二分之一位:=IF(C OANDC REF(C,1),L+(H-L)/2,L+(H-L)/2);
STICKLINE(CURRBARSCOUNT,二分之一位,二分之一位,3,1),COLORYELLOW;
STICKLINE(CURRBARSCOUNT=2,二分之一位,二分之一位,3,1),COLORYELLOW;
当前二分之一位:L+(H-L)/2,NODRAW;
AAF:LLV(LOW,34),LINETHICK1,COLORFFFFCC;
BBF:MA(AAF,4),LINETHICK1,COLORYELLOW;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,5));
差值1:=ABS(REF(CCI1,1)-CCI1),LINETHICK0;
CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));
差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;
CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));
差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;
CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;
CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));
差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;
CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;
AAA:=(3*C+H+L+O)/6;
VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)
+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;
VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;
VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;
VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;
VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
:VAR1,COLORWHITE;
:VAR6,COLORYELLOW;
下跌:IF(VAR1=VAR6,VAR6,DRAWNULL),COLORGREEN;
TJ1:=CCI1 差值4;
立桩量:=FILTER(TJ1,0),NODRAW;
TJ2:=IF(BARSLAST(立桩量)=1,1,0);
STICKLINE(立桩量!=1,REF(HIGH,BARSLAST(立桩量)),
REF(HIGH,BARSLAST(立桩量)),1,1),COLORCYAN;
{STICKLINE(立桩量!=1,REF(LOW,BARSLAST(立桩量)),
REF(LOW,BARSLAST(立桩量)),1,1),COLORCYAN;}
成立1:=TJ2=1;
条件成立1:=FILTER(成立1,5);
DRAWTEXT(条件成立1,REF(HIGH,BARSLAST(立桩量)), 看跌 ),COLORLIBLUE;
TJ11:=CCI1 -差值4;
立桩量2:=FILTER(TJ11,0),NODRAW;
TJ22:=IF(BARSLAST(立桩量2)=1ANDCLOSE REF(HIGH,1),1,0);
2:=TJ22=1;
{STICKLINE(CLOSEAND下跌!=VAR6,REF(HIGH,BARSLAST(立桩量2)),
REF(HIGH,BARSLAST(立桩量2)),1,1),COLORYELLOW;}
STICKLINE(CLOSEAND下跌!=VAR6,REF(LOW,BARSLAST(立桩量2)),
REF(LOW,BARSLAST(立桩量2)),1,1),COLORYELLOW;
TJ:=IF(BARSLAST(立桩量2)=1ANDCLOSE REF(LOW,1),1,0);
成立2:=TJ=1;
条件成立2:=FILTER(成立2,5);
DRAWTEXT(条件成立2,REF(LOW,BARSLAST(立桩量2)), 看涨 ),COLORLIMAGENTA;
TJ111:=ABS(CCI1) CCIANDABS(差值1) ABS(差值5);
立桩量3:=FILTER(TJ111,3);
TJ3:=IF(BARSLAST(立桩量3)=1ANDCLOSE REF(LOW,1),1,IF(BARSLAST(立桩量3)=2ANDCLOSE REF(LOW,2),1,IF(BARSLAST(立桩量3)=3ANDCLOSE REF(LOW,3),1,0)));
成立:=TJ3=1;
条件成立:=FILTER(成立,5);
DRAWTEXT(条件成立AND下跌!=VAR6,L*0.97, ☆成立
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE-LC),0),3,1)/SMA(ABS((CLOSE-LC)),3,1))*100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
DRAWTEXT(CROSS(FF,MA15),BBF, 底 ),COLORA6E500;
DRAWTEXT(CROSS(88,RSI),(HIGH*1.02), 顶背离 ),COLOR1880FF;
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
DRAWTEXT(FILTER(BB13 1ANDEMA(X1,13) REF(EMA(X1,8),1),10),
EMA8, ∠45 ),COLORWHITE;
STICKLINE(1,C,O,2.8,0),COLOR666600;
STICKLINE(立桩量,C,O,2.8,0),COLOR0000FF;
STICKLINE(1,C,O,0,0),COLORCCCCCC;
AA:=IF((CLOSE 100),CLOSE,(CLOSE/100));
A:=INTPART(((4*(LOG(AA)/LOG(2)))+1));
B:=((A-1)/4);
支撑:IF((CLOSE 100),(POW(2,B)*100),POW(2,B)),CIRCLEDOT,LINETHICK1,COLORBROWN;
压力:IF((CLOSE 100),(POW(2,(B+(1/4)))*100),POW(2,(B+(1/4)))),CIRCLEDOT,LINETHICK1,COLORFF5500;
DRAWICON(REF(压力,1)=支撑,L*0.95,1);
{DRAWICON(支撑 HHV(H,15),H*1.05,2);};
DRAWTEXT(ISLASTBAR,支撑, ----支撑 ),COLOR00AAFF;
DRAWTEXT(ISLASTBAR,压力, ----压力 ),COLORFF5500;
公式解读:
[源码注释]通达信公式动态公式解读AMV0赋值:成交量(手)*(开盘价+收盘价+最高价+最低价)/4
输出势:AMV0的21日指数移动平均/成交量(手)的21日指数移动平均
输出压:6*2日内势的最高值-5*势
输出托:2*势-压
公式:
AMV0赋值:成交量(手)*(开盘价+收盘价+最高价+最低价)/4
势赋值:AMV0的21日指数移动平均/成交量(手)的21日指数移动平均
压赋值:6*2日内势的最高值-5*势
托赋值:2*势-压
输出XG:1日前的压 托 AND 托=压
SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100 100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);
AA10:MA(CLOSE,8),COLOR0000FF;AA12:MA(CLOSE,12),COLOR0000FF;BB10:=((ATAN((AA10-REF(AA10,1)))*3.1416)*10);
BB12:=((ATAN((AA12-REF(AA12,1)))*3.1416)*10);MA13:=MA(CLOSE,13);
STICKLINE((((AA12 =AA10)AND(BB12 =1))AND(BB10 =1)),AA10,AA12,4,0),COLOR0080FF;
STICKLINE((((AA12 =AA10)AND(BB10 =1))AND(BB10 =1)),AA10,AA12,4,0),COLOR00FF00;
X1:=(C+L+H)/3;BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13 1ANDEMA(X1,13) REF(EMA(X1,8),1),10),
EMA8, ∠45上升 ),COLORWHITE;压力:MA(REF(HHV(C,30),1),2),COLOR9DFFFF;
支撑:MA(REF(LLV(C,30),1),2),COLORABFF46;AA1:=AMOUNT/V;BB1:=L AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100 1.2;
DD1:=L MA(C,5)*0.921;EE1:=V MA(V,5)*1.5;
FF1:=BB1ANDCC1ANDDD1ANDEE1;DRAWTEXT(FF1,(LOW*0.99), 老鼠仓 ),COLOR4080FF;
A51:=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(A51,5);A54:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
趋势线:=(MA(3*SMA(A54,6,1)-2*SMA(SMA(A54,5,1),5,1),2));
DRAWTEXT(CROSS(趋势线,0)AND黑马线 40,(HIGH*0.97), ▲大黑马 ),COLORYELLOW;
LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE-LC),0),3,1)/SMA(ABS((CLOSE-LC)),3,1))*100);
FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(FF,MA15),(LOW*0.99), 底背离 ),COLORA6E500;
DRAWTEXT(CROSS(88,RSI),(HIGH*1.02), 顶背离 ),COLOR1880FF;
VAR2:=LLV(LOW,27);VAR3:=HHV(HIGH,34);VAR4:=EMA((CLOSE-VAR2)/(VAR3-VAR2)*4,4)*25;
注意买:=IF((VAR4 10),80,100);RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;超跌:=IF(J 0,10,0);BDDD:=LLV(J,2)=LLV(J,8);
买入:=IF(CROSS(J,REF(J+0.01,1))ANDBDDDANDJ 20,30,0);
DRAWTEXT(买入AND注意买=100AND超跌=0,LOW, 短线 ),COLOR8000FF;
MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买:=IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX 0,2)ANDCROSS(DX,MA(DX,2)),1,0);
DA1:=IF(130 TOTALBARSCOUNT,TOTALBARSCOUNT,130);
DA:=IF(CURRBARSCOUNT DA1,0,DA1);
HI:=REFDATE(HHV(H,DA),DATE);
LO:=REFDATE(LLV(L,DA),DATE);
C1:=IF(CURRBARSCOUNT =DA,C,DRAWNULL);
GZ:=EXP(LN(HI/LO)/10);
LH1:=SUM(IF(C1 =(HI/GZ),V,0),DA);
LH2:=SUM(IF(C1 =(HI/POW(GZ,2))ANDC1 (HI/GZ),V,0),DA);
LH3:=SUM(IF(C1 =(HI/POW(GZ,3))ANDC1 (HI/POW(GZ,2)),V,0),DA);
LH4:=SUM(IF(C1 =(HI/POW(GZ,4))ANDC1 (HI/POW(GZ,3)),V,0),DA);
LH5:=SUM(IF(C1 =(HI/POW(GZ,5))ANDC1 (HI/POW(GZ,4)),V,0),DA);
LH6:=SUM(IF(C1 =(HI/POW(GZ,6))ANDC1 (HI/POW(GZ,5)),V,0),DA);
LH7:=SUM(IF(C1 =(HI/POW(GZ,7))ANDC1 (HI/POW(GZ,6)),V,0),DA);
LH8:=SUM(IF(C1 =(HI/POW(GZ,8))ANDC1 (HI/POW(GZ,7)),V,0),DA);
LH9:=SUM(IF(C1 =(LO*GZ)ANDC1 LO*POW(GZ,2),V,0),DA);
LH10:=SUM(IF(C1 =LOANDC1 LO*GZ,V,0),DA);
L1:=REFDATE(HHV(LH1,DA),DATE),LINETHICK0;
L2:=REFDATE(HHV(LH2,DA),DATE),LINETHICK0;
L3:=REFDATE(HHV(LH3,DA),DATE),LINETHICK0;
L4:=REFDATE(HHV(LH4,DA),DATE);
L5:=REFDATE(HHV(LH5,DA),DATE);
L6:=REFDATE(HHV(LH6,DA),DATE);
L7:=REFDATE(HHV(LH7,DA),DATE);
L8:=REFDATE(HHV(LH8,DA),DATE);
L9:=REFDATE(HHV(LH9,DA),DATE);
L10:=REFDATE(HHV(LH10,DA),DATE);
SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10);
STICKLINE(CEILING(DA*L1/SS)*3 =CURRBARSCOUNT,HI*99/100,HI/GZ,9,0)COLOR3C3C3A;
STICKLINE(CEILING(DA*L2/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,1)*99/100,HI/POW(GZ,2),9,0)COLOR3C3C3A;
STICKLINE(CEILING(DA*L3/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,2)*99/100,HI/POW(GZ,3),9,0)COLOR3C3C3A;
STICKLINE(CEILING(DA*L4/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,3)*99/100,HI/POW(GZ,4),9,0)COLOR3C3C3A;
STICKLINE(CEILING(DA*L5/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,4)*99/100,HI/POW(GZ,5),9,0)COLOR3C3C3A;
STICKLINE(CEILING(DA*L6/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,5)*99/100,HI/POW(GZ,6),9,0)COLOR3C3C3A;
STICKLINE(CEILING(DA*L7/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,6)*99/100,HI/POW(GZ,7),9,0)COLOR3C3C3A;
STICKLINE(CEILING(DA*L8/SS)*3 =CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,3)*99/100,9,0)COLOR3C3C3A;
STICKLINE(CEILING(DA*L9/SS)*3 =CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,2)*99/100,9,0)COLOR3C3C3A;
STICKLINE(CEILING(DA*L10/SS)*3 =CURRBARSCOUNT,LO,LO*POW(GZ,1)*99/100,9,0)COLOR3C3C3A;
ZDZ1501:=MAX(L1,MAX(L2,MAX(L3,MAX(L4,MAX(L5,MAX(L6,MAX(L7,MAX(L8,MAX(L9,L10)))))))));
STICKLINE(CEILING(DA*IF(ZDZ1501=L1,L1,IF(ZDZ1501=L2,L2,
IF(ZDZ1501=L3,L3,IF(ZDZ1501=L4,L4,IF(ZDZ1501=L5,L5,IF(ZDZ1501=L6,L6,IF(ZDZ1501=L7,L7,IF(ZDZ1501=L8,L8,
IF(ZDZ1501=L9,L9,IF(ZDZ1501=L10,L10,DRAWNULL))))))))))/SS)*3 =CURRBARSCOUNT,
IF(ZDZ1501=L1,HI*99/100,IF(ZDZ1501=L2,HI/POW(GZ,1)*99/100,
IF(ZDZ1501=L3,HI/POW(GZ,2)*99/100,IF(ZDZ1501=L4,HI/POW(GZ,3)*99/100,
IF(ZDZ1501=L5,HI/POW(GZ,4)*99/100,IF(ZDZ1501=L6,HI/POW(GZ,5)*99/100,IF(ZDZ1501=L7,HI/POW(GZ,6)*99/100,IF(ZDZ1501=L8,LO*POW(GZ,2),
IF(ZDZ1501=L9,LO*POW(GZ,1),IF(ZDZ1501=L10,L10,DRAWNULL)))))))))),
IF(ZDZ1501=L1,HI/GZ,IF(ZDZ1501=L2,HI/POW(GZ,2)*99/100,
IF(ZDZ1501=L3,HI/POW(GZ,3)*99/100,IF(ZDZ1501=L4,HI/POW(GZ,4)*99/100,
IF(ZDZ1501=L5,HI/POW(GZ,5)*99/100,IF(ZDZ1501=L6,HI/POW(GZ,6)*99/100,IF(ZDZ1501=L7,HI/POW(GZ,7)*99/100,IF(ZDZ1501=L8,LO*POW(GZ,3)*99/100,
IF(ZDZ1501=L9,LO*POW(GZ,2)*99/100,IF(ZDZ1501=L10,LO*POW(GZ,1)*99/100,DRAWNULL)))))))))),
9,0)COLOR666666;
DRAWKLINE(H,O,L,C);
HB:=COST(99.99);
LB:=COST(0.01);
B3:=(HB-LB)/50;
B31:=HB-B3;
B32:=HB-2*B3;
B33:=HB-3*B3;
B34:=HB-4*B3;
B35:=HB-5*B3;
B36:=HB-6*B3;
B37:=HB-7*B3;
B38:=HB-8*B3;
B39:=HB-9*B3;
B310:=HB-10*B3;
B311:=HB-11*B3;
B312:=HB-12*B3;
B313:=HB-13*B3;
B314:=HB-14*B3;
B315:=HB-15*B3;
B316:=HB-16*B3;
B317:=HB-17*B3;
B318:=HB-18*B3;
B319:=HB-19*B3;
B320:=HB-20*B3;
B321:=HB-21*B3;
B322:=HB-22*B3;
B323:=HB-23*B3;
B324:=HB-24*B3;
B325:=HB-25*B3;
B326:=HB-26*B3;
B327:=HB-27*B3;
B328:=HB-28*B3;
B329:=HB-29*B3;
B330:=HB-30*B3;
B331:=HB-31*B3;
B332:=HB-32*B3;
B333:=HB-33*B3;
B334:=HB-34*B3;
B335:=HB-35*B3;
B336:=HB-36*B3;
B337:=HB-37*B3;
B338:=HB-38*B3;
B339:=HB-39*B3;
B340:=HB-40*B3;
B341:=HB-41*B3;
B342:=HB-42*B3;
B343:=HB-43*B3;
B344:=HB-44*B3;
B345:=HB-45*B3;
B346:=HB-46*B3;
B347:=HB-47*B3;
B348:=HB-48*B3;
B349:=HB-49*B3;
B350:=HB-50*B3;
AMY1:=WINNER(HB)*100-WINNER(B31)*100;
AMY2:=WINNER(B31)*100-WINNER(B32)*100;
AMY3:=WINNER(B32)*100-WINNER(B33)*100;
AMY4:=WINNER(B33)*100-WINNER(B34)*100;
AMY5:=WINNER(B34)*100-WINNER(B35)*100;
AMY6:=WINNER(B35)*100-WINNER(B36)*100;
AMY7:=WINNER(B36)*100-WINNER(B37)*100;
AMY8:=WINNER(B37)*100-WINNER(B38)*100;
AMY9:=WINNER(B38)*100-WINNER(B39)*100;
AMY10:=WINNER(B39)*100-WINNER(B310)*100;
AMY11:=WINNER(B310)*100-WINNER(B311)*100;
AMY12:=WINNER(B311)*100-WINNER(B312)*100;
AMY13:=WINNER(B312)*100-WINNER(B313)*100;
AMY14:=WINNER(B313)*100-WINNER(B314)*100;
AMY15:=WINNER(B314)*100-WINNER(B315)*100;
AMY16:=WINNER(B315)*100-WINNER(B316)*100;
AMY17:=WINNER(B316)*100-WINNER(B317)*100;
AMY18:=WINNER(B317)*100-WINNER(B318)*100;
AMY19:=WINNER(B318)*100-WINNER(B319)*100;
AMY20:=WINNER(B319)*100-WINNER(B320)*100;
AMY21:=WINNER(B320)*100-WINNER(B321)*100;
AMY22:=WINNER(B321)*100-WINNER(B322)*100;
AMY23:=WINNER(B322)*100-WINNER(B323)*100;
AMY24:=WINNER(B323)*100-WINNER(B324)*100;
AMY25:=WINNER(B324)*100-WINNER(B325)*100;
AMY26:=WINNER(B325)*100-WINNER(B326)*100;
AMY27:=WINNER(B326)*100-WINNER(B327)*100;
AMY28:=WINNER(B327)*100-WINNER(B328)*100;
AMY29:=WINNER(B328)*100-WINNER(B329)*100;
AMY30:=WINNER(B329)*100-WINNER(B330)*100;
AMY31:=WINNER(B330)*100-WINNER(B331)*100;
AMY32:=WINNER(B331)*100-WINNER(B332)*100;
AMY33:=WINNER(B332)*100-WINNER(B333)*100;
AMY34:=WINNER(B333)*100-WINNER(B334)*100;
AMY35:=WINNER(B334)*100-WINNER(B335)*100;
AMY36:=WINNER(B335)*100-WINNER(B336)*100;
AMY37:=WINNER(B336)*100-WINNER(B337)*100;
AMY38:=WINNER(B337)*100-WINNER(B338)*100;
AMY39:=WINNER(B338)*100-WINNER(B339)*100;
AMY40:=WINNER(B339)*100-WINNER(B340)*100;
AMY41:=WINNER(B340)*100-WINNER(B341)*100;
AMY42:=WINNER(B341)*100-WINNER(B342)*100;
AMY43:=WINNER(B342)*100-WINNER(B343)*100;
AMY44:=WINNER(B343)*100-WINNER(B344)*100;
AMY45:=WINNER(B344)*100-WINNER(B345)*100;
AMY46:=WINNER(B345)*100-WINNER(B346)*100;
AMY47:=WINNER(B346)*100-WINNER(B347)*100;
AMY48:=WINNER(B347)*100-WINNER(B348)*100;
AMY49:=WINNER(B348)*100-WINNER(B349)*100;
AMY50:=WINNER(B349)*100-WINNER(LB)*100;
DJG:=MAX(AMY1,MAX(AMY2,MAX(AMY3,MAX(AMY4,MAX(AMY5,MAX(AMY6,MAX(AMY7,MAX(AMY8,MAX(AMY9,MAX(AMY10,
MAX(AMY11,MAX(AMY12,MAX(AMY13,MAX(AMY14,MAX(AMY15,AMY16)))))))))))))));
XJG:=MAX(AMY17,MAX(AMY18,MAX(AMY19,MAX(AMY20,
MAX(AMY21,MAX(AMY22,MAX(AMY23,MAX(AMY24,MAX(AMY25,MAX(AMY26,MAX(AMY27,MAX(AMY28,MAX(AMY29,MAX(AMY30,
MAX(AMY31,MAX(AMY32,MAX(AMY33,MAX(AMY34,AMY35))))))))))))))))));
SH:=MAX(AMY36,MAX(AMY37,MAX(AMY38,MAX(AMY39,MAX(AMY40,
MAX(AMY41,MAX(AMY42,MAX(AMY43,MAX(AMY44,MAX(AMY45,MAX(AMY46,MAX(AMY47,MAX(AMY48,MAX(AMY49,AMY50))))))))))))));
STICKLINE((AMY1=DJGORAMY2=DJGORAMY3=DJGORAMY4=DJGORAMY5=DJGORAMY6=DJGORAMY7=DJGORAMY8=DJGORAMY9=DJG
ORAMY10=DJGORAMY11=DJGORAMY12=DJGORAMY13=DJGORAMY14=DJGORAMY15=DJGORAMY16=DJG)ANDISLASTBAR,
IF(AMY1=DJG,B31,IF(AMY2=DJG,B32,IF(AMY3=DJG,B33,IF(AMY4=DJG,B34,IF(AMY5=DJG,B35,IF(AMY6=DJG,B36,IF(AMY7=DJG,B37,IF(AMY8=DJG,B38,IF(AMY9=DJG
,B39,IF(AMY10=DJG,B310,IF(AMY11=DJG,B311,IF(AMY12=DJG,B312,IF(AMY13=DJG,B313,IF(AMY14=DJG,B314,IF(AMY15=DJG,B315,IF(AMY16=DJG,B316,DRAWNULL)
))))))))))))))),
IF(AMY1=DJG,B31,IF(AMY2=DJG,B32,IF(AMY3=DJG,B33,IF(AMY4=DJG,B34,IF(AMY5=DJG,B35,IF(AMY6=DJG,B36,IF(AMY7=DJG,B37,IF(AMY8=DJG,B38,IF(AMY9=DJG
,B39,IF(AMY10=DJG,B310,IF(AMY11=DJG,B311,IF(AMY12=DJG,B312,IF(AMY13=DJG,B313,IF(AMY14=DJG,B314,IF(AMY15=DJG,B315,IF(AMY16=DJG,B316,DRAWNULL)
))))))))))))))),
DJG*100,-1),COLORYELLOW;
STICKLINE((AMY17=XJGORAMY18=XJGORAMY19=XJGORAMY20=XJGORAMY21=XJGORAMY22=XJGORAMY23=XJGORAMY24=XJGORAMY25=XJG
ORAMY35=XJGORAMY34=XJGORAMY33=XJGORAMY32=XJGORAMY31=XJGORAMY30=XJGORAMY29=XJGORAMY28=XJGORAMY27=XJGORAMY26=XJG
)ANDISLASTBAR,
IF(AMY17=XJG,B317,IF(AMY18=XJG,B318,IF(AMY19=XJG,B319,IF(AMY20=XJG,B320,IF(AMY21=XJG,B321,IF(AMY22=XJG,B322,IF(AMY23=XJG,B323,IF(AMY24=XJG,B324,IF(AMY25=XJG
,B325,IF(AMY26=XJG,B326,IF(AMY27=XJG,B327,IF(AMY28=XJG,B328,IF(AMY29=XJG,B329,IF(AMY30=XJG,B330,IF(AMY31=XJG,B331,IF(AMY32=XJG,B332,
IF(AMY33=XJG,B333,IF(AMY34=XJG,B334,IF(AMY35=XJG,B335,
DRAWNULL))))))))))))))))))),
IF(AMY17=XJG,B317,IF(AMY18=XJG,B318,IF(AMY19=XJG,B319,IF(AMY20=XJG,B320,IF(AMY21=XJG,B321,IF(AMY22=XJG,B322,IF(AMY23=XJG,B323,IF(AMY24=XJG,B324,IF(AMY25=XJG
,B325,IF(AMY26=XJG,B326,IF(AMY27=XJG,B327,IF(AMY28=XJG,B328,IF(AMY29=XJG,B329,IF(AMY30=XJG,B330,IF(AMY31=XJG,B331,IF(AMY32=XJG,B332,
IF(AMY33=XJG,B333,IF(AMY34=XJG,B334,IF(AMY35=XJG,B335,
DRAWNULL))))))))))))))))))),
XJG*100,-1),COLORYELLOW;
STICKLINE((AMY36=SHORAMY37=SHORAMY38=SHORAMY39=SHORAMY40=SHORAMY41=SHORAMY42=SHORAMY43=SHORAMY44=SHORAMY45=SH
ORAMY46=SHORAMY47=SHORAMY48=SHORAMY49=SHORAMY50=SH)ANDISLASTBAR,
IF(AMY36=SH,B336,IF(AMY37=SH,B337,IF(AMY38=SH,B338,IF(AMY39=SH,B339,IF(AMY40=SH,B340,IF(AMY41=SH,B341,IF(AMY42=SH,B342,IF(AMY43=SH,B343,IF(AMY44=SH
,B344,IF(AMY45=SH,B345,IF(AMY46=SH,B346,IF(AMY47=SH,B347,IF(AMY48=SH,B348,IF(AMY49=SH,B349,IF(AMY50=SH,B350,
DRAWNULL))))))))))))))),
IF(AMY36=SH,B336,IF(AMY37=SH,B337,IF(AMY38=SH,B338,IF(AMY39=SH,B339,IF(AMY40=SH,B340,IF(AMY41=SH,B341,IF(AMY42=SH,B342,IF(AMY43=SH,B343,IF(AMY44=SH
,B344,IF(AMY45=SH,B345,IF(AMY46=SH,B346,IF(AMY47=SH,B347,IF(AMY48=SH,B348,IF(AMY49=SH,B349,IF(AMY50=SH,B350,
DRAWNULL))))))))))))))),
SH*100,-1),COLORYELLOW;
DRAWNUMBER(ISLASTBAR,
IF(AMY1=DJG,B31,IF(AMY2=DJG,B32,IF(AMY3=DJG,B33,IF(AMY4=DJG,B34,IF(AMY5=DJG,B35,IF(AMY6=DJG,B36,IF(AMY7=DJG,B37,IF(AMY8=DJG,B38,IF(AMY9=DJG
,B39,IF(AMY10=DJG,B310,IF(AMY11=DJG,B311,IF(AMY12=DJG,B312,IF(AMY13=DJG,B313,IF(AMY14=DJG,B314,IF(AMY15=DJG,B315,IF(AMY16=DJG,B316,DRAWNULL)
))))))))))))))),
DJG*1);
DRAWNUMBER(ISLASTBAR,
IF(AMY17=XJG,B317,IF(AMY18=XJG,B318,IF(AMY19=XJG,B319,IF(AMY20=XJG,B320,IF(AMY21=XJG,B321,IF(AMY22=XJG,B322,IF(AMY23=XJG,B323,IF(AMY24=XJG,B324,IF(AMY25=XJG
,B325,IF(AMY26=XJG,B326,IF(AMY27=XJG,B327,IF(AMY28=XJG,B328,IF(AMY29=XJG,B329,IF(AMY30=XJG,B330,IF(AMY31=XJG,B331,IF(AMY32=XJG,B332,
IF(AMY33=XJG,B333,IF(AMY34=XJG,B334,IF(AMY35=XJG,B335,
DRAWNULL))))))))))))))))))),
XJG*1);
DRAWNUMBER(ISLASTBAR,
IF(AMY36=SH,B336,IF(AMY37=SH,B337,IF(AMY38=SH,B338,IF(AMY39=SH,B339,IF(AMY40=SH,B340,IF(AMY41=SH,B341,IF(AMY42=SH,B342,IF(AMY43=SH,B343,IF(AMY44=SH
,B344,IF(AMY45=SH,B345,IF(AMY46=SH,B346,IF(AMY47=SH,B347,IF(AMY48=SH,B348,IF(AMY49=SH,B349,IF(AMY50=SH,B350,
DRAWNULL))))))))))))))),
SH*1);
input:N(5,1,100);
{DRAWGBKLAST(CLOSE 0,STRIP(RGB(95,95,95),RGB(0,0,0),0));}
主筹估算:=EMA(WINNER(c)*70,3);
散筹估算:=EMA((WINNER((c)*1.1)-WINNER((c)*0.9))*70,3);
筹码锁定:=散筹估算-主筹估算;
动态底部:=EMA(IF(L =LLV(l,60),SMA(ABS(L-REF(L,1)),60,1)/SMA(MAX(L-REF(l,1),0),99,1),0)*5,3);
涨:=CROSS(主筹估算,筹码锁定);
强:=CROSS(主筹估算,散筹估算);
STICKLINE(涨,O,C,8,0),COLORYELLOW;
STICKLINE(涨,O,H,0,0),COLORYELLOW;
STICKLINE(涨,L,C,0,0),COLORYELLOW;
STICKLINE(强,O,C,8,0),colormagenta;
STICKLINE(强,O,H,0,0),colormagenta;
STICKLINE(强,L,C,0,0),colormagenta;
A1:=ref(h,N)=hhv(h,2*N+1);
B1:=filter(A1,N);
C1:=backset(B1,N+1);
D1:=filter(C1,n);{高点}
A2:=ref(l,N)=llv(l,2*N+1);
B2:=filter(A2,N);
C2:=backset(B2,N+1);
D2:=filter(C2,N);{低点}
E1:=(ref(llv(l,2*N),1)+ref(hhv(h,2*N),1))/2;E2:=(h+l)/2;{高低点出现在同一K线上时可作取舍}
H1:=(D1ANDnot(D2ANDE1 =E2))ORbarstatus=2ORbarscount(c)=1;
L1:=(D2ANDnot(D1ANDE1 E2));H2:=D1ANDnot(D2ANDE1 =E2);
X1:=ref(barslast(H1),1)+1;F1:=backset(H1ANDcount(L1,X1) 0,llvbars
(if(L1,l,10000),X1));
G1:=F1 ref(F1,1);I1:=backset(G1,2);LD:=I1 ref(I1,1);{过滤后低点}
L2:=LDORbarstatus=2ORbarscount(c)=1;
X2:=ref(barslast(L2),1)+1;F2:=backset(L2ANDcount(H2,X2) 0,hhvbars
(if(H2,h,0),X2));
G2:=F2 ref(F2,1);I2:=backset(G2,2);HD:=I2 ref(I2,1);{过滤后高点}
R1:=backset(barstatus=2,barslast(HD)+1);S1:=R1 ref(R1,1);{前一高}
T1:=backset(barstatus=2,barslast(LD)+1);U1:=T1 ref(T1,1);{前一低}
R2:=backset(S1,ref(barslast(HD),1)+2);S2:=R2 ref(R2,1);{前二高}
T2:=backset(U1,ref(barslast(LD),1)+2);U2:=T2 ref(T2,1);{前二低}
T3:=backset(U2,ref(barslast(LD),1)+2);U3:=T3 ref(T3,1);{前三低}
T4:=backset(U3,ref(barslast(LD),1)+2);U4:=T4 ref(T4,1);{前四低}
R3:=backset(S2,ref(barslast(HD),1)+2);S3:=R3 ref(R3,1);{前三高}
R4:=backset(S3,ref(barslast(HD),1)+2);S4:=R4 ref(R4,1);{前四高}
短期压力:drawline(S2,h,S1,h,1),Colorred;
短期支撑:drawline(U2,l,U1,l,1),Colorgreen;
中期压力:drawline(S3,h,S2,h,1),Coloryellow;
中期支撑:drawline(U3,l,U2,l,0),Colorgreen;
长期压力:drawline(S4,h,S3,h,1),COLORwhite;
长期支撑:drawline(U4,l,U3,l,0),Colorgreen;
DRAWICON(S1,H*1.01,2);
DRAWICON(S2,H*1.01,2);
DRAWICON(S3,H*1.01,2);
DRAWICON(S4,H*1.01,2);
DRAWICON(U1,L*0.99,1);
DRAWICON(U2,L*0.99,1);
DRAWICON(U3,L*0.99,1);
DRAWICON(U4,L*0.99,1);
止损价:=REF(c,1)*0.95;
DRAWTEXT(c 0andBARSTATUS=2,h*1.03, 止损价: +NUMTOSTRN(止损价,2)),ALIGN0,colorffffff;
HV:=HHV(V,30)=VORV/REF(V,1) =5;
FT:=BARSLAST(HV);
量能平台:if(HV,C,ref(C,FT)),COLORwhite,LINETHICK2;
drawtext(量能平台 ref(量能平台,1)andc ref(c,1)andnot(c ma(c,13)andc=hhv(c,20)andc/ref(c,1) 1.05),c, --------- +c),coloryellow;
drawtext(量能平台 ref(量能平台,1)andc ref(c,1),c, ---------带量阴 +c),colorgreen;
{drawtext(量能平台 =ref(量能平台,1)andc ref(c,1),c, ---------- +c),colorgreen;}
drawtext(量能平台 ref(量能平台,1)andc ref(c,1),c, ---------缩量涨 +c),colorwhite;
drawtext(量能平台 ref(量能平台,1)andc ref(c,1)andc ma(c,13)andc=hhv(c,20)andc/ref(c,1) 1.05,c, ---------带量突破 +c),colorred;
ma(c,17);
股票公式编写要求:
MACD月线站上0轴的选股公式。
股票公式编写结果:
XG:CROSS(MACD.DIF#MONTH,0);