股市灯塔指标 发生漂移的原因
2019/12/8 17:51:46
公式编写说明:
麻烦老师解释一下为什么短牛 种牛 大牛 指标出现后 会发生漂移,主要是解释一下影响漂移的因素顺便请老师看一下有无未来函数,我用软件检测是没有未来函数的N1:=5;N2:=10;STICKLINE(C>0,0,10,15,0),COLOR781816;LC:=REF(CLOSE,1);RSI5:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*10,COLORFF00FF,LINETHICK1;RSI10:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*10,COLOR00FFFF;VAR1:=C-REF(C,1);VAR2:=100*EMA(EMA(VAR1,6),6)/EMA(EMA(ABS(VAR1),6),6);MA5:=EMA(C,5);MA13:=EMA(C,13);UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),0),COLOR0000FF;DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS(MA13,MA5))+1),0),COLOR00FF00;BT:(LLV(VAR2,2)=LLV(VAR2,7) AND COUNT(VAR2<0,2) AND CROSS(VAR2,MA(VAR2,2))) ANDREF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);0,COLORFF00FF;10,COLORFF0000;STICKLINE(UP,0,0.2,3,0),COLOR0000FF;STICKLINE(DOWN,0,0.2,3,0),COLOR00FF00;STICKLINE(BT,0,3,2,0),COLOR000088;STICKLINE(BT,0,3,1,0),COLOR0000CC;STICKLINE(BT,0,3,0.22,0),COLOR0000FF;DRAWTEXT(BT,3,'短牛'),COLOR0000FF;短牛:IF(BT,4,0),COLORGREEN,LINETHICK2;TJ1:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82;中牛:IF((REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82),5,0),COLORYELLOW,LINETHICK2;STICKLINE(TJ1,0,2,3,0),COLOR880088;STICKLINE(TJ1,0,2,1.5,0),COLORAA00AA;STICKLINE(TJ1,0,2,0.8,0),COLORCC00CC;STICKLINE(TJ1,0,2,0.2,0),COLORFF00FF;DRAWTEXT(TJ1,2,'中牛'),COLORFF00FF;HR:=HHV(HIGH,55);HRY:=LLV(LOW,55);HRY11:=HR*HRY;HRY33:=SQRT(HRY11);TJ2:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33;大牛:IF(TJ2,6,0),COLORLIRED,LINETHICK2;STICKLINE(TJ2,0,1,5,0),COLOR008888;STICKLINE(TJ2,0,1,2,0),COLOR00AAAA;STICKLINE(TJ2,0,1,1,0),COLOR00CCCC;STICKLINE(TJ2,0,1,0.2,0),COLOR00FFFF;DRAWTEXT(TJ2,1,'大牛'),COLOR00FFFF;ST:=REF(UP,1)>REF(UP,2) AND DOWN<REF(UP,1);STICKLINE(ST,10,9,5,0),COLOR008800;STICKLINE(ST,10,9,2,0),COLOR00AA00;STICKLINE(ST,10,9,1,0),COLOR00CC00;STICKLINE(ST,10,9,0.2,0),COLOR00FF00;DRAWTEXT(ST,9,'卖'),COLOR00FF00;DRAWTEXT(CURRBARSCOUNT=89,9.5,'★本指标适合抄底及波段特征明显个股,暴跌途中慎用!!'),COLOR0000FF;DRAWTEXT(CURRBARSCOUNT=89,8.7,'★大牛:长线大牛股,目标翻倍;中短牛:15天目标10%-20%!!'),COLOR0078FF;DRAWTEXT(CURRBARSCOUNT=89,8.0,'★以上信号结合RSI低位时用更加可靠,盘整市中信号偏多!!'),COLOR00FF00;DRAWTEXT(CURRBARSCOUNT=89,7.3,'★当大牛\中牛\短牛同一天出现时,果断买入!!'),COLOR00FFFF;
公式源码示例:
很简单。最高低价向前满足条件出信号。再出现更高低价信号当然就变了。
看 股吧公式 www.kan guba.com
其它股票公式列表