您现在的位置:程序化交易>> 股票公式>> 通达信>> 通达信公式>>正文内容

检测主力轨迹 主力进场 主力监控[通达信公式]

 

原理解析

N1赋值:9
N2赋值:5
MTM赋值:收盘价-1日前的收盘价
输出主力轨迹:100*MTM的N1日指数移动平均的N1日指数移动平均/MTM的绝对值的N1日指数移动平均的N1日指数移动平均,画白色
输出MAZL:主力轨迹的N2日简单移动平均,画黄色
VAR1赋值:1日前的(最低价+开盘价+收盘价+最高价)/4
VAR2赋值:最低价-VAR1的绝对值的13日[1日权重]移动平均/最低价-VAR1和0的较大值的10日[1日权重]移动平均
VAR3赋值:VAR2的10日指数移动平均
VAR4赋值:33日内最低价的最低值
VAR5赋值:如果最低价<=VAR4,返回VAR3,否则返回0的3日指数移动平均
输出主力进场:如果VAR5>1日前的VAR5,返回VAR5,否则返回0,画红色,NODRAW
当满足条件VAR5>1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLOR000055
当满足条件VAR5>1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为2.6,0不为0则画空心柱.,COLOR000077
当满足条件VAR5>1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为2.1,0不为0则画空心柱.,COLOR000099
当满足条件VAR5>1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为1.5,0不为0则画空心柱.,COLOR0000BB
当满足条件VAR5>1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为0.9,0不为0则画空心柱.,COLOR0000DD
当满足条件VAR5>1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为0.3,0不为0则画空心柱.,COLOR0000FF
输出洗盘:如果VAR5<1日前的VAR5,返回VAR5,否则返回0,COLOR000079,NODRAW
当满足条件VAR5<1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLOR000079
当满足条件VAR5<1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为2.6,0不为0则画空心柱.,COLOR000093
当满足条件VAR5<1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为2.1,0不为0则画空心柱.,COLOR0000C6
当满足条件VAR5<1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为1.5,0不为0则画空心柱.,COLOR4A4AFF
当满足条件VAR5<1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为0.9,0不为0则画空心柱.,COLOR7D7DFF
当满足条件VAR5<1日前的VAR5时,在0和VAR5位置之间画柱状线,宽度为0.3,0不为0则画空心柱.,COLORAAAAFF
VAR21赋值:最高价-VAR1的绝对值的13日[1日权重]移动平均/最高价-VAR1和0的较小值的10日[1日权重]移动平均
VAR31赋值:VAR21的10日指数移动平均
VAR41赋值:33日内最高价的最高值
VAR51赋值:如果最高价>=VAR41,返回VAR31,否则返回0的3日指数移动平均
输出主力拉高:如果VAR51<1日前的VAR51,返回VAR51,否则返回0,画黄色,NODRAW
当满足条件VAR51<1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLOR005555
当满足条件VAR51<1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为2.6,0不为0则画空心柱.,COLOR007777
当满足条件VAR51<1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为2.1,0不为0则画空心柱.,COLOR009999
当满足条件VAR51<1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为1.5,0不为0则画空心柱.,COLOR11BBBB
当满足条件VAR51<1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为0.9,0不为0则画空心柱.,COLOR33DDDD
当满足条件VAR51<1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为0.3,0不为0则画空心柱.,COLOR55FFFF
输出出货:如果VAR51>1日前的VAR51,返回VAR51,否则返回0,画青色,NODRAW
当满足条件VAR51>1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为3,0不为0则画空心柱.,画青色
当满足条件VAR51>1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为3,0不为0则画空心柱.,COLOR555555
当满足条件VAR51>1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为2.6,0不为0则画空心柱.,COLOR777777
当满足条件VAR51>1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为2.1,0不为0则画空心柱.,COLOR999999
当满足条件VAR51>1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为1.5,0不为0则画空心柱.,COLORBBBBBB
当满足条件VAR51>1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为0.9,0不为0则画空心柱.,COLORDDDDDD
当满足条件VAR51>1日前的VAR51时,在0和VAR51位置之间画柱状线,宽度为0.3,0不为0则画空心柱.,COLORFFFFFF
当满足条件收阳线时,在横轴0.01纵轴0.9位置书写文字,画红色
当满足条件收阳线时,在横轴1纵轴1位置书写文字,画红色
 

 

 

源码:
 

{主力监控}
N1:=9;N2:=5;
MTM:=C-REF(C,1);
主力轨迹:100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1),COLORWHITE;
MAZL:MA(主力轨迹,N2),COLORYELLOW;
VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
VAR3:=EMA(VAR2,10);
VAR4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);
主力进场:IF(VAR5>REF(VAR5,1),VAR5,0),COLORRED,NODRAW;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0 ),COLOR000055;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.6,0 ),COLOR000077;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.1,0 ),COLOR000099;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1.5,0 ),COLOR0000BB;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.9,0 ),COLOR0000DD;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.3,0 ),COLOR0000FF;
洗盘:IF(VAR5<REF(VAR5,1),VAR5,0),COLOR000079,NODRAW;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),COLOR000079;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.6,0),COLOR000093;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.1,0),COLOR0000C6;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,1.5,0),COLOR4A4AFF;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.9,0),COLOR7D7DFF;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.3,0),COLORAAAAFF;
VAR21:=SMA(ABS(HIGH-VAR1),13,1)/SMA(MIN(HIGH-VAR1,0),10,1);
VAR31:=EMA(VAR21,10);
VAR41:=HHV(HIGH,33);
VAR51:=EMA(IF(HIGH>=VAR41,VAR31,0),3);
主力拉高:IF(VAR51<REF(VAR51,1),VAR51,0),COLORYELLOW,NODRAW;
STICKLINE(VAR51<REF(VAR51,1),0,VAR51,3,0),COLOR005555;
STICKLINE(VAR51<REF(VAR51,1),0,VAR51,2.6,0),COLOR007777;
STICKLINE(VAR51<REF(VAR51,1),0,VAR51,2.1,0),COLOR009999;
STICKLINE(VAR51<REF(VAR51,1),0,VAR51,1.5,0),COLOR11BBBB;
STICKLINE(VAR51<REF(VAR51,1),0,VAR51,0.9,0),COLOR33DDDD;
STICKLINE(VAR51<REF(VAR51,1),0,VAR51,0.3,0),COLOR55FFFF;
出货:IF(VAR51>REF(VAR51,1),VAR51,0),COLORCYAN,NODRAW;
STICKLINE(VAR51>REF(VAR51,1),0,VAR51,3,0 ),COLORCYAN;
STICKLINE(VAR51>REF(VAR51,1),0,VAR51,3,0),COLOR555555;
STICKLINE(VAR51>REF(VAR51,1),0,VAR51,2.6,0),COLOR777777;
STICKLINE(VAR51>REF(VAR51,1),0,VAR51,2.1,0),COLOR999999;
STICKLINE(VAR51>REF(VAR51,1),0,VAR51,1.5,0),COLORBBBBBB;
STICKLINE(VAR51>REF(VAR51,1),0,VAR51,0.9,0),COLORDDDDDD;
STICKLINE(VAR51>REF(VAR51,1),0,VAR51,0.3,0),COLORFFFFFF;DRAWTEXT_FIX(C>O,0.01,0.9,0,' WWW.CXH99.COM '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'程序化交易模型'),COLORRED;

 

 

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 511411198  有需要帮忙请点击这里留言!!!进行 有偿 编写!不贵!点击查看价格!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容