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

红灯停绿灯通行指标及两个选股公式源码[通达信公式]

相关标签:

 

原理解析:

A赋值:收盘价的5日简单移动平均和收盘价的10日简单移动平均的较大值
B赋值:收盘价的5日简单移动平均和收盘价的10日简单移动平均的较小值
输出绿:收盘价>A,画绿色
输出红:收盘价<B,画红色
输出黄金坑:收盘价>=B AND 收盘价<=A,画黄色
当满足条件收盘价>A时,在3.3和4位置之间画柱状线,宽度为8,0不为0则画空心柱.,画绿色,线宽为2
当满足条件收盘价<B时,在3.3和4位置之间画柱状线,宽度为8,0不为0则画空心柱.,画红色,线宽为2
当满足条件收盘价>=BANDC<=A时,在3.3和4位置之间画柱状线,宽度为8,0不为0则画空心柱.,画黄色,线宽为2
 

源码

 

A:=MAX(MA(C,5),MA(C,10));
B:=MIN(MA(C,5),MA(C,10));
绿:C>A,COLORGREEN;
红:C<B,COLORRED;
黄:C>=B AND C<=A,COLORYELLOW;
STICKLINE(C>A,3.3,4,8,0),COLORGREEN,LINETHICK2;
STICKLINE(C<B,3.3,4,8,0),COLORRED,LINETHICK2;
STICKLINE(C>=B AND C<=A,3.3,4,8,0),COLORYELLOW,LINETHICK2;
F30A:=MAX(MA(C,10),MA(C,20));
F30B:=MIN(MA(C,10),MA(C,20));
绿灯F30:C>F30A,COLORGREEN;
红灯F30:C<F30B,COLORRED;
黄灯F30:C>=F30B AND C<=F30A,COLORYELLOW;
STICKLINE(C>F30A,2.3,3,8,0),COLORGREEN,LINETHICK2;
STICKLINE(C<F30B,2.3,3,8,0),COLORRED,LINETHICK2;
STICKLINE(C>=F30B AND C<=F30A,2.3,3,8,0),COLORYELLOW,LINETHICK2;
F60A:=MAX(MA(C,20),MA(C,28));
F60B:=MIN(MA(C,20),MA(C,28));
绿灯行F60:C>F60A,COLORGREEN;
红灯停F60:C<F60B,COLORRED;
黄灯观望F60:C>=F60B AND C<=F60A,COLORYELLOW;
STICKLINE(C>F60A,1.3,2,8,0),COLORGREEN,LINETHICK2;
STICKLINE(C<F60B,1.3,2,8,0),COLORRED,LINETHICK2;
STICKLINE(C>=F60B AND C<=F60A,1.3,2,8,0),COLORYELLOW,LINETHICK2;
FRA:=MAX(MA(C,60),MA(C,120));
FRB:=MIN(MA(C,60),MA(C,120));
绿灯行FR:C>FRA,COLORGREEN;
红灯停FR:C<FRB,COLORRED;
黄灯观望FR:C>=F30B AND C<=F30A,COLORYELLOW;
STICKLINE(C>FRA,0,1,8,0),COLORGREEN,LINETHICK2;
STICKLINE(C<FRB,0,1,8,0),COLORRED,LINETHICK2;
STICKLINE(C>=FRB AND C<=FRA,0,1,8,0),COLORYELLOW,LINETHICK2;
DPA:=MAX(MA(INDEXC,60),MA(INDEXC,120));
DPB:=MIN(MA(INDEXC,60),MA(INDEXC,120));

 

 

 

=============================================================


选股公式

1A:=MAX(MA(C,5),MA(C,10));
F30A:=MAX(MA(C,10),MA(C,20));
F60A:=MAX(MA(C,20),MA(C,28));
FRA:=MAX(MA(C,60),MA(C,120));
CROSS(C,FRA)AND C>F30A AND C>A AND C>F60A;

 

 

 

==============================================

选股公式2

 

A:=MAX(MA(C,5),MA(C,10));
F30A:=MAX(MA(C,10),MA(C,20));
F60A:=MAX(MA(C,20),MA(C,28));
FRA:=MAX(MA(C,60),MA(C,120));
CROSS(C,F60A)AND C>F30A AND C>A AND C>FRA;
DRAWTEXT_FIX(C>O,0.01,0.9,0,' WWW.CXH99.COM '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'程序化交易模型'),COLORRED;

 

 

 

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

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

 


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

相关文章

    没有相关内容