黄金分割线 自用纯K(通达信公式 主图 源码 测试图)
{黄金分割线}
{自用纯K}N:=34;高1:=REF(HHV(H,N),3);低1:=REF(LLV(L,N),3);H1:=高1-(高1-低1)*0.191;H2:=高1-(高1-低1)*0.382;H3:=高1-(高1-低1)*0.500;H4:=高1-(高1-低1)*0.618;H5:=高1-(高1-低1)*0.809;顶:REFDATE(高1,DATE),COLORRED,DOTLINE;一:REFDATE(H1,DATE),COLORGRAY,DOTLINE;二:REFDATE(H2,DATE),COLORGRAY,DOTLINE;三:REFDATE(H3,DATE),COLORRED,DOTLINE;四:REFDATE(H4,DATE),COLORGRAY,DOTLINE;五:REFDATE(H5,DATE),COLORGRAY,DOTLINE;低:REFDATE(低1,DATE),COLORGREEN,DOTLINE;TT4:=(CURRBARSCOUNT=34);DRAWTEXT(TT4 AND 顶,顶,'---顶---'),COLORCYAN;DRAWTEXT(TT4 AND 一,一,'-0.809-'),COLORCYAN;DRAWTEXT(TT4 AND 二,二,'-0.618-'),COLORCYAN;DRAWTEXT(TT4 AND 三,三,'-0.500-'),COLORCYAN;DRAWTEXT(TT4 AND 四,四,'-0.382-'),COLORCYAN;DRAWTEXT(TT4 AND 五,五,'-0.191-'),COLORCYAN;DRAWTEXT(TT4 AND 低,低,'---底---'),COLORCYAN;{〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓}DRAWTEXT(CURRBARSCOUNT=1,顶,CON2STR(顶,2)),COLORMAGENTA;DRAWTEXT(CURRBARSCOUNT=1,一,CON2STR(一,2)),COLORCYAN;DRAWTEXT(CURRBARSCOUNT=1,二,CON2STR(二,2)),COLORGREEN;DRAWTEXT(CURRBARSCOUNT=1,三,CON2STR(三,2)),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=1,四,CON2STR(四,2)),COLORGREEN;DRAWTEXT(CURRBARSCOUNT=1,五,CON2STR(五,2)),COLORCYAN;DRAWTEXT(CURRBARSCOUNT=1,低,CON2STR(低,2)),COLORMAGENTA;{〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓}{K线------------------------------------------------绿} STICKLINE(CLOSE<=REF(C,1),CLOSE,OPEN,0.1,0),COLOR00CC00; STICKLINE(CLOSE<=REF(C,1),CLOSE,OPEN,3.1,0),COLOR00CC00;STICKLINE(CLOSE<=REF(C,1),CLOSE,OPEN,2.7,0),COLOR003300;STICKLINE(CLOSE<=REF(C,1),CLOSE,OPEN,2.1,0),COLOR006600;STICKLINE(CLOSE<=REF(C,1),CLOSE,OPEN,1.5,0),COLOR009900;STICKLINE(CLOSE<=REF(C,1),CLOSE,OPEN,0.9,0),COLOR00CC00;STICKLINE(CLOSE<=REF(C,1),CLOSE,OPEN,0.3,0),COLOR00FF00;{K线------------------------------------------------红}STICKLINE(CLOSE>REF(C,1),CLOSE,OPEN,0.1,0),COLOR0000FF; STICKLINE(CLOSE>REF(C,1),CLOSE,OPEN,3.1,0),COLOR0000FF;STICKLINE(CLOSE>REF(C,1),CLOSE,OPEN,2.7,0),COLOR000077; STICKLINE(CLOSE>REF(C,1),CLOSE,OPEN,2.1,0),COLOR000099; STICKLINE(CLOSE>REF(C,1),CLOSE,OPEN,1.5,0),COLOR0000BB;STICKLINE(CLOSE>REF(C,1),CLOSE,OPEN,0.9,0),COLOR0000DD;STICKLINE(CLOSE>REF(C,1),CLOSE,OPEN,0.3,0),COLOR0000FF;{〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓}{涨跌停}今涨停:ZTPRICE(REF(C,1),0.1),COLORRED,NODRAW; 今跌停
{〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓};