通达信另类资金波段操作图
{===================== ☆大盘功能开关 =====================}
{资金进出}
Z_X0:=SMA(AMOUNT,10,1)/10000000;
XL_1:=(Z_X0-LLV(Z_X0,4))/(HHV(Z_X0,4)-LLV(Z_X0,4))*100;
XL_2:=LLV(Z_X0,4)+SMA(XL_1,4,1)/100*(HHV(Z_X0,4)-LLV(Z_X0,4));
XL_3:=SMA(XL_2,3,1);
资金:Z_X0,,NODRAW,COLORFFA9FF;
分界:=MA(Z_X0,8);
{大盘--转向三角}
Z_X1:=REF(EMA(Z_X0,5),1);
Z_X2:=(EMA(Z_X0,5)-Z_X1)/Z_X1*100;
Z_X3:=REF(EMA(Z_X0,5),BARSLAST(CROSS(Z_X2,0))+1);
Z_X4:=REF(EMA(Z_X0,5),BARSLAST(CROSS(0,Z_X2))+1);
{===================== 【大盘图解模板】===================== }
{大盘--资金进出}
STICKLINE(Z_X0<REF(Z_X0,1)||(AMOUNT/REF(AMOUNT,1)<0.97),Z_X0,REF(Z_X0,1),3,0),LINETHICK2,COLORWHITE;{//白线离场}
STICKLINE(Z_X0>=REF(Z_X0,1),Z_X0,REF(Z_X0,1),3,0),LINETHICK2,COLORRED;{//红线进场}
STICKLINE(Z_X0<分界,Z_X0,REF(Z_X0,1),3,0),LINETHICK2,COLORGREEN;{//绿线空仓}
{大盘--转向}
DRAWLINE(CROSS(Z_X2,0),Z_X1,CROSS(0,Z_X2),Z_X1,0),COLORFF6FFF;{//粉红--斜线}
IF(Z_X2>=0 AND Z_X3=REF(Z_X3,1),Z_X3,DRAWNULL),COLORFF6FFF; {//粉红--直线}
DRAWLINE(CROSS(0,Z_X2),Z_X1,CROSS(Z_X2,0),Z_X1,0),COLORGREEN;{//绿--斜线}
IF(Z_X2<0 AND Z_X4=REF(Z_X4,1),Z_X4,DRAWNULL),COLORGREEN; {//绿--直线}
DRAWLINE(CROSS(0,Z_X2) OR CROSS(Z_X2,0),Z_X1,ISLASTBAR,Z_X1,0),COLORYELLOW; {//黄--最后斜线向改个};
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
成交额的10日[1日权重]移动平均
XL_1赋值:(Z_X0-4日内Z_X0最低值)/(4日内Z_X0最高值-4日内Z_X0最低值)*100
XL_1的4日[1日权重]移动平均
XL_2的3日[1日权重]移动平均
输出资金:Z_X0,,NODRAW,COLORFFA9FF
分界赋值:Z_X0的8日简单移动平均
{大盘--转向三角}
Z_X1赋值:1日前的Z_X0的5日指数移动平均
Z_X2赋值:(Z_X0的5日指数移动平均-Z_X1)/Z_X1*100
Z_X3赋值:REF(Z_X0的5日指数移动平均,上次Z_X2上穿0距今天数+1)
Z_X4赋值:REF(Z_X0的5日指数移动平均,上次0上穿Z_X2距今天数+1)
{===================== 【大盘图解模板】===================== }
{大盘--资金进出}
STICKLINE(Z_X0<1日前的Z_X0||(成交额/1日前的成交额<0.97),Z_X0,1日前的Z_X0,3,0), 线宽为2,画白色
{//白线离场}
STICKLINE(Z_X0>=1日前的Z_X0,Z_X0,1日前的Z_X0,3,0), 线宽为2,画红色
{//红线进场}
STICKLINE(Z_X0<分界,Z_X0,1日前的Z_X0,3,0), 线宽为2,画绿色
{//绿线空仓}
{大盘--转向}
DRAWLINE(Z_X2上穿0,Z_X1,0上穿Z_X2,Z_X1,0),COLORFF6FFF
{//粉红--斜线}
IF(Z_X2>=0 AND Z_X3=1日前的Z_X3,Z_X3,DRAWNULL),COLORFF6FFF
{//粉红--直线}
DRAWLINE(0上穿Z_X2,Z_X1,Z_X2上穿0,Z_X1,0),画绿色
{//绿--斜线}
IF(Z_X2<0 AND Z_X4=1日前的Z_X4,Z_X4,DRAWNULL),画绿色
{//绿--直线}
DRAWLINE(0上穿Z_X2 OR Z_X2上穿0,Z_X1,ISLASTBAR,Z_X1,0),画黄色
{//黄--最后斜线向改个}