编写收盘价跌破下轨画一条横线
2017-08-29 11:17:00来源:本站整理浏览:244
HH:=MA(REF(H,1),10);
LL:=MA(REF(L,1),10);
UP:HH;
DN:LL;
BIAS:IF(C>HH,(C-HH)/HH*100,IF(C<LL,(C-LL)/LL*100,0)),NODRAW;
{突破上轨,在该K线的最高价画红点、向右画横线}
TP:=CROSS(C,HH) AND EVERY(REF(C,1)<REF(HH,1),3);{突破上轨}
TC:=BARSLAST(TP);
STICKLINE(TC>0,REF(H,TC),REF(H,TC),8,-1),COLORLIRED;{突破上轨,在该K线的最高价向右画横线};
●:IF(TP,H,DRAWNULL),POINTDOT,COLORRED,LINETHICK4; {突破上轨,在该K线的最高价画红点};
TP1:=CROSS(LL,C) AND EVERY(REF(C,1)>REF(LL,1),3);{突破上轨}
TC1:=BARSLAST(TP1);
STICKLINE(TC1>0,REF(L,TC1),REF(L,TC1),8,-1),COLORGREEN;{跌破下轨,在该K线的最低价向右画横线};
●1:IF(TP1,L,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK4; {跌破下轨,在该K线的最低价画红点};
- 上一篇公式:10日均线金叉60日均线时出信号
- 下一篇公式:通达信量能RSI副图源码 选股