通达信四线抓牛主图
{四线抓牛}
MA5:MA(CLOSE,5);
A:=EMA((EMA(CLOSE,19)+EMA(CLOSE,20)+EMA(CLOSE,21))/3,3),COLORYELLOW;
轴线:EMA(A,3)COLORWHITE;
AA:=EMA((EMA(C,1)+EMA(C,3)+EMA(C,5))/3,3),COLORWHITE;
AAA:EMA(EMA(EMA(AA,1),2),3);
BB:=EMA((EMA(C,19)+EMA(C,20)+EMA(C,21))/3,3);
CC:=BB-(AA-BB);
CCC:EMA(EMA(EMA(CC,1),2),3);
开口值1:=HHV(AA,1)/LLV(CC,1)*100-100,NODRAW;
起:EMA(开口值1,5),NODRAW;
DRAWBAND(MA5,RGB(200,10,20),AAA,RGB(100,100,200));
MA5M:MA(CLOSE,5);
IF( AAA<轴线 AND AAA>REF(AAA,1),AAA,DRAWNULL),COLORMAGENTA,LINETHICK3;
IF( AAA>轴线 AND AAA>REF(AAA,1),AAA,DRAWNULL),COLORRED,LINETHICK4;
IF( AAA>轴线 AND AAA<REF(AAA,1),AAA,DRAWNULL),COLORYELLOW,LINETHICK2;
IF( AAA<轴线 AND AAA<REF(AAA,1),AAA,DRAWNULL),COLORLIBLUE,LINETHICK2;
IF( CCC<轴线 AND CCC>REF(CCC,1),CCC,DRAWNULL),COLORLIBLUE,LINETHICK2;
IF( CCC>轴线 AND CCC>REF(CCC,1),CCC,DRAWNULL),COLORYELLOW,LINETHICK2;
IF( CCC>轴线 AND CCC<REF(CCC,1),CCC,DRAWNULL),COLORRED,LINETHICK2;
IF( CCC<轴线 AND CCC<REF(CCC,1),CCC,DRAWNULL),COLORMAGENTA,LINETHICK2;
撑压A:IF(CROSS(AAA,CCC),H,REF(H,BARSLAST(CROSS(AAA,CCC)))),POINTDOT,COLORYELLOW,LINETHICK2;
撑压B:IF(CROSS(CCC,AAA),H,REF(H,BARSLAST(CROSS(CCC,AAA)))),POINTDOT,COLORCYAN,LINETHICK2;
DDIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DRAWTEXT(CROSS(MA5,CCC) AND DDIF>0 AND DDIF>REF(DDIF,1),CCC-0.2,'〇'),COLORRED;
DRAWTEXT(CROSS(MA5,CCC) AND DDIF>0 AND DDIF>REF(DDIF,1),CCC-0.4,'〇'),COLORYELLOW;
DRAWTEXT(CROSS(MA5,CCC) AND DDIF>0 AND DDIF>REF(DDIF,1),CCC-0.6,'〇'),COLORLIBLUE;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
输出{四线抓牛}
MA5:收盘价的5日简单移动平均
A赋值:EMA((EMA(收盘价,19)+EMA(收盘价,20)+EMA(收盘价,21))/3,3),画黄色
输出轴线:A的3日指数移动平均画白色
AA赋值:EMA((EMA(C,1)+EMA(C,3)+EMA(C,5))/3,3),画白色
AA输出A:AA的1日指数移动平均,2),3)
BB赋值:EMA((EMA(C,19)+EMA(C,20)+EMA(C,21))/3,3)
CC赋值:BB-(AA-BB)
C输出CC:CC的1日指数移动平均,2),3)
开口值1赋值:1日内AA最高值/1日内CC最低值*100-100,NODRAW
输出起:开口值1的5日指数移动平均,NODRAW
DRAWBAND(MA5,RGB(200,10,20),AAA,RGB(100,100,200))
MA5M:收盘价的5日简单移动平均
IF( AAA<轴线 AND AAA>1日前的AAA,AAA,DRAWNULL),COLORMAGENTA, 线宽为3
IF( AAA>轴线 AND AAA>1日前的AAA,AAA,DRAWNULL),画红色,LINETHICK4
IF( AAA>轴线 AND AAA<1日前的AAA,AAA,DRAWNULL),画黄色, 线宽为2
IF( AAA<轴线 AND AAA<1日前的AAA,AAA,DRAWNULL),COLORLIBLUE, 线宽为2
IF( CCC<轴线 AND CCC>1日前的CCC,CCC,DRAWNULL),COLORLIBLUE, 线宽为2
IF( CCC>轴线 AND CCC>1日前的CCC,CCC,DRAWNULL),画黄色, 线宽为2
IF( CCC>轴线 AND CCC<1日前的CCC,CCC,DRAWNULL),画红色, 线宽为2
IF( CCC<轴线 AND CCC<1日前的CCC,CCC,DRAWNULL),COLORMAGENTA, 线宽为2
撑压输出A:IF(AAA上穿CCC,H,REF(H,上次AAA上穿CCC距今天数)),POINTDOT,画黄色, 线宽为2
输出撑压B:IF(CCC上穿AAA,H,REF(H,上次CCC上穿AAA距今天数)),POINTDOT,COLORCYAN, 线宽为2
DDIF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均
DRAWTEXT(MA5上穿CCC AND DDIF>0 AND DDIF>1日前的DDIF,CCC-0.2,'〇'),画红色
DRAWTEXT(MA5上穿CCC AND DDIF>0 AND DDIF>1日前的DDIF,CCC-0.4,'〇'),画黄色
DRAWTEXT(MA5上穿CCC AND DDIF>0 AND DDIF>1日前的DDIF,CCC-0.6,'〇'),COLORLIBLUE
DRAWKLINE(最高价,开盘价,最低价,收盘价)