M :=9;
P1:=5;
P2:=10;
P3:=20;
P4:=30;
LONG:=26;
SHORT:=12;
MA1:= EMA(C,P1);
MA2:= EMA(C,P2);
MA3:= EMA(C,P3);
MA4:= EMA(C,P4);
MA5:= MA(C,120);
换手率:=(VOL/CAPITAL) ;
{========================= 引用布林线 =========================}
N:=26; P:=20;
MID := MA(CLOSE,N);
UPPER:=MID + P/10*STD(CLOSE,N);
LOWER:=MID - P/10*STD(CLOSE,N);
多头排列:=MA1>MA2 and MA2>MA3 and MA2>MA4 and MA4>ref(MA4,5);
空头排列:=MA1<MA2 and MA2<MA3 and MA3<MA4;
上升趋势:=MA4>ref(MA4,3) and MA4>ref(MA4,1) and MA1>MA4;
下跌趋势:=MA4<ref(MA4,3) and MA4<ref(MA4,1) and MA1<MA4;
{
EXPLAIN(C>0,'=====【综合解盘】====='),COLORRED; EXPLAIN(C>0,'注意:目前解盘内容仅适用'); EXPLAIN(C>0,'于个股的日线周期分析参考');
}
{=================================================【基本信息提示】====================================================}
EXPLAIN(C>0,'───【基本信息提示】───'),COLORYELLOW;
EXPLAINEX(1,'流 通 盘(万股):',FINANCE(3), 1,0);
EXPLAINEX(1,'总 股 本(万股):',FINANCE(0), 2,0);
EXPLAINEX(1,'每股收益( 元 ):',FINANCE(29),3,0);
{
EXPLAINEX(1,'动态市盈率:',close/FINANCE(29),2,0);
}
EXPLAINEX(close>FINANCE(34),'每股净资产(元):',FINANCE(31),3,0) ;
EXPLAINEX(close<FINANCE(34),'每股净资产(元):',FINANCE(31),3,0) ;
EXPLAINEX(1,'净资产收益率 %:',FINANCE(33),2,0);
{EXPLAIN(C>0,'────────────'),COLOR666666;}
EXPLAINEX(1=1,'获利盘比例值 %:',WINNER(c)*100,2,0);
{
EXPLAINEX(1,'总 股 本:',FINANCE(1),'流 通 股:',FINANCE(7),2,0);
EXPLAINEX(1,'主营利润:',FINANCE(21),2,0);
EXPLAINEX(1,'利润增长:',FINANCE(54),2,0);
EXPLAIN(1,F10TEXT(F10FIND('发行价',1),30));
EXPLAINEX(1,'获利盘 %:',winner(close)*100,2,0),COLORGREEN;
}
{
EXPLAIN(C>0,'──【板块信息提示】──'),COLORBLUE;
Explain(1,BLKNAME);
Explain(1,STKNAME+STKLABEL+'\n所属板块:'+BLKNAME)
}
{=================================================【MACD指标分析】====================================================}
EXPLAIN(C>0,'───【经典指标分析】───'),COLORYELLOW;
DIF :EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),COLORCCFFFF;
DEA :EMA(DIF,M),COLOR58FF58;
MACD:=2*(DIF-DEA),COLORFFFF00,LINETHICK0;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,6,0),COLOR6058FF;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),0,MACD,6,1),COLOR6058FF;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,6,1),COLORFFFF00;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),0,MACD,6,0),COLORFFFF00;
多头趋势:=IF(DIF>=0 AND DEA>=0 OR (DIF<0 AND DEA>=0),1,0);
空头趋势:=DIF<0 AND DEA<0 OR (DIF>=0 AND DEA<0);
MACD绿柱缩短:=MACD<0 AND ABS(MACD)< REF(ABS(MACD),1) and ref(MACD,1)<0;
MACD红柱缩短:=MACD>0 AND MACD< REF(MACD,1);
缩头:=IF(MACD>0 AND REF(MACD,1)>REF(MACD,2) AND REF(MACD,2)>REF(MACD,3) AND MACD< REF(MACD,1),1,0) and ref(MACD,1)>0.150;
缩脚:=IF(MACD<0 AND REF(MACD,1)< REF(MACD,2) AND REF(MACD,2)< REF(MACD,3) AND MACD>REF(MACD,1),1,0) and ref(MACD,1)<-0.100;
金叉:=CROSS(DIF,DEA);
死叉:=CROSS(DEA,DIF);
0轴下死叉:=死叉 AND DEA<0;
0轴上死叉:=死叉 AND DEA>0;
0轴下金叉:=金叉 AND DEA<0;
0轴上金叉:=金叉 AND DEA>0;
0轴上二次金叉:=COUNT(CROSS(DIF,DEA) AND DEA>0,20)=2 AND CROSS(DIF,DEA) AND DEA>0;
0轴上三次金叉:=COUNT(CROSS(DIF,DEA) AND DEA>0,20)=3 AND CROSS(DIF,DEA) AND DEA>0;
{----------------------------------------------------------------------------------------------------------------------------}
{
EXPLAIN(缩头, '注意MACD柱状缩头') ;
EXPLAIN(缩脚, '注意MACD柱状缩脚') ;
EXPLAIN(MACD<0 AND ABS(MACD)>REF(ABS(MACD),1), 'MACD绿柱增长');
EXPLAIN(MACD绿柱缩短 and not(缩脚),'MACD绿柱缩短');
EXPLAIN(MACD>0 AND MACD>REF(MACD,1), 'MACD红柱增长');
EXPLAIN(MACD红柱缩短 and not(缩头),'MACD红柱缩短');
}
EXPLAIN(金叉 and not(0轴下金叉) and not(0轴上金叉) and not( 0轴上二次金叉),'金叉--属强势信号');
EXPLAIN( 0轴下死叉,'DEA和DIF在0轴下死叉');
EXPLAIN( 0轴下金叉,'DEA和DIF在0轴下金叉');
EXPLAIN( 0轴上金叉 and not(0轴上二次金叉) and not(0轴上三次金叉),'DEA和DIF在0轴上金叉');
EXPLAIN( 0轴上死叉,'DEA和DIF在0轴上死叉');
EXPLAIN( 0轴上二次金叉,'DEA和DIF在0轴上二次金叉');
EXPLAIN( 0轴上三次金叉,'DEA和DIF在0轴上三次金叉');
EXPLAIN(DIF>=0 AND MACD>=0 AND MACD<=REF(MACD,1),'上涨趋势有所减缓,短线投资者可考虑先逢高减持');
EXPLAIN(DIF<0 AND MACD>0 AND MACD>REF(MACD,1) , '目前处于反弹阶段,保持谨慎');
EXPLAIN(MACD>0 AND DIF>0 AND DIF>DEA AND DIF>REF(DIF,1) AND C>REF(C,1),'上升趋势尚未改变');
EXPLAIN(DIF<0 AND MACD>0 AND MACD< REF(MACD,1),'短线反弹已经结束,应继续坚持谨慎原则');
EXPLAIN(DIF<0 AND MACD<=0 AND MACD>REF(MACD,1),'下跌趋势有所减缓,可适当关注');
EXPLAIN(MACD<0 AND DIF<0 AND DIF< DEA AND DIF< REF(DIF,1) AND C< REF(C,1) AND MACD<=REF(MACD,1),'下降趋势尚未改变');
EXPLAIN(DIF>=0 AND MACD<0 AND MACD< REF(MACD,1),'目前正处于回落整理阶段');
EXPLAIN(DIF>=0 AND MACD<0 AND MACD>=REF(MACD,1),'目前仍处于整理阶段,但整理即将结束,可在均线或其他支撑位附近逢低介入');
{--------------------------------------------引用 趋势顶底指标分析---------------------------------------------------}
A:=MA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),19),COLORRED;
B:=-100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14));
d:=EMA(-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34)),4),linethick2;
长期线:=A+100; 短期线:=B+100; 中期线:=d+100;
见顶:=(ref(中期线,1)>85 and ref(短期线,1)>85 and ref(长期线,1)>65) and cross(长期线,短期线) ;
顶部区域:=(中期线<ref(中期线,1) and ref(中期线,1)>80) and (ref(短期线,1)>95 or ref(短期线,2)>95 ) and 长期线>60 and 短期线<83.5 and 短期线<中期线 and 短期线<长期线+4;
底部区域:=(长期线<12 and 中期线<8 and (短期线<7.2 or ref(短期线,1)<5) and (中期线>ref(中期线,1) or 短期线>ref(短期线,1)))
or (长期线<8 and 中期线<7 and 短期线<15 and 短期线>ref(短期线,1)) or (长期线<10 and 中期线<7 and 短期线<1) ;
EXPLAIN( 顶部区域,'走势有超买迹象,需要引起注意') ,COLORFFCC99;
EXPLAIN( 底部区域,'走势有超跌迹象,需要引起注意') ,color9966FF;
{=================================================【均线信息提示】====================================================}
EXPLAIN(C>0,'───【均线趋势分析】───'),COLORYELLOW;
一阴穿两线:=close/open<0.985 and high>MA1 and close<MA3;
一阳穿两线:=close/open>1.016 and low<min(MA1,MA3) and close>max(MA1,MA3);
均线密集:=上升趋势 and (max(MA1,MA4)/min(MA1,MA4))<1.01 and MA1>MA2;
均线发散程度:=MA1/MA4;
均线向下发散:=空头排列 and 均线发散程度<0.90 and 均线发散程度<0.99*ref(均线发散程度,1);
均线向上发散:=多头排列 and 均线发散程度>1.070 and 均线发散程度>(1.013*ref(均线发散程度,1));
上升趋势形成:=上升趋势 and MA1>ref(MA1,1) and ref(not(上升趋势),1);
EXPLAIN(上升趋势 and MA1>ref(MA1,1) and ref(not(上升趋势),1) ,'上升趋势形成'),colorred;
EXPLAIN(上升趋势 and not(一阴穿两线) and ref(上升趋势,1) ,'处于上升 |