操盘线副图非常简单 指标源码
Var0:=(H+L+C+O)/4;Var1:=EMA((VAR0-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100,13);VAR2:=EMA(0.667*REF(Var1,1)+0.333*Var1,2);多线: EMA(VAR1,1),colorred,linethick1;空线: EMA(VAR2,1),colorgreen,linethick1;趋势线: EMA(VAR1+VAR2,30)/2,coloryellow,linethick1,DOTLINE;STICKLINE((Var1-VAR2)*5>=0,0,(Var1-VAR2)*5*1,8,0),color0000ff;STICKLINE((Var1-VAR2)*5>=0,0,(Var1-VAR2)*5*0.8,8,0),color0066ff;STICKLINE((Var1-VAR2)*5>=0,0,(Var1-VAR2)*5*0.6,8,0),color0099ff;STICKLINE((Var1-VAR2)*5>=0,0,(Var1-VAR2)*5*0.4,8,0),color00ccff;STICKLINE((Var1-VAR2)*5>=0,0,(Var1-VAR2)*5*0.2,8,0),color00ffff;STICKLINE((Var1-VAR2)*5<=0,0,(Var1-VAR2)*5*1,8,0),colorgreen;STICKLINE((Var1-VAR2)*5<=0,0,(Var1-VAR2)*5*0.8,8,0),COLOR33CC00;STICKLINE((Var1-VAR2)*5<=0,0,(Var1-VAR2)*5*0.6,8,0),COLOR339900;STICKLINE((Var1-VAR2)*5<=0,0,(Var1-VAR2)*5*0.4,8,0),COLOR337700;STICKLINE((Var1-VAR2)*5<=0,0,(Var1-VAR2)*5*0.2,8,0),COLOR005500;操股:IF(CROSS(多线,空线) ,10,0),colorliblue;DRAWTEXT(CROSS(多线,趋势线),0,'金叉'),colorwhite;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR0赋值:(H+L+C+O)/4
VAR1赋值:EMA((VAR0-5日内最低价最低值)/(5日内最高价最高值-5日内最低价最低值)*100,13)
VAR2赋值:E0.667*1日前的VAR1+0.333*VAR1的2日简单移动平均
输出多线: VAR1的1日指数移动平均,画红色,LINETHICK1
输出空线: VAR2的1日指数移动平均,画绿色,LINETHICK1
输出趋势线: VAR1+VAR2的30日指数移动平均/2,画黄色,LINETHICK1,DOTLINE
STICKLINE((VAR1-VAR2)*5>=0,0,(VAR1-VAR2)*5*1,8,0),COLOR0000FF
STICKLINE((VAR1-VAR2)*5>=0,0,(VAR1-VAR2)*5*0.8,8,0),COLOR0066FF
STICKLINE((VAR1-VAR2)*5>=0,0,(VAR1-VAR2)*5*0.6,8,0),COLOR0099FF
STICKLINE((VAR1-VAR2)*5>=0,0,(VAR1-VAR2)*5*0.4,8,0),COLOR00CCFF
STICKLINE((VAR1-VAR2)*5>=0,0,(VAR1-VAR2)*5*0.2,8,0),COLOR00FFFF
STICKLINE((VAR1-VAR2)*5<=0,0,(VAR1-VAR2)*5*1,8,0),画绿色
STICKLINE((VAR1-VAR2)*5<=0,0,(VAR1-VAR2)*5*0.8,8,0),COLOR33CC00
STICKLINE((VAR1-VAR2)*5<=0,0,(VAR1-VAR2)*5*0.6,8,0),COLOR339900
STICKLINE((VAR1-VAR2)*5<=0,0,(VAR1-VAR2)*5*0.4,8,0),COLOR337700
STICKLINE((VAR1-VAR2)*5<=0,0,(VAR1-VAR2)*5*0.2,8,0),COLOR005500
输出操股:IF(多线上穿空线 ,10,0),COLORLIBLUE
DRAWTEXT(多线上穿趋势线,0,'金叉'),画白色