通达信K线包含主图指标公式
2020/10/18 18:27:53
KL:=H<=REF(H,1) AND L>=REF(L,1);{K线左包含}
KR:=H>=REF(H,1) AND L<=REF(L,1);{K线右包含}
{定义K线方向}
MA1:MA(CLOSE,3);
XS:=MA1>REF(MA1,1);{K线向上}
XX:=MA1<REF(MA1,1);{K线向下}
{K线向上左包含}
KL1:=IF(KL AND XS,1,0);
B1:='┄';
DRAWTEXT(KL1,REF(H,1),B1),COLORMAGENTA;
DRAWTEXT(KL1,L,B1),COLORMAGENTA;
{K线向上右包含}
KR1:=IF(KR AND XS,1,0);
DRAWTEXT(KR1,H,B1),COLORMAGENTA;
DRAWTEXT(KR1,REF(L,1),B1),COLORMAGENTA;
{K线向下左包含}
KL2:=IF(KL AND XX,1,0);
DRAWTEXT(KL2,H,B1),COLORGREEN;
DRAWTEXT(KL2,REF(L,1),B1),COLORGREEN;
{K线向下右包含}
KR2:=IF(KR AND XX,1,0);
DRAWTEXT(KR2,REF(H,1),B1),COLORGREEN;
DRAWTEXT(KR2,L,B1),COLORGREEN;
投 股票网 www. tou18.cn
股市公式下载推荐