以下是指标指标公式大全源码和截图
趋势指标指标公式大全源码:
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:=(D1ANDNOT(D2ANDE1 =E2))ORBARSTATUS=2ORBARSCOUNT(CLOSE)=1;
L1:=(D2ANDNOT(D1ANDE1=E2);
X1:=REF(BARSLAST(H1),1)+1;F1:=BACKSET(H1ANDCOUNT(L1,X1) 0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1 REF(F1,1);I1:=BACKSET(G1,2);LD:=I1 REF(I1,1);{过滤后低点}
L2:=LDORBARSTATUS=2ORBARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;F2:=BACKSET(L2ANDCOUNT(H2,X2) 0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2 REF(F2,1);I2:=BACKSET(G2,2);HD:=I2 REF(I2,1);{过滤后高点}
J1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HD),BARSLAST(LD))+1);J2:=J1 REF(J1,1);
UU:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);
VV:=UU REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW REF(WW,1);
DRAWLINE(XX,L,VV,L,1),COLORMAGENTA,LINETHICK2;
UU2:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1);
VV2:=UU2 REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2 REF(WW2,1);
DRAWLINE(XX2,H,VV2,H,1),COLORMAGENTA,LINETHICK2;
前一低:REF(L,BARSLAST(VV)),COLOR99FF66,POINTDOT,LINETHICK3;
前二低:REF(L,BARSLAST(XX)),COLORFF66FF,POINTDOT,LINETHICK3;
前一高:REF(H,BARSLAST(VV2)),COLOR99FF66,POINTDOT,LINETHICK3;
前二高:REF(H,BARSLAST(XX2)),COLORFF66FF,POINTDOT,LINETHICK3;
短高:=REF(H,BARSLAST(VV2));
短低:=REF(L,BARSLAST(VV));
短比:(C-短低)/(短高-短低),LINETHICK0;
A1:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,3)+EMA((OPEN+HIGH+LOW+CLOSE)/4,6)+EMA((OPEN+HIGH+LOW+CLOSE)/4,9))/3;
A2:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,5)+EMA((OPEN+HIGH+LOW+CLOSE)/4,10)+EMA((OPEN+HIGH+LOW+CLOSE)/4,20))/3;
A3:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,7)+EMA((OPEN+HIGH+LOW+CLOSE)/4,14)+EMA((OPEN+HIGH+LOW+CLOSE)/4,28))/3;
A4:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,9)+EMA((OPEN+HIGH+LOW+CLOSE)/4,18)+EMA((OPEN+HIGH+LOW+CLOSE)/4,36))/3;
A5:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,11)+EMA((OPEN+HIGH+LOW+CLOSE)/4,22)+EMA((OPEN+HIGH+LOW+CLOSE)/4,44))/3;
A6:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,13)+EMA((OPEN+HIGH+LOW+CLOSE)/4,26)+EMA((OPEN+HIGH+LOW+CLOSE)/4,52))/3;
A7:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,21)+EMA((OPEN+HIGH+LOW+CLOSE)/4,34)+EMA((OPEN+HIGH+LOW+CLOSE)/4,68))/3;
VAR1:=FORCAST(A1,6);
VAR2:=FORCAST(A2,6);
VAR3:=FORCAST(A3,6);
VAR4:=FORCAST(A4,6);
VAR5:=FORCAST(A5,6);
VAR6:=FORCAST(A6,6);
VAR7:=FORCAST(A7,6);
IF(VAR1 REF(VAR1,1),VAR1,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR1 REF(VAR1,1),VAR1,DRAWNULL),POINTDOT,COLOR00FF00;
IF(VAR2 REF(VAR2,1),VAR2,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR2 REF(VAR2,1),VAR2,DRAWNULL),POINTDOT,COLOR00FF00;
IF(VAR3 REF(VAR3,1),VAR3,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR3 REF(VAR3,1),VAR3,DRAWNULL),POINTDOT,COLOR00FF00;
IF(VAR4 REF(VAR4,1),VAR4,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR4 REF(VAR4,1),VAR4,DRAWNULL),POINTDOT,COLOR00FF00;
IF(VAR5 REF(VAR5,1),VAR5,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR5 REF(VAR5,1),VAR5,DRAWNULL),POINTDOT,COLOR00FF00;
IF(VAR6 REF(VAR6,1),VAR6,DRAWNULL),POINTDOT,COLORFF00FF;
IF(VAR6 REF(VAR6,1),VAR6,DRAWNULL),POINTDOT,COLOR00FF00;
IF(VAR7 REF(VAR7,1),VAR7,DRAWNULL),LINETHICK2,COLORFF00FF;
IF(VAR7 REF(VAR7,1),VAR7,DRAWNULL),LINETHICK2,COLOR00FF00;
TOWERC:=FORCAST(EMA((3*CLOSE+2*OPEN+HIGH+LOW)/7,3),6);
DIRECTIONMAX:=MAX(REF(TOWERC,1),REF(TOWERC,1));
DIRECTIONMIN:=MIN(REF(TOWERC,1),REF(TOWERC,1));
STICKLINE(TOWERC =REF(TOWERC,1),TOWERC,DIRECTIONMAX,4,0),COLOR0000FF;
STICKLINE(TOWERC REF(TOWERC,1),TOWERC,DIRECTIONMIN,4,0),COLOR00FF00;
趋势指标指标公式大全截图