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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 布林副图(源码 副图 贴图)


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-10 21:50:32
布林副图(源码 副图 贴图)介绍

布林副图(源码 副图 贴图)

源码如下:
中轨 :MA(CLOSE,20),COLORRED,LINETHICK2;
上轨:中轨+1*STD(CLOSE,20),COLORWHITE;
下轨:中轨-1*STD(CLOSE,20),COLOR00FF00;
上上轨:中轨+2*STD(CLOSE,20),COLORYELLOW;
下下轨:中轨-2*STD(CLOSE,20),COLORFF00FF;
VAR1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),25);
VAR2:=HIGH-REF(HIGH,1);
VAR3:=REF(LOW,1)-LOW;
VAR4:=SUM(IF(VAR2>0 AND VAR2>VAR3,VAR2,0),25);
VAR5:=SUM(IF(VAR3>0 AND VAR3>VAR2,VAR3,0),25);
VAR6:=VAR4*100/VAR1;
VAR7:=VAR5*100/VAR1;
VAR8:=MA(ABS(VAR7-VAR6)/(VAR7+VAR6)*100,15);
VAR9:=(VAR8+REF(VAR8,15))/2;
DRAWICON(CROSS(EMA(C,5),EMA(C,10)),L*0.98,1);
DRAWICON(CROSS(EMA(C,3),EMA(C,07)),L*0.98,9);
DRAWTEXT(CROSS(EMA(C,3),EMA(C,07)),L*0.95,'←买');
S:=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);
STICKLINE(CROSS(78.89,S),H+1.1,H,0.2,1),COLORGRAY;
DRAWTEXT(CROSS(78.89,S),H+1.1,'★'),COLORFFFF00;
DRAWICON(CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1)) ,LOW*0.98,1);
DRAWICON(CROSS(REF(ZIG(3,10),1),ZIG(3,10)) ,HIGH*1.02,2);
DRAWTEXT(REF(CLOSE,2)/REF(OPEN,2)<0.95 AND
REF(C,2)<REF(C,3) AND REF(OPEN,1)<REF(CLOSE,2) AND
REF(CLOSE,1)>REF(CLOSE,2) AND
REF(CLOSE,1)>(REF(CLOSE,2)+REF(OPEN,2))/2 AND
CLOSE>REF(CLOSE,1) AND
LLV(LOW,13)=REF(LOW,1),LOW*0.96,'上升'), COLORYELLOW;
DRAWTEXT(REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND
REF(OPEN,1) < REF(CLOSE,2) AND
ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 AND
CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2),LOW*0.96 ,'进场' ) ,COLORYELLOW;
DRAWICON(REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND
REF(OPEN,1) < REF(CLOSE,2) AND
ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 AND
CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2),C,1);
DRAWTEXT(VAR1,L*0.97,'短买'),COLORYELLOW;
DRAWICON(CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O,L*0.98,26)
;
DRAWTEXT(CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O,L*0.97,'加仓'),
COLORMAGENTA;
STICKLINE(C>REF(C,1),H,L,0,0),COLOR0099FF;
STICKLINE(C>REF(C,1),C,O,3.2,0),COLOR0000AA;
STICKLINE(C>REF(C,1),C,O,2.7,0),COLOR0000DD;
STICKLINE(C>REF(C,1),C,O,2.1,0),COLOR0022FF;
STICKLINE(C>REF(C,1),C,O,1.5,0),COLOR0066FF;
STICKLINE(C>REF(C,1),C,O,0.9,0),COLOR0099FF;
STICKLINE(C>REF(C,1),C,O,0.3,0),COLOR00DDFF;
STICKLINE(C<REF(C,1),H,L,0,1),COLORFF8800;
STICKLINE(C<REF(C,1),C,O,3.2,0),COLOR990000;
STICKLINE(C<REF(C,1),C,O,2.7,0),COLORCC0000;
STICKLINE(C<REF(C,1),C,O,2.1,0),COLORFF4400;
STICKLINE(C<REF(C,1),C,O,1.5,0),COLORFF8800;
STICKLINE(C<REF(C,1),C,O,0.9,0),COLORFFCC00;
STICKLINE(C<REF(C,1),C,O,0.3,0),COLORFFDD00;
STICKLINE(C=REF(C,1),H,L,0,1),COLORFFFFFF;
STICKLINE(C=REF(C,1),C,O,3.2,0),COLOR555555;
STICKLINE(C=REF(C,1),C,O,2.7,0),COLOR777777;
STICKLINE(C=REF(C,1),C,O,2.1,0),COLOR999999;
STICKLINE(C=REF(C,1),C,O,1.5,0),COLORBBBBBB;
STICKLINE(C=REF(C,1),C,O,0.9,0),COLORDDDDDD;
STICKLINE(C=REF(C,1),C,O,0.3,0),COLORFFFFFF;
DRAWICON((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.98,1) ;
DRAWICON((ZIG(3,5)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.01,2);
X1:=(C+L+H)/3;BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),
EMA8,'∠45'),COLORYELLOW;
DRAWTEXT(VAR1,L*0.97,'短买'),COLORYELLOW;
DRAWICON(CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O,L*0.98,26)
;
DRAWTEXT(CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O,L*0.97,'加仓'),
COLORMAGENTA;
AA1:=AMOUNT/V;
BB1:=L<AA1*0.9;
CC1:=(C-REF(C,1))/REF(C,1)*100>1.2;
DD1:=L<MA(C,5)*0.921;
EE1:=V<MA(V,5)*1.5;
FF1:=BB1 AND CC1 AND DD1 AND EE1;
DRAWTEXT(FF1,(LOW* 0.97),'老鼠仓'),COLOR4080FF;
VAR31:=((((HHV((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),4)<0) AND ((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2)>REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1))) AND (REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),1)<REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2))) AND (REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),2)<REF((((EMA(DCLOSE,12)-EMA(DCLOSE,26))-(EMA((EMA(DCLOSE,12)-EMA(DCLOSE,26)),9)))*2),3)));
DRAWTEXT(CROSS(MA(C,3),MA(C,9)) AND C>=REF(C,1) AND C>O,L*1.00,'←加仓!'),COLORMAGENTA;
QC:=REF(CLOSE,1);
{MA10:MA(CLOSE,10);}
RSV:=(((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*100);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
YX:=((CLOSE>QC) AND C>O);
KK:=HHV(K,5);
HH:=HHV(D,5);
D1:=REF(D,1);
K1:=REF(K,1);
DRAWTEXT((((D1<30) AND CROSS(K,D)) AND YX),(LOW * 0.96),'←短买!'),COLORYELLOW;
{DRAWTEXT(((HH>70) AND CROSS(D,K)),(LOW * 1.13),'←减仓!'),COLORFF00CC;};


 




 



gd12142

回复

举报

QQ|

GMT+8, 2024-11-20 16:53

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