{九转学习主图源码如下}
SHORT:=12;
LONG:=26;
MID:=9;
HH:=CONST(HHV(H,150));
LL:=CONST(LLV(L,150));
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD:=(DIF-DEA)*2,COLORSTICK;
DIF0:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA0:=EMA(DIF0,MID);
MACD0:=(DIF0-DEA0)*2,COLORSTICK;
MHH:=CONST(HHV(MACD0,150));
MLL:=CONST(LLV(DIF0,150));
PY:=(HH-LL)/2+LL;
BFB:=(HH-LL)/(MHH-MLL);
{WWW.GOODGUPIAO.COM}
DIF1:=DIF0*BFB+PY;
DEA1:=EMA(DIF,MID);
MACD1:=DIF1-DEA1;
STICKLINE(MACD>REF(MACD,1)AND MACD>0,PY,PY+MACD,0.5,1),COLORLIRED;
STICKLINE(MACD<0,PY,PY+MACD,0.5,1),COLORLIGREEN;
{九转算法副图源码如下}
KX:=
TOTALBARSCOUNT-CURRBARSCOUNT+1;
C4:=IF(MOD(KX,4)=1,REFX(C,3),IF(MOD(KX,4)=2,REFX(C,2),IF(MOD(KX,4)=3,REFX(C,1),IF(MOD(KX,4)=0,C,DRAWNULL))));{C4 收盘价的模4计算}
MW:=MOD(KX,4)=0;{MW 模位}
KH4:=IF(MW,HHV(H,4),DRAWNULL);
KO4:=IF(MW,REF(O,3),DRAWNULL);
KL4:=IF(MW,LLV(L,4),DRAWNULL);
KC4:=IF(MW,C,DRAWNULL);
DRAWKLINE(KH4,KO4,KL4,KC4);
{WWW.GOODGUPIAO.COM}
QD:=CONST(LLVBARS(L,40));
ZXH:= QD-CURRBARSCOUNT;
KC4Z0:=IF(CURRBARSCOUNT<=QD AND QD>=9*4,CONST(REF(KC4,9*4)),DRAWNULL);
KC4Z1:=IF(CURRBARSCOUNT<=QD AND QD>=8*4,CONST(REF(KC4,8*4)),DRAWNULL);
KC4Z2:=IF(CURRBARSCOUNT<=QD AND QD>=7*4,CONST(REF(KC4,7*4)),DRAWNULL);
KC4Z3:=IF(CURRBARSCOUNT<=QD AND QD>=6*4,CONST(REF(KC4,6*4)),DRAWNULL);
KC4Z4:=IF(CURRBARSCOUNT<=QD AND QD>=5*4,CONST(REF(KC4,5*4)),DRAWNULL);
KC4Z5:=IF(CURRBARSCOUNT<=QD AND QD>=4*4,CONST(REF(KC4,4*4)),DRAWNULL);
KC4Z6:=IF(CURRBARSCOUNT<=QD AND QD>=3*4,CONST(REF(KC4,3*4)),DRAWNULL);
KC4Z7:=IF(CURRBARSCOUNT<=QD AND QD>=2*4,CONST(REF(KC4,2*4)),DRAWNULL);
KC4Z8:=IF(CURRBARSCOUNT<=QD AND QD>=1*4,CONST(REF(KC4,1*4)),DRAWNULL);
KC4Z9:=IF(CURRBARSCOUNT<=QD AND QD>=0*4,CONST(REF(KC4,0*4)),DRAWNULL);
ZS:=IF(KC4Z9<KC4Z8 OR KC4Z8<KC4Z7 OR KC4Z7<KC4Z6 OR KC4Z6<KC4Z5 OR KC4Z5<KC4Z4 OR KC4Z4<KC4Z3 OR KC4Z3<KC4Z2 OR KC4Z2<KC4Z1 OR KC4Z1<KC4Z0,0,1);
{WWW.GOODGUPIAO.COM}
ZXH0:=IF(MOD (INTPART(ZXH/4) ,9)=0,9, MOD (INTPART(ZXH/4) ,9));
DRAWNUMBER(ZS=1,KC4, ZXH0);