以前凤班的经典公式搬一些过来
{市场赢家}
Var41:=CLOSE/MA(CLOSE,30)*100<75;
Var42:=CLOSE/MA(CLOSE,50)*100<78;
Var43:=HIGH>LOW*1.053;
Var44:=Var43 AND COUNT(Var43,5)>2;
Var45:=Var44 AND (Var41 OR Var42);
Var46:=DMA(EMA(CLOSE,5),SUM(VOL,8)/2.8/CAPITAL);
Var47:=(CLOSE-Var46)/Var46*100;
市场赢家:REF(Var47,1)<-34 AND Var47>REF(Var47,1) AND REF(Var47,1)<REF(Var47,2) AND Var47-REF(Var47,1)>1.76 OR Var45,colormagenta;
{旭日东升}
Var51:=(CLOSE-MA(CLOSE,50))/MA(CLOSE,50)*100<-23;
Var52:=SMA(MAX(CLOSE-REF(CLOSE,1),0),3,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),3,1)*100>16;
Var53:=100*(HHV(HIGH,27)-CLOSE)/(HHV(HIGH,27)-LLV(LOW,27));
旭日东升:Var51 AND Var52 AND CROSS(Var53,79) AND (OPEN>CLOSE OR OPEN<CLOSE) AND (OPEN-REF(CLOSE,1))/REF(CLOSE,1)<0.05 AND VOL>MA(VOL,23),colorred;
{追涨}
Vara:=IF(CLOSE/REF(CLOSE, 1)>1.050 AND VOL/CAPITAL*100<10 AND CLOSE<17 AND HIGH/CLOSE<1.010 , 91, 0);
Vara>90;
{反弹买入}
a2:=AMOUNT/(100*vol);
中线成本均线:=ma(a2,13);
cys:100*(c-中线成本均线)/中线成本均线+50,colorcyan,;
Var1:=(CLOSE*50)/100;
Var2:=MA(Var1,30)*0.83;
Var3:=MA(Var1/Var2,3);
IF(Var3<1.06,Var1*1.1+10,0)+30,COLORYELLOW,LINETHICK2;
30;35;40;
{瞄准底部}
VAR1:=MA(HHV(HIGH,485),17);
VAR2:=MA(HHV(HIGH,222),17);
VAR3:=MA(HHV(HIGH,96),17);
VAR4:=MA(LLV(LOW,485),17);
VAR5:=MA(LLV(LOW,222),17);
VAR6:=MA(LLV(LOW,96),17);
VAR7:=MA((VAR4*0.96+VAR5*0.96+VAR6*0.96+VAR1*0.558+VAR2*0.558+VAR3*0.558)/6,17);
VAR8:=MA((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR1*0.55+VAR2*0.55+VAR3*0.65)/6,17);
VAR9:=MA((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR1*0.68+VAR2*0.68+VAR3*0.68)/6,17);
VARA:=MA((VAR7*3+VAR8*2+VAR9)/6*1.738,17);
VARD:=REF(LOW,1);
VARE:=SMA(ABS(L-VARD),3,1)/SMA(MAX(L-VARD,0),3,1)*100;
VARF:=MA(IF(CLOSE*1.35<=VARA,VARE*10,VARE/10),3);
VAR10:=LLV(LOW,30);
VAR11:=HHV(VARF,30);
绝佳买点:=MA(IF(LOW<=VAR10,(VARF+VAR11*2)/2,0),3);
I:=IF(CLOSE<REF(CLOSE,1),VOL/CAPITAL*10053,0);
瞄准把握:ABS(EMA(I,13.3)-18)/WINNER(CLOSE)*IF((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)<-0.04,1,0);
短线买:IF(绝佳买点>500 AND 绝佳买点>2500,100,0),COLORYELLOW,LINETHICK3;
中线买:IF(绝佳买点>10000 AND 绝佳买点>20000,200,0),COLORFF00FF,LINETHICK3;
全力买:IF(绝佳买点>30000 ,300,0),COLORRED,LINETHICK3 ;
{潜力股排序}
a:=if(DYNAINFO(39)>0,DYNAINFO(39),0);
潜力:a/FINANCE(37);
用“潜力股排序”后,其值大于0的不要,小于或等于0的也不要,注意0—1之间的股票,其值越小越好。然后再看基本面。
{武夷短线}
DIF:=CLOSE-REF(CLOSE,1);
VU:=IF(DIF>=0,DIF,0);
VD:=IF(DIF<0,-DIF,0);
MEMAU1:=EMA(VU,7);
MEMAD1:=EMA(VD,7);
MEMAU2:=EMA(VU,10);
MEMAD2:=EMA(VD,10);
RSI1:=100*MEMAU1/(MEMAU1+MEMAD1);
RSI2:100*MEMAU2/(MEMAU2+MEMAD2),COLORFF00FF;
换手:MA(VOL/FINANCE(7),5)*3,STICK,LINETHICK2,COLOR00FF00;
买入:IF(RSI1<RSI2 AND RSI2<20 ,30,0),COLORYELLOW,LINETHICK1;
卖出:IF(RSI2<RSI1 AND RSI1>83 ,70,100),LINETHICK1,COLORRED ;
{安全度}
Var2:=LLV(LOW,33);
Var3:=HHV(HIGH,21);
Var4:=EMA((CLOSE-Var2)/(Var3-Var2)*100,20)*0.998;
100,stick,LINETHICK7, COLORffcc33;
80, stick,LINETHICK7, COLORFF9933;
50,stick,LINETHICK7, colorblue;
20,stick,LINETHICK7,colorcc0033;
20,, COLORWHITE;
50,, COLORYELLOW;
80,, COLORCYAN;
DRAWTEXT(FILTER(CLOSE>0,150),10,'头部区\'),, COLORWHITE;
DRAWTEXT(FILTER(CLOSE>0,150),30,'危险区\'), , COLORWHITE;
DRAWTEXT(FILTER(CLOSE>0,150),65,'安全区\'), , COLORWHITE;
DRAWTEXT(FILTER(CLOSE>0,150),88,'底部区\'), , COLORWHITE;
当前安全度: 100-EMA(0.667*REF(Var4,1)+0.333*Var4,1),linethick2 ,COLORRED;
{三丰超跌反弹原码}{加在主图即可}
KS:=(C-MA(C,13))/MA(C,13)*(-100);
RKS:=REF(KS,1);
MLS:=RKS/KS>=1.23 AND RKS>=8 AND C/REF(C,1)>=1.02;
超跌:STICKLINE(KS>=8,H,L,0,1),colorwhite,linethick1;
STICKLINE(KS>=8,o,c,7,1),colorwhite,linethick1;
反弹:STICKLINE(MLS=1,H,L,0,1),colormagenta,linethick1;
STICKLINE(MLS=1,o,c,7,1),colormagenta,linethick1;
{【逃顶至尊】}
LC:=REF(CLOSE,1);
RSI5:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;
R:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
A:=SMA(R,3,1);
B:=SMA(A,3,1);
CCC:=(B/2+40)*1.1;
D:=SMA(CCC,3,1);
【逃顶至尊1】:if(CROSS(D,RSI5),50,0),STICK,COLORMAGENTA;
【逃顶至尊2】:if(CROSS(80,RSI5),-50,0),STICK,COLORGREEN;
{犀牛K线}
Var1:=MA(AMOUNT/(100*VOL),5);
Var2:=MA(AMOUNT/(100*VOL),13);
Var3:=MA(AMOUNT/(100*VOL),34);
Var4:=DMA(CLOSE,VOL/CAPITAL);
CYS13:=(CLOSE-Var2)/Var2*70,pointdot ;
AA:ABS(WINNER(CLOSE)-WINNER(OPEN))*100, VOLSTICK;
Var5:=WINNER(CLOSE)*100;
Var6:=100*VOL/CAPITAL;
fillrgn(CYS13>0,CYS13,0{,10,0}),COLORgreen ;
STICKLINE(CYS13<=0,CYS13,0,8,0),Colormagenta ;
{茅警}
a:=hhv(h,10);
顶距:=(a-c)/a*(-100)=0;
十换手:=SUM(VOL,10)/CAPITAL;
bb:=十换手>=(5/100) and 十换手<(80/100) ;
X1:=EMA(C,20);
X2:=REF(X1,1);
X3:=(X1-X2)/X2*100;
阳线3%:=CLOSE/REF(CLOSE,1)>1.02 ;
预警:阳线3% and bb and x3>=1 and 顶距;
以上公式为李凤翔老师过去的作品,公式虽老,但却经典,使人难忘...
将KDJ指标做成排序公式,1表示今天金叉,2、3、4。。。表示多,0表示KDJ还没走好。每天用它排一下,可以找到KDJ刚刚金叉股票。
{kdj系数}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1),linethick1,coloryellow;
D:=SMA(K,3,1),linethick1,colorMAGENTA;
J:=3*K-2*D,linethick1,colorred;
x:=(J<=K);
KDJ系数:BARSLAST(x),LINETHICK0;
{均线斜率排序}
x1:=ema(c,20);
凤翔六盈:(x1-ref(x1,1))/ref(x1,1)*100;
{两阳夹阴}
c>o and ref(c,1)<ref(o,1) and ref(c,2)>ref(o,2)
and c>ref(o,1) and c>ma(c,5) and ma(c,5)>ma(c,10){可用于周K线选股。两阳夹阴}
{凤翔蓝筹排序}{排序指标}{说明:取每股收益和市盈率的倒数的加权平均值作为蓝筹系数,越大越好。可用于分行业。
凤翔/2005-08-26}
正收益率:=if(FINANCE(33)>0.01 and FINANCE(34)>0,FINANCE(33)*6,0);
正市盈率:=if(FINANCE(33)>0.01 and FINANCE(34)>0,FINANCE(34)*4,0);
蓝筹系数:(正收益率+1/正市盈率)/10*100;
集中度排序小屋专用,勿外传
{集中度}
a1:=cost(95);
a2:=cost(5);
集中度:=(a1-a2)*100/(a1+a2);
集中度提高:集中度-ref(集中度,1);
mms:=hHV(集中度,0),colorcyan;
集中度差幅:(集中度-mmS)/mms*100
{集中度新高走平选股}
a1:=cost(95);
a2:=cost(5);
集中度:=(a1-a2)*100/(a1+a2);
(HHV(集中度,0)-集中度)/集中度<=(10/100) and COUNT(CLOSE,0)>50
{10买卖差排序}
obv:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2));
差:(主动买盘+主动卖盘);
集中度提高排序,小屋专用,勿转
{集中度提高}
a1:=cost(95);
a2:=cost(5);
集中度:=(a1-a2)*100/(a1+a2);
集中度提高:集中度-ref(集中度,1);
斜率排序:
x1:=ema(c,2);
x2:=ref(em |