将大智慧五域主图指标改成通达信的
2020/1/12 18:39:10
公式编写说明:
{均线和成本线}MA1:MA(C,7),colorFFFFFF,LAYER0;MA2:MA(C,89),color00CCFF,LAYER0;MA3:MA(C,344),colorFF00FF;cyc0:MAXCYC,colorff9900;{标志性k线}ZF:=(C-REF(C,1))/REF(C,1)*100; TJ:=ZF>=4 OR ZF<=-4;STICKLINE(TJ AND CLOSE>OPEN,C,o,3,0 ),COLORYELLOW; STICKLINE(TJ AND OPEN>=CLOSE,C,o,3,0 ),COLORYELLOW;k线下限:REF(LOW,BARSLAST(TJ)),LINETHICK0;k线上限:REF(HIGH,BARSLAST(TJ)),LINETHICK0;AA:=IF(REF(H,BARSLAST(TJ))<REF(C,BARSLAST(TJ)+1),REF(C,BARSLAST(TJ)+1),REF(H,BARSLAST(TJ)));CC:=IF(REF(LOW,BARSLAST(TJ))>REF(C,BARSLAST(TJ)+1),REF(C,BARSLAST(TJ)+1),REF(LOW,BARSLAST(TJ)));k线重心AA+CC)/2,LINETHICK0;PARTLINE((AA+CC)/2,BARSLAST(TJ)),COLORBLUE;PARTLINE(REF(LOW,BARSLAST(TJ)),BARSLAST(TJ)),COLORred;PARTLINE(REF(HIGH,BARSLAST(TJ)),BARSLAST(TJ)),COLORYELLOW;{区域之源}区域上限:REF(H,BARSCOUNT(C)-1),COLORRED;区域下限:REF(L,BARSCOUNT(C)-1),COLORGREEN;区域中限区域上限+区域下限)/2,COLORYELLOW;{波段涨跌幅}ZL:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3);F11:=ZIG(3,15);FXx:=IF((F11> REF(F11,1)),5,105);转向:=CROSS(ZL,FXx);高点:=CROSS(fxx,ZL);VERTLINE(转向,1),color00009f;VERTLINE(高点,1),color009f00;DRAWICON(转向,LOW,1),ALIGN1,VALIGN0;DRAWICON(高点,H,2),ALIGN1,VALIGN0;TS:=BARSLAST(转向);波段涨幅:=(C-ref(L,TS+1))/ref(L,TS+1)*100;DRAWTEXTREL(750,30,'波段涨幅:'+INTPART(波段涨幅)+'%'),COLOR0000ff,LINETHICK3;GD:=BARSLAST(高点);波段跌幅:=(C-ref(H,GD+1))/ref(H,GD+1)*100;DRAWTEXTREL(750,100,'波段跌幅:'+INTPART(波段跌幅)+'%'),COLOR00ff00,LINETHICK3;
公式源码回答:
{均线和成本线}
MA1:MA(C,7),COLORFFFFFF;
MA2:MA(C,89),COLOR00CCFF;
MA3:MA(C,344),COLORFF00FF;
CYC0:DMA((C+O)/2,V*100/FINANCE(7)),COLORFF9900;
{标志性K线}
ZF:=(C-REF(C,1))/REF(C,1)*100;
TJ:=ZF>=4 OR ZF<=-4;
STICKLINE(TJ AND CLOSE>OPEN,C,O,1,0 ),COLORYELLOW;
STICKLINE(TJ AND OPEN>=CLOSE,C,O,1,0 ),COLORYELLOW;
K线下限:REF(LOW,BARSLAST(TJ)),NODRAW,COLORMAGENTA;
K线上限:REF(HIGH,BARSLAST(TJ)),NODRAW,COLOR008080;
AA:=IF(REF(H,BARSLAST(TJ))<REF(C,BARSLAST(TJ)+1),
REF(C,BARSLAST(TJ)+1),REF(H,BARSLAST(TJ)));
CC:=IF(REF(LOW,BARSLAST(TJ))>REF(C,BARSLAST(TJ)+1),
REF(C,BARSLAST(TJ)+1),REF(LOW,BARSLAST(TJ)));
K线重心:(AA+CC)/2,NODRAW,COLORBLUE;
IF(BARSLAST(TJ)>=1,K线重心,DRAWNULL),COLORBLUE;
IF(BARSLAST(TJ)>=1,K线下限,DRAWNULL),COLORMAGENTA;
IF(BARSLAST(TJ)>=1,K线上限,DRAWNULL),COLOR008080;
{区域之源}
区域上限:REF(H,BARSCOUNT(C)),COLORRED;
区域下限:REF(L,BARSCOUNT(C)),COLORGREEN;
区域中限:(区域上限+区域下限)/2,COLORYELLOW;
{波段涨跌幅}
ZL:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3);
F11:=ZIG(3,15);
FXX:=IF((F11> REF(F11,1)),5,105);
转向:=CROSS(ZL,FXX);
高点:=CROSS(FXX,ZL);
STICKLINE(转向,MAX(区域下限,HHV(H,120)),MIN(区域下限,LLV(L,120)),0,0),COLOR400080;
STICKLINE(高点,MAX(区域下限,HHV(H,120)),MIN(区域下限,LLV(L,120)),0,0),COLOR008000;
DRAWICON(转向,LOW,5);
DRAWICON(高点,H,6);
TS:=BARSLAST(转向);
波段涨幅:=(C-REF(L,TS+1))/REF(L,TS+1)*100;
GD:=BARSLAST(高点);
波段跌幅:=(C-REF(H,GD+1))/REF(H,GD+1)*100;
DRAWTEXT_FIX(ISLASTBAR,0.8,0.4,0,STRCAT(STRCAT('波段涨幅: ',CON2STR(波段涨幅,2)),'%')),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.8,0.5,0,STRCAT(STRCAT('波段跌幅: ',CON2STR(波段跌幅,2)),'%')),COLORGREEN;
投 股票网 www.t ou18.cn
股市公式下载推荐