通达信立体五彩谷峰主图指标源码
在《喜庆佳节2》指标中,涉及到的《谷峰线指标》如何用更好的发挥指示顶底作用,现实验编辑了一个主图指标《立体五彩谷峰》指标,在指标中将谷峰线的走势大概分为六个区域,50线上下各三个区,也可以把50上的三个区分别定义为,买进(黄色K线},加仓(粉色K线)及警惕区(红色K线)。50线以下可以大概分为减仓区(青色K线)及持币区(蓝色K线)。这样,主图显示的五彩K线即美观又适应,同时也可以提示我们股价的不同走势及应采取的对策。底部的彩条也是同五彩K线相对应,提示起到提示作用。望能对你更好的判断顶底起到一定的帮助作!!!
立体五彩谷峰主图指标源码:
A4:=MA(CLOSE,20);
A5:=(CLOSE MA(CLOSE,5));
A6:=(MA(CLOSE,5) MA(CLOSE,10));
A7:=(CLOSE MA(CLOSE,10));
A8:=(MA(CLOSE,5) MA(CLOSE,20));
A9:=(CLOSE MA(CLOSE,20));
A10:=REF(A4,1);
A11:=(A4 A10);
AVX:=(((((IF(A5,10,(0 - 10)) + IF(A6,10,(0 - 10))) + IF(A7,10,(0 -10))) +
IF(A8,10,(0 - 10))) + IF(A9,10,(0 - 10))) + IF(A11,10,(0 -10)))+50,COLORFF00FF;
AAB:= AVX
BBBB:= AVX =70 AND AVX
DDB:= AVX =50 AND AVX
EEB:=AVX 50 AND AVX
FFB:=AVX
STICKLINE(AAB,C,O,3.4,0),COLOR000088;
STICKLINE(AAB,C,O,3.0,0),COLOR000099 ;
STICKLINE(AAB,C,O,2.4,0),COLOR0000AA;
STICKLINE(AAB,C,O,2.0,0),COLOR0000BB ;
STICKLINE(AAB,C,O,1.2,0),COLOR0000DD;
STICKLINE(AAB,C,O,0.6,0),COLOR0000EE;
STICKLINE(AAB,H,L,0,0),COLOR0000FF;
STICKLINE(BBBB,C,O,3.4,0),COLOR880088;
STICKLINE(BBBB,C,O,3.0,0),COLOR990099;
STICKLINE(BBBB,C,O,2.4,0),COLORAA00AA;
STICKLINE(BBBB,C,O,2.0,0),COLORBB00BB;
STICKLINE(BBBB,C,O,1.2,0),COLORDD00DD;
STICKLINE(BBBB,C,O,0.6,0),COLOREE00EE;
STICKLINE(BBBB,H,L,0,0),COLORFF00FF;
STICKLINE(DDB,C,O,3.4,0),COLOR008888;
STICKLINE(DDB,C,O,3.8,0),COLOR00AA99;
STICKLINE(DDB,C,O,2.2,0),COLOR00BBBB;
STICKLINE(DDB,C,O,1.2,0),COLOR00CCDD;
STICKLINE(DDB,C,O,0.6,0),COLOR00EEEE;
STICKLINE(DDB,H,L,0,0),COLOR00EEFF;
STICKLINE(EEB,C,O,3.4,0),COLORAAAA00;
STICKLINE(EEB,C,O,2.8,0),COLORBBBB00;
STICKLINE(EEB,C,O,2.2,0),COLORCCCC00;
STICKLINE(EEB,C,O,1.2,0),COLORDDDD00;
STICKLINE(EEB,C,O,0.6,0),COLOREEEE00;
STICKLINE(EEB,H,L,0,0),COLORFFFF00;
STICKLINE(FFB,C,O,3.4,0),COLOR882200;
STICKLINE(FFB,C,O,2.8,0),COLOR995500;
STICKLINE(FFB,C,O,2.2,0),COLORAA7700;
STICKLINE(FFB,C,O,1.2,0),COLORDD8800;
STICKLINE(FFB,C,O,0.6,0),COLOREE9900;
STICKLINE(FFB,H,L,0,0),COLORFF9900;
底部:LLV(HIGH,30),COLOR00FFFF,LINETHICK1;
超跌:IF(ISLASTBAR,底部,DRAWNULL),COLORRED,LINETHICK2;
STICKLINE(ISLASTBAR ,超跌,超跌,60,0),LINETHICK2,COLORRED;
TT:=IF(ISLASTBAR,240/FROMOPEN,1);
NN:=120;
HH:=HHV(V*TT,NN);
LL:=LLV(V,NN);
最高:=CONST(HH);
最低:=CONST(LL);
最高2:=CONST(HHV(H,NN));
最低2:=CONST(LLV(L,NN));
PP:=IF((最高2*0.9-(最高2-最低2)*0.5) CONST(LLV(L,20)),0.9,IF((最高2*0.9-(最高2-最低2)*0.5) CONST(LLV(L,50)),0.7,0.6)),NODRAW;
RCC1:=最高2*0.9-(最高2-最低2)*PP;
最低3:=MIN(RCC1,最低2);
AAD:=最低3;
DRAWTEXT_FIX(1,0,0.0,0,'★★ 黄色线--底部线★★'),COLORFFFF00;
STICKLINE(AAB,AAD-0.000*AAD,AAD-0.030*AAD,4,0),COLORRED;
STICKLINE(BBBB,AAD-0.000*AAD,AAD-0.030*AAD,4,0),COLORFF00FF;
STICKLINE(DDB,AAD-0.0000*AAD,AAD-0.030*AAD,4,0),COLOR00FFFF;
STICKLINE(EEB,AAD-0.0*AAD,AAD-0.03*AAD,4,0),COLORFFFF00;
STICKLINE(FFB,AAD-0.0*AAD,AAD-0.03*AAD,4,1),COLORFF6600;
DRAWTEXT_FIX(1,0.12,0.90,0,'【谷峰色条】★★ 红色-谷峰线 =90★★粉色--70 =谷峰线 90★★黄色--50 =谷峰线 70★★青色---50 谷峰线 =30 ★★ 蓝色-谷峰线 30★★'),COLOR00FF00;
MA20:MA(CLOSE,20),COLORFFFFFF,LINETHICK3;
IF(MA20 =REF(MA20,1),MA20,DRAWNULL),COLOR0000FF,LINETHICK3;
IF(REF(MA20,1) MA20,MA20,DRAWNULL),COLOR00FF00,LINETHICK3;