通达信压力超盘指标主图
N:=1.03;
M5:MA(C,5);
M10:MA(C,10);
A:=BARSLAST(CROSS(M5,M10));
T:=BARSLAST(CURRBARSCOUNT=CONST(A)+1);
D:=MIN(M5,M10);{}
STICKLINE(T>=0,REF(D,T),REF(D,T),6,0),COLORRED,LINETHICK2;
STICKLINE(T>=0,REF(D*1.08,T),REF(D*1.08,T),6,-1),COLORLIMAGENTA;
STICKLINE(T>=0,REF(D*0.92,T),REF(D*0.92,T),6,-1),COLORLIMAGENTA;
STICKLINE(T>=0,REF(D*1.21,T),REF(D*1.21,T),6,-1),COLORGREEN;
STICKLINE(T>=0,REF(D*0.79,T),REF(D*0.79,T),6,-1),COLORGREEN;
STICKLINE(T>=0,REF(D*1.34,T),REF(D*1.34,T),6,-1),COLORYELLOW;
STICKLINE(T>=0,REF(D*0.66,T),REF(D*0.66,T),6,-1),COLORYELLOW;
DRAWTEXT(T=0,REF(D,T)*N,VARCAT(VARCAT('中心价:',VAR2STR(REF(D,T),2)),'元')),COLORWHITE;
DRAWTEXT(T=0,REF(D*1.08,T)*N,VARCAT(VARCAT('压力1:',VAR2STR(REF(D*1.08,T),2)),'元'))COLORYELLOW;
DRAWTEXT(T=0,REF(D*1.21,T)*N,VARCAT(VARCAT('压力2:',VAR2STR(REF(D*1.21,T),2)),'元'))COLORYELLOW;
DRAWTEXT(T=0,REF(D*1.34,T)*N,VARCAT(VARCAT('压力3:',VAR2STR(REF(D*1.34,T),2)),'元'))COLORYELLOW;
DRAWTEXT(T=0,REF(D*0.92,T)*N,VARCAT(VARCAT('支撑1:',VAR2STR(REF(D*0.92,T),2)),'元')),COLORMAGENTA;
DRAWTEXT(T=0,REF(D*0.79,T)*N,VARCAT(VARCAT('支撑2:',VAR2STR(REF(D*0.79,T),2)),'元')),COLORMAGENTA;
DRAWTEXT(T=0,REF(D*0.66,T)*N,VARCAT(VARCAT('支撑3:',VAR2STR(REF(D*0.66,T),2)),'元')),COLORMAGENTA;
STICKLINE(T=0,REF(D*0.66,T),REF(D*1.34,T),0,0),COLORRED;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N赋值:1.03
输出
M5:C的5日简单移动平均
输出
M10:C的10日简单移动平均
A赋值:上次M5上穿M10距今天数
T赋值:上次CURRBARSCOUNT=CONST(A距今天数+1)
D赋值:M5和M10的较小值
{}
STICKLINE(T>=0,T日前的D,T日前的D,6,0),画红色,LINETHICK2
STICKLINE(T>=0,T日前的D*1.08,T日前的D*1.08,6,-1),COLORLIMAGENTA
STICKLINE(T>=0,T日前的D*0.92,T日前的D*0.92,6,-1),COLORLIMAGENTA
STICKLINE(T>=0,T日前的D*1.21,T日前的D*1.21,6,-1),COLORGREEN
STICKLINE(T>=0,T日前的D*0.79,T日前的D*0.79,6,-1),COLORGREEN
STICKLINE(T>=0,T日前的D*1.34,T日前的D*1.34,6,-1),画黄色
STICKLINE(T>=0,T日前的D*0.66,T日前的D*0.66,6,-1),画黄色
DRAWTEXT(T=0,T日前的D*N,VARCAT(VARCAT('中心价:',VAR2STR(T日前的D,2)),'元')),画白色
DRAWTEXT(T=0,T日前的D*1.08*N,VARCAT(VARCAT('压力1:',VAR2STR(T日前的D*1.08,2)),'元'))画黄色
DRAWTEXT(T=0,T日前的D*1.21*N,VARCAT(VARCAT('压力2:',VAR2STR(T日前的D*1.21,2)),'元'))画黄色
DRAWTEXT(T=0,T日前的D*1.34*N,VARCAT(VARCAT('压力3:',VAR2STR(T日前的D*1.34,2)),'元'))画黄色
DRAWTEXT(T=0,T日前的D*0.92*N,VARCAT(VARCAT('支撑1:',VAR2STR(T日前的D*0.92,2)),'元')),COLORMAGENTA
DRAWTEXT(T=0,T日前的D*0.79*N,VARCAT(VARCAT('支撑2:',VAR2STR(T日前的D*0.79,2)),'元')),COLORMAGENTA
DRAWTEXT(T=0,T日前的D*0.66*N,VARCAT(VARCAT('支撑3:',VAR2STR(T日前的D*0.66,2)),'元')),COLORMAGENTA
STICKLINE(T=0,T日前的D*0.66,T日前的D*1.34,0,0),画红色