同花顺大军黑马副图源码分享
N:=45;M:=66;RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,9,1);D:=SMA(K,3,1);J:3*K-2*D,coloryellow;MJ:EMA(J,3),colorgreen;主力线:SMA(100*(C-LLV(LOW,N))/(HHV(H,N)-LLV(LOW,N)),5,2), colorred,LINETHICK2;CC:=ABS(C-MA(C,N))/MA(C,N);鉴别线: DMA(主力线,CC),COLORAAAA00,LINETHICK2;起爆线: 57,coloryellow;发作线:72,COLOR7F00FF;DRAWTEXT(CROSS(主力线,发作线),75,'★发作!') ,colorred;临界限:42,colorwhite;卧槽线:27,colorgreen;抄底线:12,COLORAAAA00;DRAWTEXT(CROSS(主力线,鉴别线)AND 鉴别线<12,10,'★抄底') ,COLORAAAA00;DRAWTEXT(CROSS(主力线,临界限),45,'★加仓'),colorwhite;DRAWTEXT(CROSS(主力线,起爆线),60,'★起爆'),coloryellow;DRAWTEXT(CROSS(92,主力线),95,'★风险') ,colorgreen;DRAWTEXT(CROSS(鉴别线,主力线)AND 鉴别线>60,鉴别线-5,'★空仓') ,colormagenta;CM: (COST(M)/(COST(0)+COST(100))*100),colormagenta,LINETHICK2;IF(CM>主力线,CM,DRAWNULL),colorgray,LINETHICK2;IF(CM>主力线,主力线,DRAWNULL),colorwhite,LINETHICK2;DRAWTEXT(CROSS(主力线,CM),CM,'主力★出场') ,colorred;
未来函数检测结果如下:
该公式包含未来函数:COST
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N赋值:45
M赋值:66
RSV赋值:(收盘价-N日内最低价最低值)/(N日内最高价最高值-N日内最低价最低值)*100
RSV的9日[1日权重]移动平均
K的3日[1日权重]移动平均
输出J:3*K-2*D,画黄色
M输出J:J的3日指数移动平均,COLORGREEN
输出主力线:SMA(100*(C-N日内最低价最低值)/(N日内H最高值-N日内最低价最低值),5,2), COLORRED,LINETHICK2
CC赋值:C-C的N日简单移动平均的绝对值/C的N日简单移动平均
输出鉴别线: D主力线的CC日简单移动平均,COLORAAAA00,LINETHICK2
输出起爆线: 57,画黄色
输出发作线:72,COLOR7F00FF
DRAWTEXT(主力线上穿发作线,75,'★发作!') ,COLORRED
输出临界限:42,画白色
输出卧槽线:27,COLORGREEN
输出抄底线:12,COLORAAAA00
DRAWTEXT(主力线上穿鉴别线AND 鉴别线<12,10,'★抄底') ,COLORAAAA00
DRAWTEXT(主力线上穿临界限,45,'★加仓'),画白色
DRAWTEXT(主力线上穿起爆线,60,'★起爆'),画黄色
DRAWTEXT(92上穿主力线,95,'★风险') ,COLORGREEN
DRAWTEXT(鉴别线上穿主力线AND 鉴别线>60,鉴别线-5,'★空仓') ,COLORMAGENTA
C输出M: (获利盘为M%的成本分布/(COST(0)+COST(100))*100),COLORMAGENTA,LINETHICK2
如果CM>主力线返回CM否则返回DRAWNULL
如果CM>主力线返回主力线否则返回DRAWNULL
DRAWTEXT(主力线上穿CM,CM,'主力★出场') ,COLORRED