江丰鱼首创新算法九转算法之初步 通达信 主图/副图 源码分享 附图

{九转学习主图源码如下}

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);



未来函数检测结果如下:
该公式包含未来函数:REFX
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股朋指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股朋指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股朋指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图