通达信主力追板出现紫色线才考虑
{主力追板}
DU:=DATE+19000000<=99240815;A1:=EMA((C - REF(C,1)) / REF(C,3),10) * 100*DU;A2:=EMA(EMA(EMA(EMA(A1,2),2),2),3)*DU;A3:=(C - MA(C,26)) / MA(C,26) * 100*DU;0,LINETHICK2;A4:=1*DU;A5:IF(MA((C - MA(C,28)) / MA(C,28),3) * 100 > 0 AND MA(C,5) > MA(C,10) AND A3 > EMA(MA((C - MA(C,28)) / MA(C,28),3) * 100,5) AND A2 > REF(A2,1),MA((C - MA(C,28)) / MA(C,28),3) * 100,0) * A4*DU;持股线:(MA((C - MA(C,28)) / MA(C,28),3) * 100 > 0 AND MA(C,5) > MA(C,10) AND A3 > EMA(MA((C - MA(C,28)) / MA(C,28),3) * 100,5)) * A5 * A4*DU,LINETHICK1,COLORRED;VARD1:=MA((C - MA(C,28)) / MA(C,28),3) * 100*DU;A6:=(MA(C,3) + MA(C,6) + MA(C,12) + MA(C,24)) / 4*DU;A7:=A6*DU + 3 * STD(A6,10)*DU;A8:=MA(C,26)*DU + 2 * STD(C,26)*DU;卖点:(V > 0 AND CROSS(0.5,持股线)) * REVERSE(MA((C - MA(C,28)) / MA(C,28),3) * 100) * A4,COLORGREEN;STICKLINE(卖点,卖点,0,3,0),COLOR009900;ABC1:=(V > 0 AND A5 > 0 AND A2 > REF(A2,1)) * EMA(A5,5),COLOR005999;STICKLINE(ABC1,ABC1,0,2,0),COLORRED;ABC2:=(V > 0 AND BARSLASTCOUNT(A5>0)=1 AND CROSS(EMA(C,2),HHV(EMA(C,5),26))) * EMA(A5,2),COLOR000999;STICKLINE(ABC2,ABC2,0,3,0),COLORWHITE;ABC3:=(V > 0 AND BARSLASTCOUNT(A5>0)=1 AND CROSS(EMA(C,2),HHV(EMA(C,5),26))) * -3,COLOR009999;STICKLINE(ABC3,ABC3,0,6,0),COLORYELLOW;STICKLINE(ABC3,ABC3,0,2,0),COLOR005555;STICKLINE(ABC3,ABC3,0,1,0),COLOR007777;STICKLINE(ABC3,ABC3,0,0.2,0),COLOR009999;短线起爆:(V > 0 AND BARSLASTCOUNT(A5>0)=1 AND CROSS(EMA(C,2),HHV(EMA(C,5),26))) * 10 * A4*DU;ABC4:=(V > 0 AND EMA((C - MA(C,28)) / MA(C,28),2) > MA((C - MA(C,28)) / MA(C,28),4) AND MA((C - MA(C,28)) / MA(C,28),4) > REF(MA((C - MA(C,28)) / MA(C,28),4),1) AND SMA(MAX(C - REF(C,1),0),14,1) / SMA(ABS(C - REF(C,1)),14,1) * 100 > 64.5 AND EMA(C,1) > (A7 OR A8)) * EMA(A5,5) / 2.5 * A4,COLORRED;STICKLINE(ABC4,ABC4,0,3,0),COLORYELLOW;起爆:=BARSLASTCOUNT(ABC1 AND ABC4)=1;DRAWICON(起爆,MA((C - MA(C,28)) / MA(C,28),3) * 100 * 2,9);ABC5:=(V > 0 AND EMA((C - MA(C,28)) / MA(C,28),2) > MA((C - MA(C,28)) / MA(C,28),4) AND MA((C - MA(C,28)) / MA(C,28),4) > REF(MA((C - MA(C,28)) / MA(C,28),4),1) AND (V > 0 AND A5 > 0 AND A2 > REF(A2,1)) * EMA(A5,5) = 0) * A3 * A4,COLORADA899;IF(EMA(C,2) > HHV(EMA(C,5),26) AND A5 > 0 * A4,持股线,DRAWNULL),LINETHICK3,COLORMAGENTA;A9:=EMA((EMA(C * V,3) / EMA(V,3) + EMA(C * V,6) / EMA(V,6) + EMA(C * V,12) / EMA(V,12) + EMA(C * V,24) / EMA(V,24)) / 4,13);A10:=1.06 * A9 * A4;A11:=(C - REF(C,1)) / REF(C,1) * 100;DRAWTEXT(A11 > 8.5 AND CROSS(MA(C,1),EMA(H,10) * (1 + 5 / 100)) AND CROSS(MA(C,1),A10) > 0,MA((C - MA(C,28)) / MA(C,28),3) * 100 * 2,'追'),COLORYELLOW,DRAWABOVE;DRAWICON(A11 > 8.5 AND CROSS(MA(C,1),EMA(H,10) * (1 + 5 / 100)) AND CROSS(MA(C,1),A10) > 0,MA((C - MA(C,28)) / MA(C,28),3) * 100 * 2,23);DRAWICON(短线起爆,短线起爆,23);DRAWTEXT_FIX(ISLASTBAR,0.90,0.95,0,'和*专属福利');
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{主力追板}DU赋值:DATE+19000000<=99240815
A1赋值:EMA((C - 1日前的C) / 3日前的C,10) * 100*DU
A2赋值:A1的2日指数移动平均,2),2),3)*DU
A3赋值:(C - C的26日简单移动平均) / C的26日简单移动平均 * 100*DU
0, 线宽为2
A4赋值:1*DU
输出A5:IF(MA((C - MA(C,28)) / MA(C,28),3) * 100 > 0 AND MA(C,5) > MA(C,10) AND A3 > EMA(MA((C - MA(C,28)) / MA(C,28),3) * 100,5) AND A2 > 1日前的A2,MA((C - MA(C,28)) / MA(C,28),3) * 100,0) * A4*DU
输出持股线:(MA((C - MA(C,28)) / MA(C,28),3) * 100 > 0 AND MA(C,5) > MA(C,10) AND A3 > EMA(MA((C - MA(C,28)) / MA(C,28),3) * 100,5)) * A5 * A4*DU,LINETHICK1,画红色
VARD1赋值:MA((C - MA(C,28)) / MA(C,28),3) * 100*DU
A6赋值:(C的3日简单移动平均 + C的6日简单移动平均 + C的12日简单移动平均 + C的24日简单移动平均) / 4*DU
A7赋值:A6*DU + 3 * A6的10估算标准差*DU
A8赋值:C的26日简单移动平均*DU + 2 * C的26估算标准差*DU
输出卖点:(V > 0 AND 0.5上穿持股线) * MA((C - MA(C,28的相反数) / MA(C,28),3) * 100) * A4,画绿色
当满足条件卖点时,在卖点和0之间画柱状线
ABC1赋值:(V > 0 AND A5 > 0 AND A2 > 1日前的A2) * A5的5日指数移动平均,COLOR005999
当满足条件ABC1时,在ABC1和0之间画柱状线
ABC2赋值:(V > 0 AND BARSLASTCOUNT(A5>0)=1 AND CROSS(C的2日指数移动平均,26日内C的5日指数移动平均最高值)) * A5的2日指数移动平均,COLOR000999
当满足条件ABC2时,在ABC2和0之间画柱状线
ABC3赋值:(V > 0 AND BARSLASTCOUNT(A5>0)=1 AND CROSS(C的2日指数移动平均,26日内C的5日指数移动平均最高值)) * -3,COLOR009999
当满足条件ABC3时,在ABC3和0之间画柱状线
当满足条件ABC3时,在ABC3和0之间画柱状线
当满足条件ABC3时,在ABC3和0之间画柱状线
当满足条件ABC3时,在ABC3和0之间画柱状线
输出短线起爆:(V > 0 AND BARSLASTCOUNT(A5>0)=1 AND CROSS(C的2日指数移动平均,26日内C的5日指数移动平均最高值)) * 10 * A4*DU
ABC4赋值:(V > 0 AND EMA((C - MA(C,28)) / MA(C,28),2) > MA((C - MA(C,28)) / MA(C,28),4) AND MA((C - MA(C,28)) / MA(C,28),4) > REF(MA((C - MA(C,28)) / MA(C,28),4),1) AND SMA(MAX(C - REF(C,1),0),14,1) / SMA(C - REF(C,1的绝对值),14,1) * 100 > 64.5 AND EMA(C,1) > (A7 OR A8)) * EMA(A5,5) / 2.5 * A4,画红色
当满足条件ABC4时,在ABC4和0之间画柱状线
起爆赋值:BARSLASTCOUNT(ABC1 AND ABC4)=1
DRAWICON(起爆,MA((C - MA(C,28)) / MA(C,28),3) * 100 * 2,9)
ABC5赋值:(V > 0 AND EMA((C - MA(C,28)) / MA(C,28),2) > MA((C - MA(C,28)) / MA(C,28),4) AND MA((C - MA(C,28)) / MA(C,28),4) > REF(MA((C - MA(C,28)) / MA(C,28),4),1) AND (V > 0 AND A5 > 0 AND A2 > REF(A2,1)) * EMA(A5,5) = 0) * A3 * A4,COLORADA899
IF(C的2日指数移动平均 > 26日内C的5日指数移动平均最高值 AND A5 > 0 * A4,持股线,DRAWNULL), 线宽为3,画洋红色
A9赋值:EMA((EMA(C * V,3) / EMA(V,3) + EMA(C * V,6) / EMA(V,6) + EMA(C * V,12) / EMA(V,12) + EMA(C * V,24) / EMA(V,24)) / 4,13)
A10:=1.06 * A9 * A4
A11:=(C - 1日前的C) / 1日前的C * 100
DRAWTEXT(A11 > 8.5 AND CROSS(C的1日简单移动平均,H的10日指数移动平均 * (1 + 5 / 100)) AND CROSS(C的1日简单移动平均,A10) > 0,MA((C - MA(C,28)) / MA(C,28),3) * 100 * 2,'追'),画黄色,DRAWABOVE
DRAWICON(A11 > 8.5 AND CROSS(C的1日简单移动平均,H的10日指数移动平均 * (1 + 5 / 100)) AND CROSS(C的1日简单移动平均,A10) > 0,MA((C - MA(C,28)) / MA(C,28),3) * 100 * 2,23)
当满足条件短线起爆时,在短线起爆和23之间画图标
当满足条件ISLASTBAR时,在横轴0.90纵轴0.95位置书写文字