感觉一个挺不错的主图指标,在这分享一下,下面为源码:
【上市时间】:REF(YEAR,BARSCOUNT(CLOSE)-1),LINETHICK0,colorFF;
月:REF(MONTH,BARSCOUNT(CLOSE)-1),LINETHICK0,colorFF00FF;
日:REF(DAY,BARSCOUNT(CLOSE)-1),LINETHICK0,colorFFFF;
DDX:=IF(C<0,0,"DDX.DDX");
TF:IF(C<0,0,IF(DATE<=1341231,EMA(EMA(EMA(EMA
(CLOSE,3),3),3),3),0)),LINETHICK2,colorFF00FF;
TC:IF(C<0,0,IF(DATE<=1341231,EMA(REF
(TF,1),3),0)),LINETHICK2,colorFFFF00;
YF1:="RSI.RSI1";
YF2:="RSI.RSI2";
MACD1:="MACD.DIFF";
MACD2:="MACD.DEA";
KDJ0:="KDJ.D";
KDJ1:="KDJ.K";
AA:=FILTER(CROSS(KDJ1,KDJ0) AND KDJ0<40 AND MACD2<0 AND DDX>0,13);
W10:=BARSLAST(AA);
WW1:=FILTER(OPEN<REF(LOW,1) AND CLOSE>OPEN AND MA(CLOSE,3)>TF AND
VOL>REF(VOL,1),13);
CC:=REF(HHV(CLOSE,120),1);
DD:=REF(LLV(CLOSE,120),1);
WW:=100*(CLOSE-DD)/(CC-DD);
EE:=AMOUNT;
X1:=IF(C<0,0,(CLOSE+LOW+HIGH)/3);
X2:=IF(C<0,0,EMA(X1,6));
X3:=IF(C<0,0,EMA(X2,5));
DRAWICON(CROSS(X2,X3),LOW-0.1,1);
DRAWICON(CROSS(X3,X2),HIGH+0.1,2);
STICKLINE(X2>=X3,LOW,HIGH,0.1,1),colorFF;
STICKLINE(X2>=X3,CLOSE,OPEN,9,2),colorFF;
STICKLINE(X2>=X3,CLOSE,OPEN,9,8),colorFF;
STICKLINE(X2<X3,LOW,HIGH,0.1,1),colorFF00;
STICKLINE(X2<X3,CLOSE,OPEN,9,2),colorFF00;
STICKLINE(CROSS(X2,X3),OPEN,CLOSE,6,1),colorFFFF;
STICKLINE(CROSS(X3,X2),OPEN,CLOSE,6,1),colorFF0000;
FF:=EMA(EE,5)/REF(EMA(EE,5),5);
霸占:=FILTER(FF>=2 AND WW<35 AND BARSCOUNT(CLOSE)>30 OR FF>=2 AND
WW<100 AND BARSCOUNT(CLOSE)<50,90);
QIJ:=FILTER(CROSS(YF2,YF1),13);
YF:=7*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1)-3*SMA
(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*30,4,1),3,1)-SMA
(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))
*30,4,1),3,1),2,1);
QJ:=89.89;
WW0:=FILTER(CROSS(YF2,YF1) AND YF1>58 OR CROSS(QJ,YF),9);
WWW0:=BARSLAST(WW0);
取点:=IF(W10>0 AND W10<WWW0,W10,0);
取点1:=IF(WWW0>0 AND WWW0<W10,WWW0,0);
DRAWTEXTEX(CLOSE,1,660,960,'新庄进场:'+NUMTOSTR(取点,0)+' 天'),colorFF;
DRAWTEXTEX(CLOSE,1,840,960,'主力回吐:'+NUMTOSTR(取点1,0)+'
天'),colorFF00;
A4:=MA(CLOSE,20);
A5:=CLOSE>MA(CLOSE,5);
A6:=MA(CLOSE,5)>MA(CLOSE,10);
A7:=CLOSE>MA(CLOSE,10);
A8:=MA(CLOSE,5)>MA(CLOSE,20);
A9:=CLOSE>MA(CLOSE,20);
A10:=REF(A4,1);
A11:=A4>A10;
AVX:=IF(C<0,0,IF(A5,10,-10)+IF(A6,10,-10)+IF(A7,10,-10)+IF(A8,10,-10)
+IF(A9,10,-10)+IF(A11,10,-10));
DSLX:=CLOSE/INDEXC;
DSLX1:=MA(DSLX,5);
DSLX2:=MA(DSLX,10);
V1:=MA(VOL,5);
V2:=MA(VOL,10);
TJTS1:=BARSTATUS=2 AND CLOSE<200;
TJTS2:=BARSTATUS=2 AND CLOSE>200;
K2:=HHV(HIGH*1.04,(BARSLAST(SYSPARAM(2)=BARPOS))+1);
DRAWTEXT(TJTS1 AND CROSS(AVX,1) AND V1>=V2 AND DSLX>=DSLX1,K2*0.99,'舞
庄解盘:该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3
左右。'),ALIGN2,colorFF00FF;
DRAWTEXT(TJTS1 AND CROSS(AVX,1) AND V1<V2 AND DSLX>=DSLX1,K2*0.99,'舞庄
解盘:该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右
。'),ALIGN2,colorFF00FF;
DRAWTEXT(TJTS1 AND CROSS(AVX,1) AND V1>V2 AND DSLX<DSLX1,K2*0.99,'舞庄
解盘:该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场
,仓位1/2左右。'),ALIGN2,colorFF00FF;
DRAWTEXT(TJTS1 AND CROSS(AVX,1) AND V1<=V2 AND DSLX<DSLX1,K2*0.99,'舞庄
解盘:该股趋势尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3
左右。'),ALIGN2,colorFF00FF;
DRAWTEXT(TJTS1 AND CROSS(1,AVX) AND V1>=V2 AND DSLX>=DSLX1,K2*0.99,'舞
庄解盘:该股趋势变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可
以观望。'),ALIGN2,colorFF00;
DRAWTEXT(TJTS1 AND CROSS(1,AVX) AND V1<V2 AND DSLX>=DSLX1,K2*0.99,'舞庄
解盘:该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清
仓。'),ALIGN2,colorFF00;
DRAWTEXT(TJTS1 AND CROSS(1,AVX) AND V1>=V2 AND DSLX<DSLX1,K2*0.99,'舞庄
解盘:该股放量下跌,走势明显偏弱,离场观望。'),ALIGN2,colorFF00;
DRAWTEXT(TJTS1 AND CROSS(1,AVX) AND V1<V2 AND DSLX<DSLX1,K2*0.99,'舞庄
解盘:该股缩量下跌,走势偏弱,离场观望。'),ALIGN2,colorFF00;
DRAWTEXT(TJTS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1>=V2 AND
DSLX>=DSLX1,K2*0.99,'舞庄解盘:该股形态良好,强势明显,量能充足,可以继
续持有。'),ALIGN2,colorFFFF00;
DRAWTEXT(TJTS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1<V2 AND
DSLX>=DSLX1,K2*0.99,'舞庄解盘:该股上行趋势不变,强势依然,但量能开始转
弱,注意风险。'),ALIGN2,colorFFFF00;
DRAWTEXT(TJTS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1>=V2 AND
DSLX<DSLX1,K2*0.99,'舞庄解盘:该股仍然具备上涨潜力,但股性偏弱,可考虑
减仓。'),ALIGN2,colorFFFF00;
DRAWTEXT(TJTS1 AND AVX>=1 AND REF(AVX,1)>0 AND V1<V2 AND
DSLX<DSLX1,K2*0.99,'舞庄解盘:该股趋势偏弱,量能不足,减持大部分筹
码。'),ALIGN2,colorFFFF00;
DRAWTEXT(TJTS1 AND AVX<1 AND REF(AVX,1)<0 AND V1>=V2 AND
DSLX>=DSLX1,K2*0.99,'舞庄解盘:该股形态不佳,注意成交量的变化,但目前不
适合参与。'),ALIGN2,colorFFB060;
DRAWTEXT(TJTS1 AND AVX<1 AND REF(AVX,1)<0 AND V1<V2 AND
DSLX>=DSLX1,K2*0.99,'舞庄解盘:该股趋势不明,股价偏弱,注意量能变化,目
前不宜参与。'),ALIGN2,colorFFB060;
DRAWTEXT(TJTS1 AND AVX<1 AND REF(AVX,1)<0 AND V1>=V2 AND
DSLX<DSLX1,K2*0.99,'舞庄解盘:该股有走强迹象,但量能不足,趋势不明,不
适合操作。'),ALIGN2,colorFFB060;
DRAWTEXT(TJTS1 AND AVX<1 AND REF(AVX,1)<0 AND V1<V2 AND
DSLX<DSLX1,K2*0.96,'舞庄解盘:该股走势太弱,没有参与价值。'),ALIGN2;
DRAWTEXT(TJTS2 AND CROSS(AVX,1) AND V1>=V2,K2*0.99,'舞庄解盘:大盘量能
理想,有明显走强迹象,建议考虑中线进场参与,仓位在2/3左
右。'),ALIGN2,colorFF00FF;
DRAWTEXT(TJTS2 AND CROSS(AVX,1) AND V1>=V2,K2*0.98,'舞庄解盘:如前期经
过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨
慎。'),ALIGN2,colorFF00FF;
DRAWTEXT(TJTS2 AND CROSS(AVX,1) AND V1<V2,K2*0.99,'舞庄解盘:大盘虽然走
势趋强,但量能还显不足,如果前期经过一轮下跌。'),ALIGN2,colorFF00FF;
DRAWTEXT(TJTS2 AND CROSS(AVX,1) AND V1<V2,K2*0.98,' 舞庄解盘:可以考虑
短线进场,仓位在1/2左右,一旦量能放大可以加仓买
入。'),ALIGN2,colorFF00FF;
DRAWTEXT(TJTS2 AND CROSS(1,AVX) AND V1>=V2,K2*0.99,'舞庄解盘:大盘趋势
走坏,重仓者建议减去大部分仓位。'),ALIGN2,colorFF00;
DRAWTEXT(TJTS2 AND CROSS(1,AVX) AND V1<V2,K2*0.99,'舞庄解盘:大盘缩量调
整,注意风险,短线清仓观望。'),ALIGN2,colorFF00;
DRAWTEXT(TJTS2 AND AVX>=1 AND REF(AVX,1)>0 AND V1>=V2,K2*0.99,'舞庄解盘
:大盘走势良好,量能理想,可以继续持有强势股。'),ALIGN2,colorFFFF00;
DRAWTEXT(TJTS2 AND AVX>=1 AND REF(AVX,1)>0 AND V1<V2,K2*0.99,'舞庄解盘
:大盘趋势良好,但量能稍显不足,随时准备减仓。'),ALIGN2,colorFFFF00;
DRAWTEXT(TJTS2 AND AVX<1 AND REF(AVX,1)<0 AND V1>=V2,K2*0.99,'舞庄解盘
:大盘趋势不明,注意成交量变化,目前不适宜进场。'),ALIGN2,colorFFB060;
DRAWTEXT(TJTS2 AND AVX<1 AND REF(AVX,1)<0 AND V1<V2,K2*0.99,'舞庄解盘:
大盘趋势向下,量能萎缩,不适合进场。'),ALIGN2,colorFFB060;
DRAWTEXTEX(CLOSE,1,1,0,'\n\n收益:'+NUMTOSTR(FINANCE(33),2)+'元'+'\n'+'
净资:'+NUMTOSTR(FINANCE(34),2)+'元'+'\n'+'流通:'+NUMTOSTR(FINANCE
(7)/10000,2)+'亿'+'\n'+'流通:'+NUMTOSTR(FINANCE(7)/FIN |