同花顺抄底与卖出副图指标 买卖参考 源码分享 附图
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
CCI修正1:EMA(EMA(EMA(CCI,2),2),2);
CCI修正2:EMA(EMA(EMA(CCI,3),2),2);
VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
VAR3:=EMA(VAR2,10);
VAR4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);
z:0,colorblack;
主力进场:IF(VAR5>REF(VAR5,1),VAR5,0),colorred,NODRAW;
洗盘:IF(VAR5<REF(VAR5,1),VAR5,0),colorgreen,NODRAW;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),colorgreen;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0 ),COLOR000055;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.6,0 ),COLOR000077;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.1,0 ),COLOR000099;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1.5,0 ),COLOR0000BB;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.9,0 ),COLOR0000DD;
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.3,0 ),COLOR0000FF;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),COLOR005500;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.6,0),COLOR007700;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.1,0),COLOR009900;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,1.5,0),COLOR00BB00;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.9,0),COLOR00DD00;
STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.3,0),COLOR00FF00;
VAR21:=SMA(ABS(HIGH-VAR1),13,1)/SMA(MIN(HIGH-VAR1,0),10,1);
VAR31:=EMA(VAR21,5);
VAR41:=HHV(HIGH,11);
VAR51:=EMA(IF(HIGH>=VAR41,VAR31,0),3);
主力拉高:IF(VAR51<REF(VAR51,1),VAR51,0),coloryellow,NODRAW;
STICKLINE(VAR51<REF(VAR51,1),0,VAR51,3,0),coloryellow;
出货:IF(VAR51>REF(VAR51,1),VAR51,0),colorcyan,NODRAW;
STICKLINE(VAR51>REF(VAR51,1),0,VAR51,3,0 ),colorcyan;
VAR8:=VOL>2*MA(VOL,30);
VARB:=CLOSE>MA(CLOSE,30) AND CLOSE<MA(CLOSE,30)*1.04;
VARC:=MA(CLOSE,30)>REF(MA(CLOSE,30),1);
VARD:=BARSLAST(CROSS(MA(CLOSE,5),MA(CLOSE,10)))<BARSLAST(CROSS(MA(CLOSE,10),MA(CLOSE,5)));
VARE:=0-"MACD.DIFF"(7,21,3);
VARF:=TROUGHBARS(3,15,1)<4;
VAR10:=EMA(CLOSE,30)>REF(EMA(CLOSE,30),2);
VAR11:=IF(VARF=1,50,0);
DRAWTEXT(FILTER(VARF=1,3),20,'▲买入'),colorred ;
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,30);
VAR6:=HHV(VAR4,30);
VAR7:=IF(MA(CLOSE,58),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
VAR9:=IF(VAR8>100,100,VAR8);
VAR3:=PEAKBARS(3,15,1)<10;
VAR5:=IF(VAR3=1,2,0);
顶:= IF(VAR5=2,2,0);
顶A:=IF(顶>REF(顶,1),50,0),colorgreen;
DRAWTEXT(顶A=50,95,'▼卖出'),COLOR00FF00;
未来函数检测结果如下:
该公式包含未来函数:PEAK
该公式包含未来函数:PEAKBARS
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
TYP赋值:(最高价+最低价+收盘价)/3
CCI赋值:(TYP-TYP的14日简单移动平均)/(0.015*AVEDEV(TYP,14))
CCI修正1:CCI的2日指数移动平均,2),2)
CCI修正2:CCI的3日指数移动平均,2),2)
VAR1赋值:REF((最低价+开盘价+收盘价+最高价)/4,1)
VAR2赋值:SMA(最低价-VAR1的绝对值,13,1)/SMA(最低价-VAR1和0较大值,10,1)
VAR3赋值:VAR2的10日指数移动平均
VAR4赋值:33日内最低价最低值
如果最低价<=VAR4返回VAR3否则返回0
输出Z:0,COLORBLACK
输出主力进场:IF(VAR5>1日前的VAR5,VAR5,0),画红色,NODRAW
输出洗盘:IF(VAR5<1日前的VAR5,VAR5,0),画绿色,NODRAW
STICKLINE(VAR5<1日前的VAR5,0,VAR5,3,0),画绿色
STICKLINE(VAR5>1日前的VAR5,0,VAR5,3,0 ),COLOR000055
STICKLINE(VAR5>1日前的VAR5,0,VAR5,2.6,0 ),COLOR000077
STICKLINE(VAR5>1日前的VAR5,0,VAR5,2.1,0 ),COLOR000099
STICKLINE(VAR5>1日前的VAR5,0,VAR5,1.5,0 ),COLOR0000BB
STICKLINE(VAR5>1日前的VAR5,0,VAR5,0.9,0 ),COLOR0000DD
STICKLINE(VAR5>1日前的VAR5,0,VAR5,0.3,0 ),COLOR0000FF
STICKLINE(VAR5<1日前的VAR5,0,VAR5,3,0),COLOR005500
STICKLINE(VAR5<1日前的VAR5,0,VAR5,2.6,0),COLOR007700
STICKLINE(VAR5<1日前的VAR5,0,VAR5,2.1,0),COLOR009900
STICKLINE(VAR5<1日前的VAR5,0,VAR5,1.5,0),COLOR00BB00
STICKLINE(VAR5<1日前的VAR5,0,VAR5,0.9,0),COLOR00DD00
STICKLINE(VAR5<1日前的VAR5,0,VAR5,0.3,0),COLOR00FF00
VAR21:=SMA(最高价-VAR1的绝对值,13,1)/SMA(最高价-VAR1和0的较小值,10,1)
VAR31:=VAR21的5日指数移动平均
VAR41:=11日内最高价最高值
如果最高价>=VAR41返回VAR31否则返回0
输出主力拉高:IF(VAR51<1日前的VAR51,VAR51,0),画黄色,NODRAW
STICKLINE(VAR51<1日前的VAR51,0,VAR51,3,0),画黄色
输出出货:IF(VAR51>1日前的VAR51,VAR51,0),画青色,NODRAW
STICKLINE(VAR51>1日前的VAR51,0,VAR51,3,0 ),画青色
VAR8赋值:成交量>2*成交量的30日简单移动平均
VARB赋值:收盘价>收盘价的30日简单移动平均 AND 收盘价<收盘价的30日简单移动平均*1.04
VARC赋值:收盘价的30日简单移动平均>REF(收盘价的30日简单移动平均,1)
VARD赋值:上次CROSS(收盘价的5日简单移动平均,收盘价的10日简单移动平均距今天数)VARE赋值:0-"MACD.DIFF"(7,21,3)
VARF赋值:TROUGHBARS(3,15,1)<4
VAR10:=收盘价的30日指数移动平均>2日前的收盘价的30日指数移动平均
如果VARF=1返回50否则返回0
DRAWTEXT(VARF=1的3过滤,20,'▲买入'),画红色
VAR2赋值:1日前的最低价
VAR3赋值:SMA(最低价-VAR2的绝对值,3,1)/SMA(最低价-VAR2和0较大值,3,1)*100
如果收盘价*1.3返回VAR3*10否则返回VAR3/10
VAR5赋值:30日内最低价最低值
VAR6赋值:30日内VAR4最高值
VAR7赋值:IF(收盘价的58日简单移动平均,1,0)
VAR8赋值:EMA(IF(最低价<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7
如果VAR8>100返回100否则返回VAR8
VAR3赋值:PEAKBARS(3,15,1)<10
如果VAR3=1返回2否则返回0
如果VAR5=2返回2否则返回0
顶A:=IF(顶>1日前的顶,50,0),画绿色
当满足条件顶A=50时,在95和'▼卖出'位置书写文字