当前位置:分析家公式网 → 股票公式 → 同花顺公式 → 一键转帖:顶底背离看盘(同花顺公式 副图 源码 测试图)
软件名称:[B]顶底背离看盘(同花顺公式 副图 源码 测试图)[/B]
软件类型:国产软件
运行环境:Win10/Win9X/Win8/Win2000/WinXP/Win2003/Win7/
软件语言:简体中文
授权方式:分享版
软件大小:0 Bytes
官方主页:Home Page
更新时间:2023-12-04 00:03:35
软件简介:
顶底背离看盘
SHORT:=12;
LONG:=26;
MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
IF(DIF>REF(DIF,1),DIF,DRAWNULL),colorred;
JC:=CROSS(DIF,DEA);
SC:=CROSS(DEA,DIF);
N1:=BARSLAST(SC)+1,NODRAW;
N2:=REF(BARSLAST(SC),N1)+1,NODRAW;
N22:=REF(N1-1,N1)+N1,NODRAW;
M1:=BARSLAST(JC)+1,NODRAW;
M2:=REF(BARSLAST(JC),M1)+1,NODRAW;
M22:=REF(M1-1,M1)+M1;
CL1:=LLV(C,N1),NODRAW;
DIFL1:=LLV(DIF,N1),NODRAW;
MACDL1:=LLV(MACD,N1),NODRAW;
CL2:=REF(CL1,M1),NODRAW;
DIFL2:=REF(DIFL1,M1),NODRAW;
MACDL2:=REF(MACDL1,M1),NODRAW;
CH1:=HHV(C,M1);
DIFH1:=HHV(DIF,M1);
MACDH1:=HHV(MACD,M1),NODRAW;
CH2:=REF(CH1,N1);
DIFH2:=REF(DIFH1,N1);
MACDH2:=REF(MACDH1,N1),NODRAW;
DBL:=(C<=CL2 ) AND (DIF>=DIFL2)AND (MACD<0 ) AND C=LLV(C,N1) ;
MDBL:=(C<=CL2 ) AND (MACD>=MACDL2)AND (MACD<0 ) AND C=LLV(C,N1) ;
UBL:=(C>=CH2 ) AND (DIF<=DIFH2) AND (MACD>0 )AND C=HHV(C,M1);
MUBL:=(C>=CH2 ) AND (MACD<=MACDH2)AND (MACD>0 )AND C=HHV(C,M1) ;
STICKLINE(DBL ,0,MACD,6,0),coloryellow;
STICKLINE(UBL ,0,MACD,6,0),coloryellow;
STICKLINE(MDBL ,0,MACD/2,6,0),colormagenta;
STICKLINE(MUBL ,0,MACD/2,6,0),colormagenta;
BV:=SUM(MACD,0);
BA:=IF(MAX(BV,REF(BV,2))<REF(BV,1) OR MIN(BV,REF(BV,2))>REF(BV,1),1,0);
BC:=BARSLAST(BA)+1;
SMACD:=BV-REF(BV,BC);
VAR3:=IF(MACD>0,HHV(ABS(MACD),BC),LLV(MACD,BC));
VAR4:=(MACD)/20;
面积:=SMACD,NODRAW;
JJC:= DEA-DIF;
绿柱面积:=IF(MACD<0,SUM(MACD,BARSLAST(JJC<0)),0);
红柱面积:=IF(MACD>0,SUM(MACD,BARSLAST(JJC>0)),0);
本次最低价:=LLV(L,BARSLAST(JJC<0));
本次最高价:=HHV(H,BARSLAST(JJC>0));
X1:=IF (MACD<0,BARSLAST(CROSS(DIF,DEA)),0);
前次绿柱面积:=REF(绿柱面积,X1+1);
前次最低价:=REF(本次最低价,X1+1);
Y1:=IF((绿柱面积<0 AND ABS(绿柱面积)<ABS(前次绿柱面积) AND 本次最低价<前次最低价 ),1,0);
RS1:= MACD<0 AND REF(MACD,1)<0 AND C<前次最低价
AND ABS(绿柱面积)<ABS(前次绿柱面积) AND ABS(MACD)<ABS(REF(MACD,1));
底背驰:= IF (CROSS(DIF,DEA),REF(Y1,1),0);
X2:=IF (MACD>0,BARSLAST(CROSS(DEA,DIF)),0);
前次红柱面积:=REF(红柱面积,X2+1);
前次最高价:=REF(本次最高价,X2+1);
Y2:=IF((红柱面积>0 AND 红柱面积<前次红柱面积 AND 本次最高价>前次最高价 ),1,0);
RS2:= MACD>0 AND REF(MACD,1)>0 AND C>前次最高价 AND ABS(红柱面积)<ABS(前次红柱面积) AND ABS(MACD)<ABS(REF(MACD,1));
顶背驰:= IF (CROSS(DEA,DIF),REF(Y2,1),0);
DIF底背:DBL,NODRAW,coloryellow;
DIF顶背:=UBL,NODRAW,coloryellow;
柱高底背:MDBL,NODRAW,colormagenta;
柱高顶背:=MUBL,NODRAW,colormagenta;
积顶背:=顶背驰,NODRAW,colorgreen;
积底背:底背驰,NODRAW,colorred;
DRAWICON(顶背驰,DIF*1.005,2);
DRAWICON(底背驰,DIF*0.995,1);
DRAWTEXT(顶背驰,DIF*1.015,'积顶背'),colorgreen;
DRAWTEXT(底背驰,DIF*0.985,'积底背'),colormagenta;
黄柱是DIF背:DBL OR UBL,NODRAW,coloryellow;
紫柱是柱高背:MDBL OR MUBL,NODRAW,colormagenta;
[url=http://www.70822.com/soft/sort013/sort036/down-170251.html]顶底背离看盘(同花顺公式 副图 源码 测试图)[/url]