同花顺青翼福王副图指标公式买卖提示源码
M1:=3;M2:=5;M3:=7;M4:=13;M5:=15;M6:=21;
Q3:=SMA(Q2, 12, 1);
长趋势:3*Q3-2*Q4,colorwhite,LINETHICK2;
DRAWTEXT(CROSS(趋势线, 长趋势) AND REF(长趋势,1)>88, REF(长趋势,12), '顶'),colorred,LINETHICK5;
买: DRAWTEXT(REF(CROSS(长趋势,趋势线),1) AND 长趋势>0.04*趋势线,趋势线,''),colorred,LINETHICK1;
VAR5:=IF(VAR3=1,2,0);
顶A:IF(顶>REF(顶,1),50,0),colorgreen;
金叉: CROSS(长趋势,趋势线);
VAR1:=LLV(HIGH,240);
VAR3:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR5:=0;
SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VARB:=VAR6<20 AND VAR7<23 AND VARA>35;
VARD:=EMA(CLOSE,21)-EMA(CLOSE,8);
VARF:=TROUGHBARS(3,6,1)<4 AND CROSS(VARD,VARE);
VAR9:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND
VAR10:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND
VAR11:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2)
VAR12:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2)
VAR13:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2)
VAR14:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2)
VAR15:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2)
VAR16:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2)
VAR17:=EMA(CLOSE,2)-EMA(CLOSE,150);
VAR1B:=2*(VAR17-VAR1A);
VAR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
VAR1F:=(HIGH+LOW+CLOSE)/3;
VAR19:=CROSS(VAR1E,LOW);
组合买:=(VAR9+VAR11+VAR13+VAR15);
黑马线:=IF(YEAR<2098 AND VAR1B>0.1,VAR1C,0);
AND VAR4=0 AND VAR18<(-110);
STICKLINE(组合买,CLOSE,OPEN,1,0),colorblue;
STICKLINE(组合卖,CLOSE,OPEN,1,0),colorgreen;
STICKLINE(选股买点,CLOSE,OPEN,1,0),colorblue;
DRAWTEXT(VAR14,HIGH,'空仓'), LINETHICK3, colorcyan;
LINETHICK3 ;
VAA2:=(ZIG(3,10) > REF(ZIG(3,10),1)) AND (REF(ZIG(3,10),1) < REF(ZIG(3,10),2));
DRAWTEXT(VAA2 AND (DATE < 1070804),LOW,'买入'),coloryellow;
STICKLINE(VAA1 AND (DATE < 1070804),HIGH,LOW,1.5,0),coloryellow;
STICKLINE(VAA2 AND (DATE < 1070804),HIGH,LOW,1.5,0),COLORFF00FF;
半月线:MA(CLOSE,M2),coloryellow;
季度线:MA(CLOSE,M4),colorgreen;
年线:MA(CLOSE,M6),colorblue
未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
M1赋值:3
M2赋值:5
M3赋值:7
M4赋值:13
M5赋值:15
M6赋值:21
Q2的 12日[ 1日权重]移动平均
输出长趋势:3*Q3-2*Q4,画白色, 线宽为2
DRAWTEXT(趋势线上穿 长趋势 AND 1日前的长趋势>88, 12日前的长趋势, '顶'),画红色,LINETHICK5
输出买: DRAWTEXT(1日前的长趋势上穿趋势线 AND 长趋势>0.04*趋势线,趋势线,''),画红色,LINETHICK1
如果VAR3=1返回2否则返回0
输出顶A:IF(顶>1日前的顶,50,0),画绿色
输出金叉: 长趋势上穿趋势线
VAR1赋值:240日内最高价最低值
VAR3赋值:(收盘价-528日内最低价最低值)/(528日内最高价最高值-528日内最低价最低值)*100
VAR5赋值:0
SMA(收盘价-1日前的收盘价的绝对值,7,1)*100
SMA(收盘价-1日前的收盘价的绝对值,13,1)*100
VARB赋值:VAR6<20 AND VAR7<23 AND VARA>35
VARD赋值:收盘价的21日指数移动平均-收盘价的8日指数移动平均
VARF赋值:TROUGHBARS(3,6,1)<4 AND VARD上穿VARE
VAR9:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND
VAR10:=ZIG(3,6)[=REF(ZIG(3,6),2) AND
VAR11:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2)
VAR12:=ZIG(3,22)][=REF(ZIG(3,22),2)
VAR13:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2)
VAR14:=ZIG(3,51)][=REF(ZIG(3,51),2)
VAR15:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2)
VAR16:=ZIG(3,72)][=REF(ZIG(3,72),2)
VAR17:=收盘价的2日指数移动平均-收盘价的150日指数移动平均]
VAR1B:=2*(VAR17-VAR1A)
VAR1D:=SQRT(SQRT(最低价*最高价*开盘价*收盘价))
VAR1F:=(最高价+最低价+收盘价)/3
VAR19:=VAR1E上穿最低价
组合买赋值:(VAR9+VAR11+VAR13+VAR15)
如果YEAR<2098 AND VAR1B>0.1返回VAR1C否则返回0
AND VAR4=0 AND VAR18<(-110)
当满足条件组合买时,在收盘价和开盘价之间画柱状线
当满足条件组合卖时,在收盘价和开盘价之间画柱状线
当满足条件选股买点时,在收盘价和开盘价之间画柱状线
当满足条件VAR14时,在最高价和'空仓'位置书写文字
线宽为3
VAA2赋值:(ZIG(3,10) > REF(ZIG(3,10),1)) AND (REF(ZIG(3,10),1) < REF(ZIG(3,10),2))
DRAWTEXT(VAA2 AND (DATE < 1070804),最低价,'买入'),画黄色
STICKLINE(VAA1 AND (DATE < 1070804),最高价,最低价,1.5,0),画黄色
STICKLINE(VAA2 AND (DATE < 1070804),最高价,最低价,1.5,0),COLORFF00FF
输出半月线:收盘价的M2日简单移动平均,画黄色
输出季度线:收盘价的M4日简单移动平均,画绿色
输出年线:收盘价的M6日简单移动平均, 画蓝色