大智慧买卖四色主图指标公式
2020/9/18 18:35:07
M20:MA(C,20),COLOR0000ff,LINETHICK0; {买卖分水岭}
DRAWTEXTABS(10,5,'▓分水岭MA20: '+NUMTOSTRN(MA(C,20),2)+'元'),Color0000FF,LINETHICK3;
DRAWTEXTABS(10,25,'▓十日内最高价: '+NUMTOSTRN(hhv(H,10),2)+'元'),Color0099FF,LINETHICK3;
DRAWTEXTABS(10,45,'▓十日内最低价: '+NUMTOSTRN(LLV(L,10),2)+'元'),ColorFF9900,LINETHICK3;
DRAWTEXTABS(10,65,'▓六十日最高价: '+NUMTOSTRN(HHV(H,60),2)+'元 ' ),Color00FFFF,LINETHICK3;
DRAWTEXTABS(10,85,'▓六十日最低价: '+NUMTOSTRN(LLV(L,60),2)+'元 ' ),Color00FF00,LINETHICK3;
{乖离止盈止损}
乖离20:=ABS((2*C+H+L)/4-M20)/M20;
乖离线:DMA(C,乖离20),COLORgray;
PARTLINE(乖离线 ,(乖离线>REF(乖离线,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),DOTLINE,LAYER0;
止盈:乖离线*1.06,COLOR00ffff,LINETHICK1; {20天均线乖离+6%}
止损:乖离线*0.94,COLOR00ff00,LINETHICK1; {20天均线乖离-6%}
FILLRGN(止盈,乖离线,止盈>乖离线,RGB(0,0,255)),LAYER5;
FILLRGN(乖离线,止损,乖离线>止损,RGB(0,0,155)),LAYER5;
止盈*1.05,COLOR0077ff; 止损*0.95,COLORff9900;
FILLRGN(止盈,止盈*1.05,止盈<止盈*1.05,RGB(100,0,100)),LAYER7;
FILLRGN(止损,止损*0.95,止损>止损*0.95,RGB(0,80,0)),LAYER7;
{成本5}
Y5:CYC(5),COLORFFFFFF,LINETHICK1;
PARTLINE(Y5 ,(Y5>REF(Y5,1))-1,rgb(0,155,255),1,rgb(255,200,0) ),LINETHICK3,LAYER0;
{RSI=80}
LC:=REF(C,1);
RSI:((SMA(MAX((C - LC),0),3,1) / SMA(ABS((C - LC)),3,1)) * 100),LINETHICK0;
DRAWTEXT(CROSS(RSI,80) ,high*1.01,'RSI.'+NUMTOSTRN(RSI,0)+''),COLOR00ffFF,ALIGN1,LINETHICK1;
{www.tou18.cn 投股票网_大智慧股票指标公式}
DRAWTEXT(DISPSTATUS=2,止盈*1.05,'【RSI:'+NUMTOSTRN(RSI,0)+'】'),COLOR0099FF,LINETHICK3,ALIGN1;
p:=BARSSINCE(DISPSTATUS=1)+1;
E:llvall(llv(l,p))*0.98;
{成本}
成本:=SMA(COST(97),3,1);
成本R:=(成本-REF(成本,1))*4;
STICKLINE(成本R>0,E+成本R,E,6,0),Color0000FF;
STICKLINE(成本R<0,E-成本R,E,6,0),ColorFF9900;;
{换手牛熊}
换手C:=SMA(DMA(C,VOL/CAPITAL),3,1);
换手R:=(换手C-REF(换手C,1))*6;
STICKLINE(换手R>0,E-换手R,E,6,0),Color0598FF;
STICKLINE(换手R<0,E+换手R,E,6,0),Color00FF00;
{K线}
STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),colorred;
STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),colorcyan;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00BB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR00CC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00EE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000088;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR0000AA;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR0000BB;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000EE;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000FF;
投 股票网 www. tou18.cn
股市公式下载推荐