股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[同花顺] 同花顺背离集合 顶底背离副图指标


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-29 17:45:51
同花顺背离集合 顶底背离副图指标介绍

同花顺背离集合 顶底背离副图指标

将macd,kdj,rsi三个指标的顶底背离放在一个图里,方便看盘。

A1:=BARSLAST(REF(CROSS("macd.diff"(12,26,9),"MACD.dea"(12,26,9)),1));
B1:=REF(C,A1+1)>C AND REF("macd.diff"(12,26,9),A1+1)<"macd.diff"(12,26,9) AND CROSS("macd.diff"(12,26,9),"macd.dea"(12,26,9));
MACD底背离:=FILTER(B1>0,5);
STICKLINE(MACD底背离,0,0.75,3,0),colorgreen;
DRAWTEXT(MACD底背离,0.57,'MACD底背离'),colorgreen;
A2:=BARSLAST(REF(CROSS("kdj.k"(9,3,3),"KDJ.d"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("kdj.k"(9,3,3),A2+1)<"kdj.k"(9,3,3) AND CROSS("kdj.k"(9,3,3),"kdj.d"(9,3,3));
KDJ底背离:=FILTER(B2>0,5);
STICKLINE(KDJ底背离,0,1,3,0),coloryellow;
DRAWTEXT(KDJ底背离,0.80,'KDJ底背离'),coloryellow;
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
RSI底背离:=FILTER(B3>0,5);
STICKLINE(RSI底背离,0,0.5,3,0),COLORFFCC66;
DRAWTEXT(RSI底背离,0.25,'RSI底背离'),COLORFFCC66;
2,colorred;
C1:=BARSLAST(REF(CROSS("macd.dea"(12,26,9),"macd.diff"(12,26,9)),1));
D1:=REF(C,C1+1)<C AND REF("macd.diff"(12,26,9),C1+1)>"macd.diff"(12,26,9) AND CROSS("macd.dea"(12,26,9),"macd.diff"(12,26,9));
MACD顶背离:=FILTER(D1>0,5);
STICKLINE(MACD顶背离,2,1.25,3,0),COLOR0066FF;
DRAWTEXT(MACD顶背离,1.47,'MACD顶背离'),COLOR0066FF;
C2:=BARSLAST(REF(CROSS("kdj.d"(9,3,3),"kdj.k"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("kdj.k"(9,3,3),C2+1)>"kdj.k"(9,3,3) AND CROSS("kdj.d"(9,3,3),"kdj.k"(9,3,3));
KDJ顶背离:=FILTER(D2>0,5);
STICKLINE(KDJ顶背离,2,1,3,0),colorred;
DRAWTEXT(KDJ顶背离,1.2,'KDJ顶背离'),colorred;
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
RSI顶背离:=FILTER(D3>0,5);
STICKLINE(RSI顶背离,2,1.5,3,0),COLORFF00FF;
DRAWTEXT(RSI顶背离,1.75,'RSI顶背离'),COLORFF00FF;
JH:=VOL*CLOSE;
JHO:=SUM(JH,2)/SUM(VOL,2);
JH0:=EMA(JHO,10);
短线:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*20,LINETHICK0,coloryellow;
中线:=(CLOSE-MA(CLOSE,4))/MA(CLOSE,4)*20,LINETHICK0,colorwhite;
红柱持股:SMA(短线,3,1),LINETHICK0,colorred;
蓝柱持币:SMA(中线,3,1),COLORSTICK,COLORFFFF00;
黄柱洗盘对倒:0;
白柱对倒打压:0;
STICKLINE(红柱持股<REF(红柱持股,0.5)AND
红柱持股>0,0,红柱持股,8,0),COLOR0000AA;
STICKLINE(红柱持股<REF(红柱持股,0.5)AND
红柱持股>0,0,红柱持股,7,0),COLOR0000BB;
STICKLINE(红柱持股<REF(红柱持股,0.5)AND
红柱持股>0,0,红柱持股,6,0),COLOR0000CC;
STICKLINE(红柱持股<REF(红柱持股,0.5)AND
红柱持股>0,0,红柱持股,5,0),COLOR0000DD;
STICKLINE(红柱持股<REF(红柱持股,0.5)AND
红柱持股>0,0,红柱持股,4,0),COLOR0000EE;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股>0,0,红柱持股,3,0),COLOR0000FF;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股>0,0,红柱持股,2,1),colorred;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股>0,0,红柱持股,1,0),COLOR00FF00;
STICKLINE(红柱持股>REF(红柱持股,1)AND
红柱持股>0,0,红柱持股,8,0),COLOR0000AA;
STICKLINE(红柱持股>REF(红柱持股,1)AND
红柱持股>0,0,红柱持股,7,0),COLOR0000BB;
STICKLINE(红柱持股>REF(红柱持股,1)AND
红柱持股>0,0,红柱持股,6,0),COLOR0000CC;
STICKLINE(红柱持股>REF(红柱持股,1)AND
红柱持股>0,0,红柱持股,5,0),COLOR0000DD;
STICKLINE(红柱持股>REF(红柱持股,1)AND
红柱持股>0,0,红柱持股,4,0),COLOR0000EE;
STICKLINE(红柱持股>REF(红柱持股,1)AND
红柱持股>0,0,红柱持股,3,0),COLOR0000FF;
STICKLINE(红柱持股>REF(红柱持股,1)AND
红柱持股>0,0,红柱持股,2,0),colorred;
STICKLINE(蓝柱持币<REF(蓝柱持币,1) AND
蓝柱持币>0,0,蓝柱持币,9,0),COLOR0000FF;
STICKLINE(蓝柱持币<REF(蓝柱持币,1) AND
蓝柱持币>0,0,蓝柱持币,7,0),COLOR0033FF;
STICKLINE(蓝柱持币<REF(蓝柱持币,1) AND
蓝柱持币>0,0,蓝柱持币,6,0),COLOR0055FF;
STICKLINE(蓝柱持币<REF(蓝柱持币,1) AND
蓝柱持币>0,0,蓝柱持币,5,0),COLOR0077FF;
STICKLINE(蓝柱持币<REF(蓝柱持币,1) AND
蓝柱持币>0,0,蓝柱持币,4,0),COLOR0099FF;
STICKLINE(蓝柱持币<REF(蓝柱持币,1) AND
蓝柱持币>0,0,蓝柱持币,3,0),COLOR00BBFF;
STICKLINE(蓝柱持币<REF(蓝柱持币,1) AND
蓝柱持币>0,0,蓝柱持币,2,0),COLOR00DDFF;
STICKLINE(蓝柱持币<REF(蓝柱持币,1) AND
蓝柱持币>0,0,蓝柱持币,1,0),COLOR00FFFF;
STICKLINE(红柱持股>REF(红柱持股,0)AND
红柱持股<0,0,红柱持股,8,0),COLORFF0000;
STICKLINE(红柱持股>REF(红柱持股,0)AND
红柱持股<0,0,红柱持股,7,0),COLORFF3300;
STICKLINE(红柱持股>REF(红柱持股,0)AND
红柱持股<0,0,红柱持股,6,0),COLORFF5500;
STICKLINE(红柱持股>REF(红柱持股,0)AND
红柱持股<0,0,红柱持股,5,0),COLORFF7700;
STICKLINE(红柱持股>REF(红柱持股,0)AND
红柱持股<0,0,红柱持股,4,0),COLORFF9900;
STICKLINE(红柱持股>REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,3,0),COLORFFBB00;
STICKLINE(红柱持股>REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,2,0),COLORFFDD00;
STICKLINE(红柱持股>REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,2,1),COLORFF00FF;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,8,0),COLORFF0000;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,8,0),COLORFF0000;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,7,0),COLORFF3300;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,6,0),COLORFF5500;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,5,0),COLORFF7700;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,4,0),COLORFF9900;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,3,0),COLORFFBB00;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,2,0),COLORFFDD00;
STICKLINE(红柱持股<REF(红柱持股,1)AND
红柱持股<0,0,红柱持股,1,0),COLORFFFF00;
STICKLINE(蓝柱持币>REF(蓝柱持币,1)AND
蓝柱持币<0,0,蓝柱持币,10,0),COLOR998800;
STICKLINE(蓝柱持币>REF(蓝柱持币,1)AND
蓝柱持币<0,0,蓝柱持币,7,0),COLORBBAA90;
STICKLINE(蓝柱持币>REF(蓝柱持币,1)AND
蓝柱持币<0,0,蓝柱持币,4,0),COLORDDCC99;
STICKLINE(蓝柱持币>REF(蓝柱持币,1)AND
蓝柱持币<0,0,蓝柱持币,1,0),COLORFFEEBB;
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA/2);
AH:=HHV(MACD,13*1);
AL:=LLV(MACD,13*0.3);
STICKLINE(MACD>0 ,MACD,0,1,0),COLOR0000AA,LINETHICK1;
STICKLINE(MACD<0 ,MACD,0,1,0),COLOR008800,LINETHICK1;
趋势线:=EMA(MACD,34,1);
PARTLINE(趋势线,趋势线>REF(趋势线,1),RGB(255,255,0),趋势线<REF(趋势线,1),RGB(0,80,255)),LINETHICK1;
FILLRGN(趋势线,REF(趋势线,1),趋势线>REF(趋势线,1),RGB(255,255,0),趋势线<=REF(趋势线,1),RGB(0,88,255));
K:=SMA(MACD,2,1);
D:=SMA(K,2,1);
J:SMA(D,2,1);
STICKLINE(MACD>0,0.000001,0.000003,15,0),colorred;
STICKLINE(MACD<0,0.000001,0.000003,15,0),colorgreen;
PARTLINE(K,K>REF(K,1),RGB(255,0,0),K<REF(K,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(D,D>REF(D,1),RGB(255,0,0),D<REF(D,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(J,J>REF(J,1),RGB(255,0,0),J<REF(J,1),RGB(0,255,0)),LINETHICK2;
STICKLINE(REF(MACD,1)<MACD,MACD,REF(MACD,1),7,0),coloryellow;
STICKLINE(MACD=AH,AH,K,8,0),LINETHICK1,colorred;
STICKLINE(REF(MACD,2)>MACD,MACD,REF(MACD,1),8,1),colorgreen;V






gd46113

回复

举报

QQ|

GMT+8, 2024-11-18 01:50

快速回复 返回顶部 返回列表