个股指标公式集锦
{优秀买卖主}
{无未来函数,可放心使用}
多头线:EMA(C,3),COLORYELLOW;
空头线:EMA(C,5),COLOR00FF00;
均衡线:EMA(空头线,5),COLORWHITE,;
IF(多头线>=REF(多头线,1) AND 多头线>=空头线,多头线,DRAWNULL),COLORRED,LINETHICK3;
VAR1:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);
STICKLINE(VAR1>90,L,L*0.92,0.1,0),COLORFF00FF;
DRAWTEXT(VAR1>90,LOW*0.92,'买'),COLORFF00FF;
VAR2:=REF(EMA(DMA((((HIGH + LOW) + (CLOSE * 2)) / 4.09),0.9),3),1);
DRAWTEXT(CROSS(CLOSE,VAR2),LOW,'S'),COLORYELLOW;
STICKLINE(CROSS(VAR2,CLOSE),H*1.05,H,0.1,0),COLORWHITE;
DRAWTEXT(CROSS(VAR2,CLOSE),HIGH*1.05,'卖'),COLORWHITE;
VAR3:=REF(CLOSE,1);
VAR4:=SMA(MAX(CLOSE-VAR3,0),6,1)/SMA(ABS(CLOSE-VAR3),6,1)*100;
DRAWTEXT(CROSS(84,VAR4),H*1.03,'逃顶'),COLORYELLOW ;
VAR5:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR6:=SMA(ABS(LOW-VAR5),13,1)/SMA(MAX(LOW-VAR5,0),10,1);
VAR7:=EMA(VAR6,10);
VAR8:=LLV(LOW,33);
VAR9:=EMA(IF(LOW<=VAR8,VAR7,0),5);
主力进场:=FILTER(VAR9>REF(VAR9,1),5);
DRAWTEXT(FILTER(VAR9>REF(VAR9,1),5),LOW*0.995,'☆↑'),COLOR0000FF;
DRAWTEXT(FILTER(VAR9>REF(VAR9,1),5),LOW*0.96,'主力进场'),COLOR0000FF;
STICKLINE(FILTER(VAR9>REF(VAR9,1),5),CLOSE,OPEN,1,0),COLOR0000FF;
STICKLINE(FILTER(VAR9>REF(VAR9,1),5),LOW,HIGH,1,0),COLOR0000FF;
DRAWTEXT(FILTER(VAR5>REF(VAR5,1),5),LOW*1.08,'主力出场'),COLOR70DB93;
STICKLINE(FILTER(VAR5>REF(VAR5,1),5),LOW,HIGH,1,0),COLOR70DB93;
{----------------------------------------------------------}
{BIAS18}
N1:=6;
N2:=18;
N3:=36;
BIAS1 :(CLOSE-MA(CLOSE,N1))/MA(CLOSE,N1)*100;
BIAS2 :(CLOSE-MA(CLOSE,N2))/MA(CLOSE,N2)*100,COLORRED,LINETHICK2;
BIAS3 :(CLOSE-MA(CLOSE,N3))/MA(CLOSE,N3)*100,COLORBLUE;
{----------------------------------------------------------}
{买卖准 推荐}
N1:=6;
N2:=18;
N3:=36;
BIAS6 :(CLOSE-MA(CLOSE,N1))/MA(CLOSE,N1)*600+300;
BIAS18:(CLOSE-MA(CLOSE,N2))/MA(CLOSE,N2)*600+300,COLORMAGENTA,LINETHICK1;
BIAS36 :(CLOSE-MA(CLOSE,N3))/MA(CLOSE,N3)*600+300,COLORBLUE;
{上面增加BIAS}
VAR1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),25);
VAR2:=HIGH-REF(HIGH,1);
VAR3:=REF(LOW,1)-LOW;
VAR4:=SUM(IF(VAR2>0 AND VAR2>VAR3,VAR2,0),25);
VAR5:=SUM(IF(VAR3>0 AND VAR3>VAR2,VAR3,0),25);
VAR6:=VAR4*100/VAR1;
VAR7:=VAR5*100/VAR1;
VAR8:=MA(ABS(VAR7-VAR6)/(VAR7+VAR6)*100,15);
VAR9:=(VAR8+REF(VAR8,15))/2;
A:=(VAR7>VAR6 AND VAR7>25 AND VAR6<25);
B:ZIG(3,50/5)*100,COLORRED;
G:MA(B,2),COLORYELLOW;
D:=CROSS(B,G)*1000,COLORRED;
W:=CROSS(G,B)*1000,COLORBLUE;
操盘:IF(B>G,(B-G)*18,0),LINESTICK,COLORRED;
观望:IF(B<G,(G-B)*18,0),LINESTICK,COLORGREEN;
E:=REF(INDEXC,1);
F:=SMA(MAX(INDEXC-E,0),3,1)/SMA(ABS(INDEXC-E),3,1);
VAR10:=F AND F<8;
VAR11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR12:=SMA(VAR11,3,1);
VAR13:=SMA(VAR12,3,1);
VAR14:=VAR13 AND VAR13<20;
MM:=A AND D AND VAR10 AND VAR14 ;
DRAWTEXT(W=1000,B*1.05,'★卖' ),COLOR00FF00;
DRAWTEXT(D=1000,B*1.05,'★买'),COLORRED;
{-------------------------------------------------------------}
{直效主图 }
{INPUT:N(10,1,150),CX(1,1,2);}
MA06:MA(C,6),COLORMAGENTA,POINTDOT;
MA18:MA(C,18),LINESTICK,COLOR880000,,LINETHICK2;
IF(MA06>=REF(MA06,1),MA06,DRAWNULL),COLOR0000CC,LINETHICK2;
IF(MA06<REF(MA06,1) AND CX=1,MA06,DRAWNULL),COLOR009900,LINETHICK2;
IF(MA18>=REF(MA18,1) AND CX=2,MA18,DRAWNULL),COLOR0000CC,LINETHICK2;
IF(MA18<REF(MA18,1) AND CX=2,MA18,DRAWNULL),COLOR009900,LINETHICK2;
BZA06:=BARSLAST(C<MA06);
BZB06:=BARSLAST(MA06<REF(MA06,1));
BZA18:=BARSLAST(C<MA18);
BZB18:=BARSLAST(MA18<REF(MA18,1));
BDA06:=BARSLAST(C>MA06);
BDB06:=BARSLAST(MA06>REF(MA06,1));
BDA18:=BARSLAST(C>MA18);
BDB18:=BARSLAST(MA18>REF(MA18,1));
V06:MA(VOL,6),COLOR6666CC,NODRAW;
V36:MA(VOL,36),COLORFFCC00,NODRAW;
VVOL:V,COLORFF00FF,NODRAW;
A1:=REF(C,N)=HHV(C,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
HD:=FILTER(C1,N);
A2:=REF(C,N)=LLV(C,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
LD:=FILTER(C2,N);
A:=REF(C,BARSLAST(HD)); B:=REF(C,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
IF(T1,A,DRAWNULL),COLORCC6600,LINETHICK2;
IF(T2,B,DRAWNULL),COLORDDDDDD,LINETHICK2;
IF(T1,A*0.9,DRAWNULL),COLORCC6600,LINETHICK1;
IF(T2,B*1.1,DRAWNULL),COLORDDDDDD,LINETHICK1;
YIN1:=BDA06>=2 AND BDB06=1 AND CX=1;
YIN2:=BDA18>=2 AND BDB18=1 AND CX=2;
YIN3:=BZA06>=2 AND BZB06=1 AND V06>V36 AND CX=1;
YIN4:=BZA06>=2 AND BZB06=1 AND V06>V36 AND CX=2;
DRAWTEXT(YIN1 OR YIN2,H*1.05,'卖出'),COLOR00FFFF;
DRAWTEXT(YIN3 OR YIN4,L*0.95,'买入'),COLOR00FF00;
{-----------------------------------------------------------------}
{成交天机--通达信}
A股:CAPITAL/1000000,LINETHICK0,COLORWHITE;
实际量:VOL,LINETHICK0;
{VAR1:=DYNAINFO(17)*REF(MA(VOL,5),1);
VAR2:=DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT;
预测:=IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR1,VAR2)/10000;
预测量:STICKLINE(IF(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VAR1,VAR2),VAR1,0,7,1),COLORGRAY;}
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),POINTDOT,COLORRED;
主卖:IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORGREEN;
换手率%:VOL/CAPITAL*100,POINTDOT,COLORWHITE;
STICKLINE(C>=REF(C,1) ,0,VOL,2.5,1),COLORRED;
STICKLINE(C<REF(C,1),0,VOL,2.5,1),COLORGREEN;
STICKLINE(主买>0,0,主买,2.5,0),COLORRED;
STICKLINE(主卖<0 ,0,主卖,2.5,0),COLORGREEN;
资金异动:VOL/MA(VOL,55)*100,COLORYELLOW;
STICKLINE(资金异动>100 ,0,VOL,0.6,0),COLORYELLOW;
MA5:MA(V,5),COLORWHITE;
MA13:MA(V,13),COLORRED;
DRAWTEXT(CROSS(MA5,MA13),(V *1.05),'★'),COLORYELLOW;
MA6:MA(V,6),COLORMAGENTA,LINETHICK2;
MA36:MA(V,36),COLORBLUE,LINETHICK2;
{---------------------------------------------------------------------}
{买卖决策}
{强烈推荐,超准好指标}
来势线: EMA(CLOSE,7)-EMA(CLOSE,21),COLORYELLOW;
福星: EMA(来势线,7), COLORSTICK,COLORRED;
VAR00:=CLOSE/REF(LLV(LOW,35),5)< 1;
决策: IF(VAR00,0.5,0), STICK,COLORBLUE;
必买: IF(TROUGHBARS(3,15,1)=0 AND HIGH>LOW+0.01,1,-1),COLORYELLOW ,LINETHICK1 ;
必卖: IF(PEAKBARS(3,15,1)=1,1,2),COLORWHITE,LINETHICK1;
趋势线: (EMA(WINNER(CLOSE),7)-EMA(WINNER(CLOSE),35))*5,COLORRED;
逃顶线: EMA(CLOSE/REF(HHV(CLOSE,7),50),1),COLOR00FF00 ,LINETHICK1 ;
{---------------------------------------------------------------------}
本文地址:
http://www.45fan.com/a/question/39540.html