曲线趋势顶底止盈止损 均线趋势
A:=ZIG(3,5);
零轴:5;
STICKLINE(A>=REF(A,1),2.1,2.9,9/3,0),COLORRED,LINETHICK1;
STICKLINE(A<REF(A,1),2.1,2.9,99/3,0),COLORGREEN,LINETHICK1;
{//02均线趋势}
均线1:=MA(CLOSE, 5);
STICKLINE(均线1>=REF(均线1,1),1,1.8,99/3,0),COLORMAGENTA,LINETHICK1;
CV:=CLOSE;
布林线:=MA(CLOSE,1)-(MA(CV,3)+MA(CV,6)+MA(CV,12)+MA(CV,24))/4;
STICKLINE(布林线>=0,0,0.8,99/3,0),COLORYELLOW,LINETHICK1;
DIFF :=EMA(CLOSE,10) - EMA(CLOSE,23);
DEA :=EMA(DIFF,8);
VAF:=TROUGHBARS(3,15,1)<4;
VAF2:=PEAKBARS(3,15,1)<4;
STICKLINE(FILTER(VAF=1,5),4,4.8,99/3,0),COLORRED,LINETHICK1;
DRAWTEXT(FILTER(VAF=1,3),4.6,'底'),COLORRED ,LINETHICK2;
STICKLINE(FILTER(VAF2=1,5),4,4.8,99/3,0),COLORGREEN,LINETHICK1;
DRAWTEXT(FILTER(VAF2=1,3),4.6,'顶'),COLORRED ,LINETHICK2;
STICKLINE(TROUGHBARS(3,3,1)=0 AND DIFF<0 AND DIFF<DEA,3,3.8,99/3,0),COLORRED,LINETHICK1;
STICKLINE(PEAKBARS(3,3,1)=0 AND DIFF>0 AND DIFF>DEA,3,3.8,99/3,0),COLORGREEN,LINETHICK1;
未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:PEAK
该公式包含未来函数:PEAKBARS
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
A赋值:ZIG(3,5)
输出零轴:5
STICKLINE(A>=1日前的A,2.1,2.9,9/3,0),画红色,LINETHICK1
STICKLINE(A<1日前的A,2.1,2.9,99/3,0),画绿色,LINETHICK1
{//02均线趋势}
均线1赋值:收盘价的 5日简单移动平均
STICKLINE(均线1>=1日前的均线1,1,1.8,99/3,0),COLORMAGENTA,LINETHICK1
CV赋值:收盘价
布林线赋值:收盘价的1日简单移动平均-(CV的3日简单移动平均+CV的6日简单移动平均+CV的12日简单移动平均+CV的24日简单移动平均)/4
当满足条件布林线>=0时,在0和0.8之间画柱状线
DIFF :=收盘价的10日指数移动平均 - 收盘价的23日指数移动平均
DEA :=DIFF的8日指数移动平均
VAF:=TROUGHBARS(3,15,1)<4
VAF2:=PEAKBARS(3,15,1)<4
STICKLINE(VAF=1的5过滤,4,4.8,99/3,0),画红色,LINETHICK1
DRAWTEXT(VAF=1的3过滤,4.6,'底'),画红色 , 线宽为2
STICKLINE(VAF2=1的5过滤,4,4.8,99/3,0),画绿色,LINETHICK1
DRAWTEXT(VAF2=1的3过滤,4.6,'顶'),画红色 , 线宽为2
如果F<0 AND DF如果F>0 AND DF>DEA返回3否则返回3.8