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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[同花顺] 同花顺多空识别区副图指标 源码


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

同花顺多空识别区副图指标 源码

本指标根据中短标识区域改编
本指标由两种颜色区域分别表示多空走势,帮助大家判断走势。
红色表示走势良好,深绿色表示走势偏空。
加入了macd指标方便看盘。
使用时,请配合其他分析手段效果更佳。

VAR1:=(2*C+(H-L)/2+L+O)/3;
VAR2:=(MA(VAR1,55)-MA(VAR1,13)/3);
VAR3:=MA((VAR1-VAR2)/VAR2,1)*100,colorred,LINETHICK2;
VAR4:=EMA(VAR3,7),COLOR00FFFF,LINETHICK2;
STICKLINE(VAR3>=VAR4,REFDATE(HHV(H,233),DATE),REFDATE(LLV(L,233),DATE),5,0),COLOR000077;
STICKLINE(VAR3<VAR4,REFDATE(HHV(H,233),DATE),REFDATE(LLV(L,233),DATE),5,0),COLOR555500;
DIFIF1:=(EMA(CLOSE,12) - EMA(CLOSE,26))*100/EMA(CLOSE,26);
DEAEA1:=EMA(DIFIF1,9);
MACD1:=2*(DIFIF1-DEAEA1),STICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,3,0),colorred;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,3,0),colorgreen;
STICKLINE(MACD1<MACD2,0,MACD1,3,0),COLORCBCBC0;
STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),colorwhite;
DIFIF1,COLOR33FF33,LINETHICK2;
DEAEA1,coloryellow,LINETHICK2;
MACD:MACD1,NODRAW,colormagenta;
强:IF(DIFIF1>=DEAEA1,DIFIF1,DRAWNULL),colorred,LINETHICK2;
弱:=IF(DEAEA1>=DIFIF1,DEAEA1,DRAWNULL),COLORFF9900,LINETHICK2;
DRAWICON(CROSS(DIFIF1,DEAEA1),DIFIF1+0.1,1);
DRAWICON(CROSS(DEAEA1,DIFIF1),0.4,2);
A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
DRAWTEXT(B1>0,-0.8,'MACD底背'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
DRAWTEXT(B2,-0.6,'KDJ底离'),coloryellow;
A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
DRAWTEXT(B3>0,-0.3,'RSI底离'),colorcyan;
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWTEXT(D1>0,0.4,'MACD顶离'),colorblue;
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWTEXT(D2>0,0.6,'KDJ顶离'),colorligray;
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(D3>0,0.8,'RSI顶离'),colorgreen;
DD:=C=HHV(C,180);
EE:=DEAEA1< REF(DEAEA1,1) AND REF(DEAEA1< REF(DEAEA1,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
上升背离:(CC AND EE)*DEAEA1,COLOR00FFFF;
顶背离:(DD AND EE AND DEAEA1< HHV(DEAEA1,180))*DEAEA1,STICK,LINETHICK3,colorgreen;
FF:=C=LLV(C,180);
GG:= DEAEA1> REF(DEAEA1,1) AND REF(DEAEA1> REF(DEAEA1,1),1)=1;
LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
下降背离:(LL AND GG)*DEAEA1,colormagenta;
底背离:(FF AND GG AND DEAEA1> LLV(DEAEA1,180))*DEAEA1,STICK,LINETHICK3,colorred;
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),color0000ff;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),colorffff00;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),colorff00ff;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),color00ff00;
A1:=100*(EMA(C,12)-EMA(C,26))/EMA(C,26);
A2:=EMA(A1,9);
MACD:=(A1-A2)*2;
XG:MACD>0 AND MACD>REF(MACD,1);
"macd.macd">0;







gd46080

回复

举报

QQ|

GMT+8, 2024-11-17 21:31

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