挖坑临界点通达信指标 副图 源码附图
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
A1:=IF(C>=MA5,1,-1);
A2:=IF(C>=MA10,1,-1);
A3:=IF(C>=MA20,1,-1);
A4:=IF(MA5>=REF(MA5,1),1,-1);
A5:=IF(MA10>=REF(MA10,1),1,-1);
A6:=IF(MA20>=REF(MA20,1),1,-1);
趋势:(A1+A2+A3+A4+A5+A6)/6*100,COLOR00FF00;
天佑:趋势>=50,COLOR0000FF,LINETHICK0;
周期:IF(天佑,BArslAst(crOSS(天佑,0.1))+1,0),COLORFF00FF,LINETHICK0;
临界:IF(CROSS(98,趋势),1,0),COLOR00FF00,LINETHICK0;
WKQY:=BARSLAST(CROSS(50,趋势))<MIN(BARSLAST(CROSS(趋势,1)),BARSLAST(CROSS(趋势,-1)));
挖坑:BETWEEN(趋势,-1,50) AND WKQY,COLOR00FFFF,LINETHICK0;
DRAWBAND(趋势,RGB(250,0,0),50,RGB(0,0,0));
AA:=IF(挖坑,趋势,50);
DRAWBAND(50,RGB(250,250,0),AA,RGB(0,0,0));
STICKLINE(天佑,周期*0.8,周期*0.95,3,0),COLOR0000FF;
STICKLINE(天佑,周期*1.05,周期*1.2,3,0),COLOR0000FF;
STICKLINE(天佑 AND C<REF(C,1),周期*0.9,周期*1.1,3,1),COLORFFFFFF;
STICKLINE(CROSS(天佑,0.1),0,100,0,-1),COLOR0000FF;
DRAWTEXT(临界,90,'☆'),COLOR00FF00;
零轴:0,COLORFFFFFF;
50,POINTDOT,COLOR000000;
选股:周期=1,COLOR0000FF,LINETHICK0;
快跑:趋势<50,,COLOR00FF00,LINETHICK0;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
MA5赋值:收盘价的5日简单移动平均
MA10赋值:收盘价的10日简单移动平均
MA20赋值:收盘价的20日简单移动平均
如果C>=MA5返回1否则返回-1
如果C>=MA10返回1否则返回-1
如果C>=MA20返回1否则返回-1
A4赋值:IF(MA5>=1日前的MA5,1,-1)
A5赋值:IF(MA10>=1日前的MA10,1,-1)
A6赋值:IF(MA20>=1日前的MA20,1,-1)
输出趋势:(A1+A2+A3+A4+A5+A6)/6*100,COLOR00FF00
输出天佑:趋势>=50,COLOR0000FF,LINETHICK0
输出周期:IF(天佑,上次天佑上穿0.1距今天数+1,0),COLORFF00FF,LINETHICK0
输出临界:IF(98上穿趋势,1,0),COLOR00FF00,LINETHICK0
WKQY赋值:上次50上穿趋势距今天数
输出挖坑:BETWEEN(趋势,-1,50) AND WKQY,COLOR00FFFF,LINETHICK0
DRAWBAND(趋势,RGB(250,0,0),50,RGB(0,0,0))
如果挖坑返回趋势否则返回50
DRAWBAND(50,RGB(250,250,0),AA,RGB(0,0,0))
当满足条件天佑时,在周期*0.8和周期*0.95之间画柱状线
当满足条件天佑时,在周期*1.05和周期*1.2之间画柱状线
STICKLINE(天佑 AND C<1日前的C,周期*0.9,周期*1.1,3,1),COLORFFFFFF
STICKLINE(天佑上穿0.1,0,100,0,-1),COLOR0000FF
当满足条件临界时,在90和'☆'位置书写文字
输出零轴:0,COLORFFFFFF
50,POINTDOT,COLOR000000
输出选股:周期=1,COLOR0000FF,LINETHICK0
输出快跑:趋势<50,,COLOR00FF00,LINETHICK0