通达信轨道布林主图指标公式

[复制链接]
查看122 | 回复0 | 2021-8-19 13:21:33 | 显示全部楼层 |阅读模式

以下是通达信轨道布林主图指标公式(无源码的请下载附件导入)

JL01:=MA(C,3);
 LJL07:=(3*C+L+O+H)/6;
牛线:(20*LJL07+19*REF(LJL07,1)+18*REF(LJL07,2)+17*REF(LJL07,3)+16*REF(LJL07,4)+15*REF(LJL07,5)+14*REF(LJL07,6)+13*REF(LJL07,7)+12*REF(LJL07,8)+11*REF(LJL07,9)+10*REF(LJL07,10)+9*REF(LJL07,11)+8*REF(LJL07,12)+7*REF(LJL07,13)+6*REF(LJL07,14)+5*REF(LJL07,15)+4*REF(LJL07,16)+3*REF(LJL07,17)+2*REF(LJL07,18)+REF(LJL07,20))/210,COLORRED;
马线:MA(牛线,6),COLORYELLOW,LINETHICK4,POINTDOT;
上限:马线+3*STD(CLOSE,20),COLORMAGENTA,CROSSDOT;
下限:马线-2.9*STD(CLOSE,20),COLORGREEN,CROSSDOT;
买:马线-2*STD(CLOSE,20),LINETHICK2,COLORWHITE;
卖:马线+2*STD(CLOSE,20),LINETHICK2,COLORYELLOW;
等待:IF(JL01<=牛线,马线,DRAWNULL),COLORRED,LINETHICK4,POINTDOT;
 VAR1:=(C>REF(C,1) AND C>REF(C,2));
 VAR2:=(REF(VAR1,1) AND C<=REF(C,1) AND C>=REF(C,2));
 VAR3:=(REF(VAR2,1) AND C>=REF(C,1) AND C<=REF(C,2));
 VAR4:=(REF(VAR3,1) AND C<=REF(C,1) AND C>=REF(C,2));
 VAR5:=(REF(VAR4,1) AND C>=REF(C,1) AND C<=REF(C,2));
 VAR6:=(REF(VAR5,1) AND C<=REF(C,1) AND C>=REF(C,2));
 VAR7:=(REF(VAR6,1) AND C>=REF(C,1) AND C<=REF(C,2));
 VAR8:=(REF(VAR7,1) AND C<=REF(C,1) AND C>=REF(C,2));
 VAR9:=(REF(VAR8,1) AND C>=REF(C,1) AND C<=REF(C,2));
 VARA:=(REF(VAR9,1) AND C<=REF(C,1) AND C>=REF(C,2));
 VARB:=(REF(VARA,1) AND C>=REF(C,1) AND C<=REF(C,2));
 VARC:=(REF(VARB,1) AND C<=REF(C,1) AND C>=REF(C,2));
持股:IF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,牛线,DRAWNULL),COLORRED,LINETHICK1;
 VARD:=(C<REF(C,1) AND C<REF(C,2));
 VARE:=(REF(VARD,1) AND C>=REF(C,1) AND C<=REF(C,2));
 VARF:=(REF(VARE,1) AND C<=REF(C,1) AND C>=REF(C,2));
 VAR10:=(REF(VARF,1) AND C>=REF(C,1) AND C<=REF(C,2));
 VAR11:=(REF(VAR10,1) AND C<=REF(C,1) AND C>=REF(C,2));
 VAR12:=(REF(VAR11,1) AND C>=REF(C,1) AND C<=REF(C,2));
 VAR13:=(REF(VAR12,1) AND C<=REF(C,1) AND C>=REF(C,2));
 VAR14:=(REF(VAR13,1) AND C>=REF(C,1) AND C<=REF(C,2));
 VAR15:=(REF(VAR14,1) AND C<=REF(C,1) AND C>=REF(C,2));
 VAR16:=(REF(VAR15,1) AND C>=REF(C,1) AND C<=REF(C,2));
 VAR17:=(REF(VAR16,1) AND C<=REF(C,1) AND C>=REF(C,2));
 VAR18:=(REF(VAR17,1) AND C>=REF(C,1) AND C<=REF(C,2));
持币:IF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,牛线,DRAWNULL),COLORGREEN,LINETHICK1;
 GJ:=(C+H+L+O)/4;
明日阻力:=L+(GJ-L)+(C-L);
明日支撑:=L+(C-GJ);
今日支撑:REF(明日支撑 , 1),COLORMAGENTA,NODRAW;
今日阻力:REF(明日阻力 , 1),COLORYELLOW,NODRAW;
 STICKLINE(C>=O,C,O,3,0),COLOR000045;
 STICKLINE(C>=O,C,O,2.5,0),COLOR000065;
 STICKLINE(C>=O,C,O,2,0),COLOR000085;
 STICKLINE(C>=O,C,O,1.5,0),COLOR0000A5;
 STICKLINE(C>=O,C,O,1,0),COLOR0000C5;
 STICKLINE(C>=O,C,O,0.5,0),COLOR0000E5;
 STICKLINE(C>=O,H,L,0,0),COLOR0000F5;
 STICKLINE(C<O,C,O,3,0),COLOR353500;
 STICKLINE(C<O,C,O,2.5,0),COLOR454500;
 STICKLINE(C<O,C,O,2,0),COLOR555500;
 STICKLINE(C<O,C,O,1.5,0),COLOR656500;
 STICKLINE(C<O,C,O,1,0),COLOR757500;
 STICKLINE(C<O,C,O,0.5,0),COLOR858500;
 STICKLINE(C<O,H,L,0,0),COLOR959500;
 A007:=(HIGH+LOW+CLOSE)/3;
 
 A008:=((A007-MA(A007,14))/(0.015*AVEDEV(A007,14)))/2;
 A009:=(A008+(EMA(((0-(100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))))+100)/100,3)*200-100))/2;
 A010:=A009-REF(A009,14);
 A011:=A009-REF(A009,26);
 A012:=(A009+A010+A011)/3;
 KKM:=EMA(A012,4);
 A013:=HHV(HIGH,34);
 A014:=(2*CLOSE+HIGH+LOW)/4;
 A015:=LLV(LOW,34);
 A016:=EMA(((A014-A015)/(A013-A015))*100,13);
 A017:=EMA(0.667*REF(A016,1)+0.333*A016,2);
 KKMD:=A016-A017>1 AND A016<30 AND A017<30;
 KKML:=A016-A017<0 AND A016>80 AND A017>80 AND REF(A016-A017,1)>0;
 KKMQ:=COUNT(A016-A017>0,2)=2;
 KKAL:=(A016-A017)<0;
 DRAWTEXT(FILTER(KKMD,30),L,'最佳买入时机★'),COLOR00FFFF;
 DRAWTEXT(FILTER(KKML,30),H,'最佳卖出时机'),COLORFFFF00;
 DRAWTEXT(FILTER(KKMQ,30),C,'持仓区'),COLOR00FF00;
 DRAWTEXT(FILTER(KKAL,30),H,'空仓区'),COLORFF8080;
 DRAWTEXT(FILTER(CLOSE/REF(CLOSE,1)>INDEXC/REF(INDEXC,1),30),L*0.95,'该股强于大盘'),COLORFF00FF;
 DRAWTEXT(CROSS(MA(CLOSE,5),MA(CLOSE,10)),L*0.92,'可出手'),COLORFF00FF;
 DRAWTEXT(CROSS(MA(CLOSE,10),MA(CLOSE,5)),H*1.08,'收手了'),COLORFF0000;
 DRAWTEXT(FILTER(KKM>EMA(KKM,4) AND KKM>REF(KKM,1),30),L*0.98,'快速介入');
DRAWTEXT(FILTER(KKM<EMA(KKM,4) AND KKM<REF(KKM,1),30),H*1.02,'风险较大');
DRAWTEXT(FILTER(KKM>EMA(KKM,4) AND KKM<REF(KKM,1),30),H,'休息观望~'),COLORAA8800;
 DRAWTEXT(FILTER(KKM<EMA(KKM,4) AND KKM>REF(KKM,1),30),L,'有防御能力'),COLORAA00AA;

854155909.png

854155909.png

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则