九转新编,非常高手的公式(通达信公式 副图 源码 测试图)
九转新编指标(通达信公式 副图 源码 测试图)
MMM:=CURRBARSCOUNT<90;
{========}周期类型:=PERIOD;WWW2:=IF(周期类型=5,'周 ','月 ');DRAWRECTREL(225,0,250,1000,RGB(50,80,50));DRAWRECTREL(230,0,245,1000,RGB(20,50,20));DRAWTEXT_FIX(C>0,0.234,0.15, 0,'个 '),COLORWHITE;DRAWTEXT_FIX(C>0,0.234,0.33, 0,'股 '),COLORWHITE;DRAWTEXT_FIX(C>0,0.234,0.51, 0,WWW2),COLORWHITE;DRAWTEXT_FIX(C>0,0.234,0.69, 0,'线 '),COLORWHITE;DRAWRECTREL(978,0,1000,1000,RGB(50,80,50));DRAWRECTREL(981,0,997,1000,RGB(20,50,20));DRAWTEXT_FIX(C>0,0.985,0.20, 0,'好 '),COLORWHITE;DRAWTEXT_FIX(C>0,0.985,0.50, 0,'参 '),COLORWHITE;DRAWTEXT_FIX(C>0,0.985,0.80, 0,'谋 '),COLORWHITE;{==============内外盘================}DRAWRECTREL(0,0,225,1000,RGB(50,78,50));{左上横色彩};DRAWRECTREL(5,50,220,950,RGB(50,78,50));{左上横色彩};{=====个股K线=========}定位A:=93;根数A:=27;ZQZ:=TOTALBARSCOUNT;ZQ1:=BARSCOUNT(C);ZH:=ISLASTBAR;N1:=ZQZ-ZQ1;{周K线显示开始位置}HH1:=IF(周期类型=6,FSKY.ZH#MONTH,IF(周期类型=5,FSKY.ZH#WEEK,IF(周期类型=4,FSKY.ZH#DAY,DRAWNULL))),LINETHICK;LL1:=IF(周期类型=6,FSKY.ZL#MONTH,IF(周期类型=5,FSKY.ZL#WEEK,IF(周期类型=4,FSKY.ZL#DAY,DRAWNULL))),LINETHICK;CAC1:=IF(周期类型=6,FSKY.ZC#MONTH,IF(周期类型=5,FSKY.ZC#WEEK,IF(周期类型=4,FSKY.ZC#DAY,DRAWNULL))),LINETHICK;OO1:=IF(周期类型=6,FSKY.ZO#MONTH,IF(周期类型=5,FSKY.ZO#WEEK,IF(周期类型=4,FSKY.ZO#DAY,DRAWNULL))),LINETHICK;QA1:=IF(周期类型=6,FSKY.DT1#MONTH,IF(周期类型=5,FSKY.DT1#WEEK,IF(周期类型=4,FSKY.DT1#DAY,DRAWNULL))),LINETHICK;QA2:=QA1>REF(QA1,1);{分K线更后}QA3:=SUM(QA2,0);{当前分K线位置}QA4:=CONST(QA3)-QA3;SAAU:=IF(ZH,0,SUMBARS(QA2,N1-QA4)-1);CA1:=REF(CAC1,SAAU);OA1:=REF(OO1,SAAU);HA1:=REF(HH1,SAAU);LA1:=REF(LL1,SAAU);ARC:=REFX(CA1,定位A);ARO:=REFX(OA1,定位A);ARH:=REFX(HA1,定位A);ARL:=REFX(LA1,定位A);AJ4:=ARC>=REF(ARC,1);AJ5:=ARC<REF(ARC,1);过滤A:=ARH=REF(ARH,1) AND ARL=REF(ARL,1);WA:=N1<定位A+根数A AND 过滤A=0;{周K线显示区域}高值1:=CONST(HHV(ARH,120));低值1:=CONST(LLV(ARL,120));偏值1:=(高值1-低值1);调高低:=90;高A1:=IF(WA ,调高低/(偏值1/(ARH-低值1)),DRAWNULL);开1:=IF(WA ,调高低/(偏值1/(ARO-低值1)),DRAWNULL);低1:=IF(WA,调高低/(偏值1/(ARL-低值1)),DRAWNULL);收1:=IF(WA,调高低/(偏值1/(ARC-低值1)),DRAWNULL);STICKLINE(WA AND AJ4,高A1,低1,0,0),COLORRED;STICKLINE(WA AND AJ5,高A1,低1,0,0),COLORGREEN;STICKLINE(WA AND AJ4,收1,开1,2,0),COLORRED;STICKLINE(WA AND AJ5,收1,开1,2,0),COLORGREEN;{=====色条=====}DRAWRECTREL(250,0,978,190,RGB(50,80,50));DRAWRECTREL(250,270,978,460,RGB(50,80,50));DRAWRECTREL(250,540,978,730,RGB(50,80,50));DRAWRECTREL(250,820,978,1000,RGB(50,80,50));{==========个股九转============}AP1:=C<=REF(C,4) OR C<=REF(L,4);条约A8:=AP1 AND REF(AP1=0,8) AND REF(AP1=1,1) AND EVERY(AP1,8); 条约A9:=AP1 AND REF(AP1=0,9) AND REF(AP1=1,1) AND EVERY(AP1,9); BA1:=C>=REF(C,4) OR C>=REF(H,4);条约BA8:=BA1 AND REF(BA1=0,8) AND REF(BA1=1,1) AND EVERY(BA1,8); 条约BA9:=BA1 AND REF(BA1=0,9) AND REF(BA1=1,1) AND EVERY(BA1,9); XXX:=条约A8 OR 条约BA8;DRAWNUMBER( XXX=0 AND REFX(XXX=1,1) AND MMM ,68.3,7),COLORWHITE;DRAWNUMBER( XXX=0 AND REFX(XXX=0,1) AND REFX(XXX=1,2)AND MMM ,68.3,6),COLORWHITE;DRAWNUMBER( XXX=0 AND REFX(XXX=0,2) AND REFX(XXX=1,3)AND MMM ,68.3,5),COLORWHITE;DRAWNUMBER( XXX=0 AND REFX(XXX=0,3) AND REFX(XXX=1,4)AND MMM ,68.3,4),COLORWHITE;DRAWNUMBER( XXX=0 AND REFX(XXX=0,4) AND REFX(XXX=1,5)AND MMM ,68.3,3),COLORWHITE;DRAWNUMBER( XXX=0 AND REFX(XXX=0,5) AND REFX(XXX=1,6)AND MMM ,68.3,2),COLORWHITE;DRAWNUMBER( XXX=0 AND REFX(XXX=0,6) AND REFX(XXX=1,7)AND MMM ,68.3,1),COLORWHITE;DRAWNUMBER(条约A8 AND MMM ,68.3,8),COLORWHITE;DRAWNUMBER(条约A9 AND MMM,68.3,9),COLORWHITE;DRAWNUMBER(条约BA8 AND MMM,68.3,8),COLORWHITE;DRAWNUMBER(条约BA9 AND MMM,68.3,9),COLORWHITE;STICKLINE(条约A8 OR 条约A9 AND MMM,57,58,3,0),COLORRED;STICKLINE(条约BA8 OR 条约BA9 AND MMM,71,70,3,0),COLORGREEN;{=====大盘九转=====}CP1:="999999$C"<=REF("999999$C",4) OR "999999$C"<=REF("999999$L",4);条约AF8:=CP1 AND REF(CP1=0,8) AND REF(CP1=1,1) AND EVERY(CP1,8); 条约AF9:=CP1 AND REF(CP1=0,9) AND REF(CP1=1,1) AND EVERY(CP1,9); DA1:="999999$C">=REF("999999$C",4) OR "999999$C">=REF("999999$H",4);条约BF8:=DA1 AND REF(DA1=0,8) AND REF(DA1=1,1) AND EVERY(DA1,8); 条约BF9:=DA1 AND REF(DA1=0,9) AND REF(DA1=1,1) AND EVERY(DA1,9); XXXA:=条约AF8 OR 条约BF8;DRAWNUMBER( XXXA=0 AND REFX(XXXA=1,1) AND MMM,40,7),COLORWHITE;DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,1) AND REFX(XXXA=1,2) AND MMM,40,6),COLORWHITE;DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,2) AND REFX(XXXA=1,3) AND MMM,40,5),COLORWHITE;DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,3) AND REFX(XXXA=1,4) AND MMM,40,4),COLORWHITE;DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,4) AND REFX(XXXA=1,5) AND MMM,40,3),COLORWHITE;DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,5) AND REFX(XXXA=1,6) AND MMM,40,2),COLORWHITE;DRAWNUMBER( XXXA=0 AND REFX(XXXA=0,6) AND REFX(XXXA=1,7) AND MMM,40,1),COLORWHITE;DRAWNUMBER(条约AF8 AND MMM,40,8),COLORWHITE;DRAWNUMBER(条约AF9 AND MMM,40,9),COLORWHITE;DRAWNUMBER(条约BF8 AND MMM,40,8),COLORWHITE;DRAWNUMBER(条约BF9 AND MMM,40,9),COLORWHITE;STICKLINE(条约AF8 OR 条约AF9 AND MMM,31,32,3,0),COLORRED;STICKLINE(条约BF8 OR 条约BF9 AND MMM,42,41,3,0),COLORGREEN;{========个股红==========}VARX1:=(2*CLOSE+HIGH+LOW)/4;VARX2:=LLV(LOW,5);VAR3:=HHV(HIGH,5);VAR4:=EMA((VARX1-VARX2)/(VAR3-VARX2)*100,5);MAA1:=MA(VAR4,2);红:=VAR4>=MAA1;个股红:=MA(C,3)>=REF(MA(C,3),1),COLORGREEN,NODRAW;SAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2)); SAR2:=(REF(SAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); SAR3:=(REF(SAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); SAR4:=(REF(SAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); SAR5:=(REF(SAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); SAR6:=(REF(SAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); SAR7:=(REF(SAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); SAR8:=(REF(SAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); SAR9:=(REF(SAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); SARA:=(REF(SAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); SARB:=(REF(SARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); SARC:=(REF(SARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); 红色持股:=SAR1 OR SAR2 OR SAR3 OR SAR4 OR SAR5 OR SAR6 OR SAR7 OR SAR8 OR SAR9 OR SARA OR SARB OR SARC,COLOR0000FF,NODRAW; 红色:=红 OR 个股红 OR 红色持股 AND MMM ;STICKLINE(红色 ,82,99,3,0),COLORRED;{========大盘红==========}CC:="999999$CLOSE";KK:=MA(CC,3);大盘红:=KK>REF(KK,1),COLORGREEN,NODRAW;大盘绿:=KK<REF(KK,1),COLORGREEN,NODRAW;大盘绿2次数:=CONST(BARSLAST(大盘红)*CONST(大盘绿)),COLORGREEN,NODRAW;大盘天:=CURRBARSCOUNT<=大盘绿2次数,COLORGREEN,NODRAW;STICKLINE(大盘红 AND MMM ,0,15,3,0),COLORRED;WWW70822COM