下面仅提供公式源码。
1,
{买卖天王}
DF火:= BARSLAST(EMA(CLOSE,5)<REF(EMA(CLOSE,5),1));
DF山:= COUNT(EMA(CLOSE,5)>REF(EMA(CLOSE,5),1),12);
天王卖:REF(DF火,4)>0 and REF(DF火,3)>0 AND REF(DF火,2)>0 AND REF(DF火,1)>0 AND DF火=0 AND REF(DF火,1)>DF山,colorgreen,linethick2;
CMC0:=REF(C,2)*0.865;
CMC1:=REF(C,13)*0.772;
CMDSY:=100*vol/CApitAl;
天王买1:=(C-MIN(CMC0,CMC1))/C<0.085 AND SUM(CMDSY,5)/5<1.8;
bwVar1:=(C-MA(C,48))/MA(C,48)*100<-30 AND (C-MA(C,70))/MA(C,70)*100<-27 AND COUNT((C-MA(C,48))/MA(C,48)*100<-30 AND (C-MA(C,70))/MA(C,70)*100<-27,2)=1 AND (O-REF(C,1))/REF(C,1)>-0.07 and COUNT(c=o,6)=0;
bwVar2:=(C-DMA(EMA(C,8),SUM(V,9)/2.8/CAPITAL))/DMA(EMA(C,8),SUM(V,9)/2.8/CAPITAL)*100;
bwVar3:=REF(bwVar2,1)<-46 AND bwVar2>REF(bwVar2,1) AND REF(bwVar2,1)<REF(bwVar2,2) AND bwVar2-REF(bwVar2,1)>2.2;{-42,1.8}
天王买2:=(bwVar1 or bwVar3);
bwVar10:=SMA(SMA((INDEXC-LLV(INDEXL,275))/(HHV(INDEXH,275)-LLV(INDEXL,275))*100,50,1),40,1);
天王买3:=(C-MA(C,70))/MA(C,70)*100<-24 AND bwVar10<23 AND COUNT((C-MA(C,70))/MA(C,70)*100<-23,2)=1 AND (O>C OR O<C) AND O/REF(C,1)>0.96;{-23}
bwVar15:=DMA(EMA(C,5),SUM(V,8)/2.8/CAPITAL);
bwVar10:=REF((C-bwVar15)/bwVar15*100,1)<-40;
bwVar11:=(C-bwVar15)/bwVar15*100>REF((C-bwVar15)/bwVar15*100,1);
bwVar12:=REF((C-bwVar15)/bwVar15*100,1)<REF((C-bwVar15)/bwVar15*100,2);
bwVar13:=(C-bwVar15)/bwVar15*100-REF((C-bwVar15)/bwVar15*100,1)>1.8;
bwVar14:=H>L*1.053 AND COUNT(H>L*1.053,5)>2 AND (C/MA(C,30)*100<75 OR C/MA(C,50)*100<78);
天王买4:=bwVar10 AND bwVar11 AND bwVar12 AND bwVar13 OR bwVar14;{-34,1.76}
jdVar1:=(C-MA(C,48))/MA(C,48)*100<-28;
jdVar2:=SMA(MAX(C-REF(C,1),0),12,1)/SMA(ABS(C-REF(C,1)),12,1)*100>23;
天王买5:=jdVar1 AND jdVar2 AND VOL>MA(VOL,18) AND COUNT(c=o,6)=0;
xrVar2:=(C-MA(C,50))/MA(C,50)*100<-23;
xrVar3:=SMA(MAX(C-REF(C,1),0),3,1)/SMA(ABS(C-REF(C,1)),3,1)*100>16;
xrVar4:=CROSS(100*(HHV(H,27)-C)/(HHV(H,27)-LLV(L,27)),79);
xrVar5:=(O-REF(C,1))/REF(C,1)<0.05 AND V>MA(V,23);
天王买6:=xrVar2 AND xrVar3 AND xrVar4 AND (O>C OR O<C) AND xrVar5;
天王买: (天王买1+天王买2+天王买3+天王买4+天王买5+天王买6 )>=2,stick3d,colorred;
2.2 指标源码
完整的公式如下:
放量:=VOL/REF(MA(VOL,5),1)>1.8;
PZ1:=MA(CLOSE,60);
PZ2:=HHV(HIGH,60);
PZ3:=LLV(LOW,60);
最高价均价比:=(PZ2-PZ1)/PZ1;
最低价均价比:=(PZ1-PZ3)/PZ1;
长期横盘:=REF(最高价均价比,1)<0.10 AND REF(最低价均价比,1)<0.10;
新高:=HIGH=HHV(HIGH,60);
横盘放量突破:放量 AND 长期横盘 AND 新高,stick3d,colorred ;
横盘未放量突破:not(放量) AND 长期横盘 AND 新高,colorgreen,linethick2;
4.2 指标源码
{价咯预测}
CJTY:=C;
CJHD:=FILTER(BACKSET(FILTER(REF(CJTY,10)=HHV(CJTY,2*10+1),10),10+1),10);
CJLD:=FILTER(BACKSET(FILTER(REF(CJTY,10)=LLV(CJTY,2*10+1),10),10+1),10);
CJA:=REF(C,BARSLAST(CJHD));
CJB:=REF(C,BARSLAST(CJLD));
CJT1:=BARSLAST(CJHD)<BARSLAST(CJLD) AND NOT(CJHD) ;
CJT2:=BARSLAST(CJHD)>BARSLAST(CJLD) AND NOT(CJLD);
{波浪顶}
STICKLINE(CJT1,CJA,CJA,3,0),COLORFF00FF;
{波浪底}
STICKLINE(CJT2,CJB,CJB,3,0),COLORFF00FF;
统计天数:=BARPOS-hhv(if(DISPSTATUS=1,BARPOS,0),0)+1;
预测价咯:=LLV(C,统计天数)*1.1618;
高点:=HHV(C,统计天数);{H}
低点:=LLV(C,统计天数);{L}
压力支撑50:高点-(高点-低点)*0.5,dotline,Linethick1,colorgreen;;
支撑357:=高点-(高点-低点)*0.35765;
支撑642:=高点-(高点-低点)*0.6423;
压力357:=低点+(高点-低点)*0.35765;
压力642:=低点+(高点-低点)*0.6423;
牛顶:=低点+(高点-低点)*(1+0.618);
熊底:=ABS( 高点-(高点-低点)*(1+0.618) );
高点跌幅:= ( HHV(C,统计天数) -C )/HHV(C,统计天数);
低点涨幅:= ( C -LLV(C,统计天数) )/LLV(C,统计天数);
止跌:= HHV(C,统计天数) * 0.6;
预测价:=预测价咯;{,POINTDOT,Linethick2,colorblue;}
DRAWTEXTrel(999,999-30, '低点涨幅:'+NUMTOSTR(低点涨幅) +'; ' +'高点跌幅:'+NUMTOSTR(高点跌幅) +'; ' +'高点40%止跌:'+NUMTOSTR(止跌) +'; ' + '预测:'+NUMTOSTR(预测价咯) +'; '+'压支50%:'+NUMTOSTR(压力支撑50) ),align2,colorblue;
DRAWTEXTrel(999,999-60, '牛顶:'+NUMTOSTR(牛顶) +'; '+'熊底:'+NUMTOSTR(熊底) +'; '+ '压36%:'+NUMTOSTR(压力357)+'; '+'压64%:'+NUMTOSTR(压力642)),align2;
DRAWTEXTrel(999,999-90, '支36%:'+NUMTOSTR(支撑357)+'; '+'支64%:'+NUMTOSTR(支撑642)),align2;
5.2 指标源码
{成本多头}
短线成本均线:=EMA(AMOUNT,5 ) /EMA(VOL,5 ) ;
中线成本均线:=EMA(AMOUNT,13 ) /EMA(VOL,13 ) ;
长线成本均线:=EMA(AMOUNT,34 ) /EMA(VOL,34 ) ;
成本线多头排列:短线成本均线>中线成本均线 and 中线成本均线>长线成本均线;
6.2 指标源码
{筹码集中}
A1:=COST(85);
A2:=COST(15);
A3:=A1-A2;
A4:=(A1+A2)/2;
单峰密集:A3/A4*100<15,linethick0;
B1:=HHV(HIGH,250);
B2:=LLV(LOW,250);
B3:=B1-B2;
低位:A4<(B3*0.4+B2),linethick0;
低位单峰密集:单峰密集 AND 低位,colorred;
高位:A4>(B3*0.7+B2),linethick0;
高位单峰密集:单峰密集 AND 高位,colorgreen;
8.2 指标源码
{量能突破}
流通:=AMOUNT/VOL;
PJJ:=DMA((HIGH+LOW+CLOSE*2)/4,0.9);
JJ:=REF(EMA(PJJ,3),1);
QJJ:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
XVL:=(IF(CLOSE>OPEN,QJJ*(HIGH-LOW),IF(CLOSE<OPEN,QJJ*(HIGH-OPEN+CLOSE-LOW),VOL/2))+IF(CLOSE>OPEN,0-QJJ*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,0-QJJ*(HIGH-LOW),0-VOL/2)));
ZLL:=VOL/CAPITAL;
HSL1:=IF(ZLL>10,10,ZLL);
HSL:=(XVL/20)/1.15;
攻击流量:=((HSL*0.55+(REF(HSL,1)*0.33))+(REF(HSL,2)*0.22));
GJJ:=EMA(攻击流量,8);
LLJX:=EMA(攻击流量,3);
资金流向:LLJX,COLOR0000FF;{LINETHICK0}
STICKLINE(资金流向>0,资金流向,0,7,0),COLOR0000FF;
STICKLINE(资金流向<0,资金流向,0,7,0),COLORFF0000;
流量基线:=GJJ;
ZJLL:=REF(LLJX,1);
QZJJ:=((LLJX-ZJLL)/ZJLL)*100;
资金增幅百分比:IF(LLJX>0 AND ZJLL<0,ABS(QZJJ),IF(LLJX<0 AND ZJLL<0 AND LLJX<ZJLL,-QZJJ,QZJJ)),LINETHICK0;
力度:HSL/1000,LINETHICK0;
TTJ:=BARSLAST((VOL=HHV(VOL,40)));
量能突破:TTJ<2 AND TTJ>=1 AND C>REF(C,TTJ) and 资金增幅百分比>0,linethick0;
DRAWICON(TTJ<3 AND TTJ>=1 AND C>REF(C,TTJ) and 资金增幅百分比>0, HHV(资金流向,60)*1.2,1);
9.2 指标源码
{四朵金花}
日K:="kd.k"(9,3,3);
日D:="kd.d"(9,3,3);
日J:="kdj.j"(9,3,3);
KD金花:count( CROSS(日K,日D) and CROSS(日J,日D) ,2)>=1,linethick0;
{MACD买入条件}
XDIFF :="MACD.diff"(26,12,9);XDEA :="MACD.dea"(26,12,9);XMACD :="MACD.MACD"(26,12,9);
MACD金花:COUNT( CROSS(Xdiff,Xdea) AND XDIFF>XDEA,2) >=1,linethick0;
价金花:COUNT( CROSS(ma(C,5),ma(C,10)) OR cross(ma(C,10),ma(C,20)),2)>=1,linethick0 ;
量金花:COUNT( CROSS(MA(VOL,5),MA(VOL,10)),2)>=1,linethick0;
四朵金花: KD金花 AND MACD金花 AND 价金花 AND 量金花,stick3d;
10.2 指标源码
{//仙人指路}
XV1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
XV2:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
XV3:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
XV4:=(XV1+2*XV2+3*XV3)/6;
XV5:=MA(XV4,3);
XV8:=IF(YEAR>=2008 AND MONTH>0,0,1);
XV9:=(CLOSE-LLV(LOW,80))/(HHV(HIGH,80)-LLV(LOW,80))*200;
XVA:=SMA(XV9,3,1);
XVB:=SMA(XVA,3,1);
XVC:=3*XVA-2*XVB;
XVD:=LLV(LOW,5);
XVE:=HHV(HIGH,5);
XVF:=EMA((CLOSE-XVD)/(XVE-XVD)*100,4)*2;
XV10:=EMA(0.667*REF(XVF,1)+0.333*XVF,2);
XV11:=3*XVF-2*XV10;
XV12:=POW(MA(C |