【资料名称】:通达信趋势盯盘主图指标 源码介绍【资料描述】:
通达信趋势盯盘主图指标 源码
{趋势盯盘}
MD:MA(C,20),POINTDOT;
BL1:=POW((C-MD),2);
BL2:=MA(BL1,20);
BL3:=SQRT(BL2);
上轨:MD+2*BL3,COLORYELLOW;
下轨:MD-2*BL3,COLORMAGENTA;
{红色K线持股}
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);
K红色:=VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC;
STICKLINE(K红色,C,REF(C,1),3,1),COLORRED;{K红色持股}
红持股:IF(K红色,C,DRAWNULL),COLORRED,NODRAW;
{青色K线持币}
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);
K青色:=VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18;
STICKLINE(K青色,C,REF(C,1),3,1),COLORCYAN;{K青色持币}
青持币:IF(K青色,C,DRAWNULL),COLORCYAN,NODRAW;
{K黄色买入---青色K线变红色K线买入}
VAR19:=REF(K青色,1) AND VAR1;
{STICKLINE(VAR19,C,REF(C,1),2,0),COLORYELLOW;}{K黄色买入}
买入:IF(VAR19,REF(C,1),DRAWNULL),COLORMAGENTA,NODRAW; {青变红}
{**红卖出---红色K线变青色K线卖出};
VAR20:=REF(K红色,1) AND VARD;
{STICKLINE(VAR20,C,REF(C,1),2,0),COLORMAGENTA;}{**红卖出};
卖出:IF(VAR20,REF(C,1),DRAWNULL),COLORGREEN,NODRAW;{红变青};
gd54485
【下载地址隐藏】: 点:回复可见地址