自己试着学习编写、优化一些指标公式,下面的是在前人基础上优化而成,感谢他们提供原创思路,在此与朋友们分享!
指标无未来,可以放心使用!希望大家多多发财!
源码如下:
{长短趋势}
N:=9;M1:=3;M2:=3;P:=9;
短线:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100{,COLORMAGENTA};
中线:=SMA(短线,M1,1){,COLORYELLOW};
长线:=SMA(中线,M2,1){,COLORLIBLUE};
BB:=IF(BARSLAST(CROSS(中线,短线))>=3 AND CROSS(短线,中线) AND 中线<30,20,0);
DRAWICON(BB>0,0,1);
AA:=IF(BARSLAST(CROSS(短线,中线))>=4 AND CROSS(中线,短线) AND 短线>50,20,0);
DRAWICON(AA>0,100,2);
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1),COLOR00FF00;
D:=SMA(K,M2,1),COLOR00FF00;
J:3*K-2*D,COLORYELLOW,LINETHICK2;
多:80,COLORMAGENTA;
空:20,COLORGREEN;
天:=100,POINTDOT,COLORRED,LINETHICK2;
风险:STICKLINE(J>80,J+2,J-2,2,0),COLORBLUE;
低吸:STICKLINE(J<7,J+2,J-2,2,0),COLORRED;
顶:=82,COLORFFFF00,LINETHICK1;
|