趋势判牛支撑压力线通达信公式 主图 测试图加密有未来函数
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLORRED;
无敌:(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),DOTLINE,COLORYELLOW;
牛趋势:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK2,COLORRED;
无敌2:EMA(牛趋势,25)COLORCYAN,LINETHICK2;
DRAWBAND(牛趋势,RGB(55,0,0),无敌2,RGB(0,91,0));
DRAWKLINE(H,O,L,C);
STICKLINE(牛趋势>LOW AND 牛趋势<HIGH,牛趋势,MIN(MIN(OPEN,CLOSE),牛趋势),2,0),COLORYELLOW;
STICKLINE(牛趋势>MIN(C,O) AND 牛趋势<MAX(C,O),牛趋势,MIN(OPEN,CLOSE),2,0),COLORYELLOW;
STICKLINE(牛趋势>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;
STICKLINE(牛趋势>HIGH,HIGH,LOW,0,0),COLORYELLOW;
VAR23:=100*XMA(XMA((C-REF(C,1)),6),6)/XMA(XMA(ABS((C-REF(C,1))),6),6);
回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2) AND CROSS(VAR23,MA(VAR23,2));
XG:=牛趋势>HIGH AND 回调买 AND L<=牛趋势;
DRAWTEXT(XG,L,'▲买入'),COLORRED;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ)));
DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA,LINETHICK;
V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);
V5:=SMA(V2*120/FROMOPEN*5,2,1);
V10:=SMA(V5,5,1);
V20:=SMA(V10,5,1);
DY:=CURRBARSCOUNT=1 AND C<REF(C,1);
DY2:=REF(V2,1)-DY;
XG2:=C>O AND DY2<0.02 AND MA(C,5)>MA(C,60) AND C/REF(C,1)>=1.02 AND H<无敌;
{DRAWTEXT(XG2,L,'▲抓牛'),COLORYELLOW;}
DRAWTEXT(XG2 AND L<牛趋势,L,'金钻起涨'),COLORMAGENTA;
{DRAWTEXT_FIX(1,0.00,0.10,0,'无敌'),COLORYELLOW;
DRAWTEXT_FIX(1,0.00,0.15,0,'乾坤多空'),COLORYELLOW; }
VAR9:=CLOSE-REF(CLOSE,5);
VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);
VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20);
卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);
DRAWICON(卖出<0,H+0.05,2); 买线:=EMA(CLOSE,2);
卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;
S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;
S2:=IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN;
A0:=(L+H+C*2)/4;
A1:EMA(A0,14)COLORGREEN,LINETHICK2;
A2:=EMA(A0,25)COLORGREEN,LINETHICK2;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;
支撑:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL),COLORMAGENTA{,LINETHICK2};
压力:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL),COLORCYAN,{LINETHICK2};
买入持股: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 ),COLOR9933FF;
STICKLINE(CROSS(A1X,0),C,O,3,0 ),COLOR0000CC;
STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLOR0033FF;
STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLOR66CC33;
YJD:=IF(DATE+19000000>20200413,1,0);
DRAWTEXT_FIX(ISLASTBAR=1 AND YJD,0.1,0.2,0,''),COLORYELLOW;
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
该公式包含未来函数:XMA
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
Z1赋值:STRCAT(HYBLOCK,' ')
Z2赋值:STRCAT(Z1,DYBLOCK)
Z3赋值:STRCAT(Z2,' ')
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),画红色
输出无敌:(XXH的25日简单移动平均,25)-XXL的25日简单移动平均,25))*1+XXH的25日简单移动平均,25),DOTLINE,画黄色
输出牛趋势:XXL的25日简单移动平均,25)-(XXH的25日简单移动平均,25)-XXL的25日简单移动平均,25))*1, 线宽为2,画红色
无敌2:牛趋势的25日指数移动平均画青色, 线宽为2
DRAWBAND(牛趋势,RGB(55,0,0),无敌2,RGB(0,91,0))
DRAWKLINE(H,O,L,C)
STICKLINE(牛趋势>最低价 AND 牛趋势<最高价,牛趋势,开盘价和收盘价的较小值,牛趋势),2,0),画黄色
STICKLINE(牛趋势>C和O的较小值 AND 牛趋势当满足条件牛趋势>最高价时,在开盘价和收盘价之间画柱状线
当满足条件牛趋势>最高价时,在最高价和最低价之间画柱状线
VAR23赋值:100*XMA(XMA((C-1日前的C),6),6)/XMA(XMA((C-1日前的C的绝对值),6),6)
回调买赋值:2日内VAR23最低值=7日内VAR23最低值 AND 统计2日满足VAR23<0的天数 AND CROSS(VAR23,VAR23的2日简单移动平均)
XG赋值:牛趋势>最高价 AND 回调买 AND L<=牛趋势
当满足条件XG时,在L和'▲买入'位置书写文字
JJ赋值:(最高价+最低价+收盘价)/3
如果最高价=最低价返回4否则返回最高价-最低价
QJ1赋值:IF(当前流通股本=0,QJ0*(JJ-收盘价和开盘价的较小值),QJ0*IF(最高价=最低价,1,(开盘价和收盘价的较小值-最低价)))
QJ2赋值:IF(当前流通股本=0,QJ0*(开盘价和收盘价的较小值-最低价),QJ0*IF(最高价=最低价,1,(JJ-收盘价和开盘价的较小值)))
QJ3赋值:IF(当前流通股本=0,QJ0*(最高价-开盘价和收盘价较大值),QJ0*IF(最高价=最低价,1,(最高价-开盘价和收盘价较大值)))
QJ4赋值:IF(当前流通股本=0,QJ0*(收盘价和开盘价较大值-JJ),QJ0*IF(最高价=最低价,1,(收盘价和开盘价较大值-JJ)))
如果当前流通股本=0返回10000否则返回10000
V2赋值:SMA(IF(C>=1日前的C,DDX,-DDX/100),2,1)
V2*120/FROM开盘价*5的2日[1日权重]移动平均
V5的5日[1日权重]移动平均
V10的5日[1日权重]移动平均
DY赋值: 到最后交易的周期=1 AND C<1日前的C
DY2:=1日前的V2-DY
XG2:=C>O AND DY2<0.02 AND C的5日简单移动平均>C的60日简单移动平均 AND C/1日前的C>=1.02 AND H<无敌
当满足条件XG2时,在L和'▲抓牛'位置书写文字
当满足条件XG2 AND L<牛趋势时,在L和'金钻起涨'位置书写文字
当满足条件1时,在横轴0.00纵轴0.10位置书写文字
当满足条件1时,在横轴0.00纵轴0.15位置书写文字
}
VAR9赋值:收盘价-5日前的收盘价
VARA赋值:VAR9的5日指数移动平均,5)/EMA(EMA(VAR9的绝对值,5),5)
VARC赋值:VAR9的20日指数移动平均,20)/EMA(EMA(VAR9的绝对值,20),20)
卖出赋值:IF(VARA>0 AND VARC上穿VARA,90,100)
当满足条件卖出<0时,在H+0.05和2之间画图标
买线赋值:收盘价的2日指数移动平均
卖线赋值:EMA(SLOPE(收盘价,21)*20+收盘价,42)
输出B1:IF(买线上穿卖线,L-0.02,DRAWNULL),CROSSDOT, 线宽为3,画洋红色
输出S1:IF(80上穿RSI*30,H+0.02,DRAWNULL),CROSSDOT, 线宽为3,画黄色
VC赋值:((收盘价-收盘价的6日简单移动平均)/收盘价的6日简单移动平均*100+(收盘价-收盘价的24日简单移动平均)/收盘价的24日简单移动平均*100+(收盘价-MA (收盘价,32))/收盘价的32日简单移动平均*100)/3
S2赋值:IF(VC>20 AND FILTER(VC< 1日前的VC,5),H+0.02,DRAWNULL),CIRCLEDOT, 线宽为3,画绿色
A0赋值:(L+H+C*2)/4
输出A1:A0的14日指数移动平均画绿色, 线宽为2
A2赋值:A0的25日指数移动平均画绿色, 线宽为2
A1X:=(A1-1日前的A1)/1日前的A1*100,NODRAW
A2X:=(A2-1日前的A2)/1日前的A2*100,NODRAW
输出支撑:IF(A1X>=0 AND 上次A1X上穿0距今天数>0,REF((C+O)/2,上次A1X上穿0距今天数),DRAWNULL),画洋红色{, 线宽为2}
输出压力:IF(A1X<0 AND 上次0上穿A1X距今天数>0,REF((C+O)/2,上次0上穿A1X距今天数),DRAWNULL),画青色,{ 线宽为2}
如果A1X>=0返回A1否则返回DRAWNULL
如果A1X<0 AND A2X<0返回A1否则返回DRAWNULL
STICKLINE(A1X上穿0,H,L,0,0 ),COLOR9933FF
STICKLINE(A1X上穿0,C,O,3,0 ),COLOR0000CC
STICKLINE(A1X上穿0,C,O,1,0 ),COLOR0033FF
STICKLINE(0上穿A1X,L,H,0,0 ),COLOR66CC33
如果DATE+19000000>20200413返回1否则返回0
当满足条件ISLASTBAR=1 AND YJD时,在横轴0.1纵轴0.2位置书写文字