【通达信源码分享】精品指标公式-短线是银一号源码
公式源码:
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),COLOR008800,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),COLOR008800,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),COLOR008800,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),COLOR008800,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));
绿灯行DP:INDEXC>DPA,COLORGREEN;
红灯停DP:INDEXC<DPB,COLORRED;
黄灯观望DP:INDEXC>=DPB AND INDEXC<=DPA,COLORYELLOW;
STICKLINE(INDEXC>DPA,4.3,5,8,0),COLOR008800,LINETHICK2;
STICKLINE(INDEXC<DPB,4.3,5,8,0),COLORRED,LINETHICK2;
STICKLINE(INDEXC>=DPB AND INDEXC<=DPA,4.3,5,8,0),COLORYELLOW,LINETHICK2;
XG:( 绿灯行 AND 绿灯行F30 AND 绿灯行F60 AND 绿灯行FR) =1;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!