低买高卖波段操作主图通达信指标 主图 源码附图
M1:=60;
STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;
STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;
MA1:MA(CLOSE,M1),COLORMAGENTA,LINETHICK2;
EMA13:=EMA(C,13),COLORWHITE;
EMA21:=EMA(C,21),COLORYELLOW;
EMA34:=EMA(C,34),COLORFF00FF;
EMA60:=MA(C,60),COLORFFCC66;
VAR2:=(2*CLOSE+HIGH+LOW)/4;
VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);
VAR4:=LLV(LOW,5);
VAR5:=HHV(HIGH,4);
散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;
庄家:=EMA(0.777*REF(散户,1)+0.333*散户,2)*VAR3;
DRAWTEXT(CROSS(散户,庄家) AND 散户< 30,L-0.05,'←低吸'),COLORLIRED;
DRAWTEXT(CROSS(庄家,散户) AND 散户>85,H+0.05,'←高抛'),COLORGREEN;
DRAWICON(CROSS(散户,庄家) AND 散户< 30,L-0.05,1);
DRAWICON(CROSS(庄家,散户) AND 散户>85,H+0.05,2);
A0:=(L+H+C*2)/4;
A1:EMA(A0,14)COLORWHITE ,LINETHICK2;
A2:=EMA(A0,25)COLORLIBLUE,LINETHICK2;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;
买入持股:IF(A1X>=0,A1,DRAWNULL)COLORRED ,LINETHICK3;
卖出空仓:IF(A1X< 0 AND A2X< 0,A1,DRAWNULL)COLORGREEN,LINETHICK3;
STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLORYELLOW ;
STICKLINE(CROSS(A1X,0),C,O,3,0 ),COLORYELLOW ;
STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLORYELLOW ;
STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLORYELLOW ;
MA5:MA(C,5),LINETHICK0,COLORFF00FF;
MA20:=MA(C,20);
MA30:=MA(C,30);
MA120:=SMA(C,120,1);
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
QSXS1:=MA5>REF(MA5,1);
QSXS2:=MA20>REF(MA20,1);
QSXS3:=MA30>REF(MA30,1);
DTPL:=MA20>MA30 AND MA30>MA120;
LYT:=DTPL AND QSXS2 AND QSXS3 AND COUNT(QSXS1,4)<=1;
GJHS:=C>MA5 AND ((QSXS1 AND NOT(REF(QSXS1,1))) OR C>REF(C,3));
买1:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX< 0,2) AND CROSS(DX,MA(DX,2)),1,0);
DRAWTEXT(FILTER(买1=1,5),LOW-0.03,'▲ 买'),COLORYELLOW;
卖1:=IF(HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX),1,0);
DRAWTEXT(FILTER(卖1=1,5),HIGH*1.025,'● 卖'),COLOR00FF00;
VAR6:=REF(C,1);
VAR7:=SMA(MAX(C-VAR6,0),6,1)/SMA(ABS(C-VAR6),6,1)*100;
DRAWTEXT(CROSS(84,VAR7),H*1.01,'顶'),COLORFFFF00;
STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;
STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORFFFFFF;
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR990000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLORCC0000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLORFF4400;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORFF8800;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORFFCC00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLORCYAN;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
M1赋值:60
STICKLINE(收盘价> 1日前的收盘价 ,最高价,最低价,0,1 ),画红色
STICKLINE(收盘价> 1日前的收盘价 ,开盘价,收盘价,3,0 ),COLOR000055
STICKLINE(收盘价> 1日前的收盘价 ,开盘价,收盘价,2.7,0 ),COLOR000077
STICKLINE(收盘价> 1日前的收盘价 ,开盘价,收盘价,2.1,0 ),COLOR000099
STICKLINE(收盘价> 1日前的收盘价 ,开盘价,收盘价,1.5,0 ),COLOR0000BB
STICKLINE(收盘价> 1日前的收盘价 ,开盘价,收盘价,0.9,0 ),COLOR0000DD
STICKLINE(收盘价> 1日前的收盘价 ,开盘价,收盘价,0.3,0 ),COLOR0000FF
输出MA1:收盘价的M1日简单移动平均,画洋红色, 线宽为2
EMA13:=C的13日指数移动平均,画白色
EMA21赋值:C的21日指数移动平均,画黄色
EMA34赋值:C的34日指数移动平均,COLORFF00FF
EMA60赋值:C的60日简单移动平均,COLORFFCC66
VAR2赋值:(2*收盘价+最高价+最低价)/4
如果YEAR>=2099 AND MONTH>2返回0否则返回1
VAR4赋值:5日内最低价最低值
VAR5赋值:4日内最高价最高值
散户赋值:EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3
庄家赋值:E0.777*1日前的散户+0.333*散户的2日简单移动平均*VAR3
DRAWTEXT(散户上穿庄家 AND 散户< 30,L-0.05,'←低吸'),COLORLIRED
DRAWTEXT(庄家上穿散户 AND 散户>85,H+0.05,'←高抛'),画绿色
DRAWICON(散户上穿庄家 AND 散户< 30,L-0.05,1)
DRAWICON(庄家上穿散户 AND 散户>85,H+0.05,2)
A0赋值:(L+H+C*2)/4
输出A1:A0的14日指数移动平均画白色 , 线宽为2
A2赋值:A0的25日指数移动平均COLORLIBLUE, 线宽为2
A1X:=(A1-1日前的A1)/1日前的A1*100,NODRAW
A2X:=(A2-1日前的A2)/1日前的A2*100,NODRAW
如果A1X>=0返回A1否则返回DRAWNULL
如果A1X< 0 AND A2X< 0返回A1否则返回DRAWNULL
STICKLINE(A1X上穿0,H,L,0,0 ),画黄色
STICKLINE(A1X上穿0,C,O,3,0 ),画黄色
STICKLINE(A1X上穿0,C,O,1,0 ),画黄色
STICKLINE(0上穿A1X,L,H,0,0 ),画黄色
输出MA5:C的5日简单移动平均,LINETHICK0,COLORFF00FF
MA20:=C的20日简单移动平均
MA30赋值:C的30日简单移动平均
C的120日[1日权重]移动平均
MTM赋值:C-1日前的C
DX赋值:100*MTM的6日指数移动平均,6)/EMA(EMA(MTM的绝对值,6),6)
QSXS1赋值:MA5>1日前的MA5
QSXS2赋值:MA20>1日前的MA20
QSXS3赋值:MA30>1日前的MA30
DTPL赋值:MA20>MA30 AND MA30>MA120
LYT赋值:DTPL AND QSXS2 AND QSXS3 AND 统计4日满足QSXS1的天数<=1
GJHS赋值:C>MA5 AND ((QSXS1 AND NOT(1日前的QSXS1)) OR C>3日前的C)
买1赋值:IF(2日内DX最低值=7日内DX最低值 AND 统计2日满足DX< 0的天数 AND CROSS(DX,DX的2日简单移动平均),1,0)
DRAWTEXT(买1=1的5过滤,最低价-0.03,'▲ 买'),画黄色
卖1赋值:IF(2日内DX最高值=7日内DX最高值 AND 统计2日满足DX>50的天数 AND CROSS(DX的2日简单移动平均,DX),1,0)
DRAWTEXT(卖1=1的5过滤,最高价*1.025,'● 卖'),COLOR00FF00
VAR6赋值:1日前的C
VAR7赋值:SMA(C-VAR6和0较大值,6,1)/SMA(C-VAR6的绝对值,6,1)*100
DRAWTEXT(84上穿VAR7,H*1.01,'顶'),COLORFFFF00
STICKLINE(收盘价= 1日前的收盘价 ,最高价,最低价,0,1 ),画白色
STICKLINE(收盘价= 1日前的收盘价 ,开盘价,收盘价,3,0 ),COLOR555555
STICKLINE(收盘价= 1日前的收盘价 ,开盘价,收盘价,2.7,0 ),COLOR777777
STICKLINE(收盘价= 1日前的收盘价 ,开盘价,收盘价,2.1,0 ),COLOR999999
STICKLINE(收盘价= 1日前的收盘价 ,开盘价,收盘价,1.5,0 ),COLORBBBBBB
STICKLINE(收盘价= 1日前的收盘价 ,开盘价,收盘价,0.9,0 ),COLORDDDDDD
STICKLINE(收盘价= 1日前的收盘价 ,开盘价,收盘价,0.3,0 ),COLORFFFFFF
STICKLINE(收盘价< 1日前的收盘价 ,最高价,最低价,0,1 ),画青色
STICKLINE(收盘价< 1日前的收盘价 ,开盘价,收盘价,3,0 ),COLOR990000
STICKLINE(收盘价< 1日前的收盘价 ,开盘价,收盘价,2.7,0 ),COLORCC0000
STICKLINE(收盘价< 1日前的收盘价 ,开盘价,收盘价,2.1,0 ),COLORFF4400
STICKLINE(收盘价< 1日前的收盘价 ,开盘价,收盘价,1.5,0 ),COLORFF8800
STICKLINE(收盘价< 1日前的收盘价 ,开盘价,收盘价,0.9,0 ),COLORFFCC00
STICKLINE(收盘价< 1日前的收盘价 ,开盘价,收盘价,0.3,0 ),画青色