空中加油通达信
RSVCC:=(CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100;
STICKLINE( RSVCC>0,60,0,8,0),COLOR880022;
STICKLINE( RSVCC>0,-40,0,8,0),COLOR003300;
DIFF1:= EMA(C,3) - EMA(C,13);
DEA1 := EMA(DIFF1,9);
MACD1:= 2*(DIFF1-DEA1)*10;
DIFF2:= EMA(C,5) - EMA(C,26);
DEA2 := EMA(DIFF2,9);
MACD2:= 2*(DIFF2-DEA2)*10;
DIFF3:= EMA(C,7) - EMA(C,89);
DEA3 := EMA(DIFF3,21);
MACD3:= 2*(DIFF3-DEA3)*10;
{STICKLINE(C>0,0,10,6,0),COLORE5C3EA;
STICKLINE(C>0,0,-5,6,0),COLORF6B06C;}
STICKLINE(MACD3>=0,0,MACD3,5,0),COLOR9999FF;
STICKLINE(MACD3<0,0,-MACD3,5,0),COLOR9999AA;
STICKLINE(MACD2>=0,0,MACD2,5,0),COLOR9966FF;{COLOR007D19};
STICKLINE(MACD2<0,0,-MACD2,5,0),COLOR557799;{COLOR555555};
STICKLINE(MACD1>=0,0,MACD1,5,0),COLOR9900FF;
STICKLINE(MACD1<0,0,-MACD1,5,0),COLOR556688;
STICKLINE(MACD3,0,-ABS(MACD3)*0.6,5,0),COLOR232323;
STICKLINE(MACD1,0,-ABS(MACD1)*0.6,5,0),COLOR0F0F0F;
VAR21:=((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;
绿星持币:VAR21,COLORGREEN,POINTDOT,LINETHICK4;
红星持股:IF(VAR21>0,VAR21,0),CIRCLEDOT,COLORRED,LINETHICK2;
短顶:STICKLINE(VAR21>9 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+2,0,3,0),COLORFF4400;
STICKLINE(VAR21>9 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+2,0,2.4,0),COLORFF6600;
STICKLINE(VAR21>9 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+2,0,1.8,0),COLORFF9900;
STICKLINE(VAR21>9 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+2,0,1.2,0),COLORFFCC00;
STICKLINE(VAR21>9 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+2,0,0.6,0),COLORGREEN;
大顶:STICKLINE(VAR21>20 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+20,0,7,0),COLOR003300;
STICKLINE(VAR21>20 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+20,0,6,0),COLOR005500;
STICKLINE(VAR21>20 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+20,0,5,0),COLOR007700;
STICKLINE(VAR21>20 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+20,0,3,0),COLOR009900;
STICKLINE(VAR21>20 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+20,0,0.5,0),COLOR00CC00;
VAR22:=HHV(VAR21>20,10);
危险: STICKLINE(VAR22 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),VAR21+10,0,4,0)COLORFF0033;
STICKLINE(VAR22 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),VAR21+10,0,3.3,0)COLORFF0066;
STICKLINE(VAR22 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),VAR21+10,0,2.4,0)COLORFF0099;
STICKLINE(VAR22 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),VAR21+10,0,1.6,0)COLORFF00CC;
STICKLINE(VAR22 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),VAR21+10,0,0.8,0)COLORFF00FF;
注意止损:STICKLINE(VAR22 AND FILTER(VAR21< REF(VAR21,1),6) AND CROSS(MA(CLOSE,5),MA(CLOSE,2)),VAR21+6,0,3,0)COLOR0035FF;
STICKLINE(VAR22 AND FILTER(VAR21< REF(VAR21,1),6) AND CROSS(MA(CLOSE,5),MA(CLOSE,2)),VAR21+6,0,2.4,0)COLOR0064FF;
STICKLINE(VAR22 AND FILTER(VAR21< REF(VAR21,1),6) AND CROSS(MA(CLOSE,5),MA(CLOSE,2)),VAR21+6,0,1.8,0)COLOR0093FF;
STICKLINE(VAR22 AND FILTER(VAR21< REF(VAR21,1),6) AND CROSS(MA(CLOSE,5),MA(CLOSE,2)),VAR21+6,0,1.2,0)COLOR00C2FF;
STICKLINE(VAR22 AND FILTER(VAR21< REF(VAR21,1),6) AND CROSS(MA(CLOSE,5),MA(CLOSE,2)),VAR21+6,0,0.6,0)COLOR00FFFF;
短底:STICKLINE(VAR21<-9 AND VAR21> REF(VAR21,1),VAR21-2,0,3,0),COLOR000033;
STICKLINE(VAR21<-9 AND VAR21> REF(VAR21,1),VAR21-2,0,2.4,0),COLOR000066;
STICKLINE(VAR21<-9 AND VAR21> REF(VAR21,1),VAR21-2,0,1.8,0),COLOR000099;
STICKLINE(VAR21<-9 AND VAR21> REF(VAR21,1),VAR21-2,0,1.2,0),COLOR0000CC;
STICKLINE(VAR21<-9 AND VAR21> REF(VAR21,1),VAR21-2,0,0.6,0),COLOR0000FF;
DRAWTEXT(VAR21>9 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+2,'短顶'),COLORCYAN;
DRAWTEXT(VAR21>20 AND FILTER(VAR21<REF(VAR21,1),5),VAR21+21,'大顶'),COLORGREEN;
DRAWTEXT(VAR22 AND CROSS((REF(HIGH,1)+REF(LOW,1))/2,MA(CLOSE,20)+2*STD(CLOSE,20)),VAR21+10,'危险'),COLOR0033FF;
DRAWTEXT(VAR22 AND FILTER(VAR21< REF(VAR21,1),6) AND CROSS(MA(CLOSE,5),MA(CLOSE,2)),VAR21+6,'注意止损'),COLORYELLOW;
DRAWTEXT(FILTER(VAR21<-9 AND VAR21>REF(VAR21,1),18),1.8,'买票准备');
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
MA250:=MA(CLOSE,250),COLORRED;
N1:=BARSLAST(CROSS(MA5,MA10));
N2:=BARSLAST(CROSS(MA10,MA5));
多:=IF(N1<N2,N1+1,0);
空:=IF(N2<N1,N2+1,0);
QSXS:=MA5>MA20 AND MA10>MA20 AND MA20>REF(MA20,1) AND MA30>REF(MA30,1);
启动:=多*QSXS,COLORRED,LINETHICK0;
跑道:=空*QSXS,COLORFFFF00,LINETHICK0;
HKFJ:=HHV(多,5)>=2 AND QSXS AND MA5>REF(MA5,1) AND MA5>MA10;
空中拉升:HKFJ*多,COLOR000099,LINETHICK3;
HKSJ:=BARSLAST(空中拉升>0 AND NOT(REF(空中拉升,1)))+1;
高度:=(C/REF(C,HKSJ)-1)*100,COLOR00FFFF;
客机安全高度:高度,COLOR999999;
空中加油:IF(高度>0,高度,0),COLORRED,LINETHICK3;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
RSVCC赋值:(收盘价-18日内最低价最低值)/(18日内最高价最高值-18日内最低价最低值)*100
当满足条件 RSVCC>0时,在60和0之间画柱状线
当满足条件 RSVCC>0时,在-40和0之间画柱状线
DIFF1赋值: C的3日指数移动平均 - C的13日指数移动平均
DEA1 := DIFF1的9日指数移动平均
MACD1赋值: 2*(DIFF1-DEA1)*10
DIFF2赋值: C的5日指数移动平均 - C的26日指数移动平均
DEA2 := DIFF2的9日指数移动平均
MACD2赋值: 2*(DIFF2-DEA2)*10
DIFF3赋值: C的7日指数移动平均 - C的89日指数移动平均
DEA3 := DIFF3的21日指数移动平均
MACD3赋值: 2*(DIFF3-DEA3)*10
当满足条件C>0时,在0和10之间画柱状线
当满足条件C>0时,在0和-5之间画柱状线
当满足条件MACD3>=0时,在0和MACD3之间画柱状线
当满足条件MACD3<0时,在0和-MACD3之间画柱状线
当满足条件MACD2>=0时,在0和MACD2之间画柱状线
{COLOR007D19}
当满足条件MACD2<0时,在0和-MACD2之间画柱状线
{COLOR555555}
当满足条件MACD1>=0时,在0和MACD1之间画柱状线
当满足条件MACD1<0时,在0和-MACD1之间画柱状线
STICKLINE(MACD3,0,-MACD3的绝对值*0.6,5,0),COLOR232323
STICKLINE(MACD1,0,-MACD1的绝对值*0.6,5,0),COLOR0F0F0F
VAR21赋值:((收盘价-收盘价的6日简单移动平均)/收盘价的6日简单移动平均*100+(收盘价-收盘价的24日简单移动平均)/收盘价的24日简单移动平均*100+(收盘价-收盘价的32日简单移动平均)/收盘价的32日简单移动平均*100)/3
输出
绿星持币:VAR21,画绿色,POINTDOT,LINETHICK4
如果VAR21>0返回VAR21否则返回0
输出
短顶:STICKLINE(VAR21>9 AND FILTER(VAR21<1日前的VAR21,5),VAR21+2,0,3,0),COLORFF4400
STICKLINE(VAR21>9 AND FILTER(VAR21<1日前的VAR21,5),VAR21+2,0,2.4,0),COLORFF6600
STICKLINE(VAR21>9 AND FILTER(VAR21<1日前的VAR21,5),VAR21+2,0,1.8,0),COLORFF9900
STICKLINE(VAR21>9 AND FILTER(VAR21<1日前的VAR21,5),VAR21+2,0,1.2,0),COLORFFCC00
STICKLINE(VAR21>9 AND FILTER(VAR21<1日前的VAR21,5),VAR21+2,0,0.6,0),画绿色
输出
大顶:STICKLINE(VAR21>20 AND FILTER(VAR21<1日前的VAR21,5),VAR21+20,0,7,0),COLOR003300
STICKLINE(VAR21>20 AND FILTER(VAR21<1日前的VAR21,5),VAR21+20,0,6,0),COLOR005500
STICKLINE(VAR21>20 AND FILTER(VAR21<1日前的VAR21,5),VAR21+20,0,5,0),COLOR007700
STICKLINE(VAR21>20 AND FILTER(VAR21<1日前的VAR21,5),VAR21+20,0,3,0),COLOR009900
STICKLINE(VAR21>20 AND FILTER(VAR21<1日前的VAR21,5),VAR21+20,0,0.5,0),COLOR00CC00
VAR22赋值:10日内VAR21>20最高值
输出
危险: STICKLINE(VAR22 AND CROSS((1日前的最高价+1日前的最低价)/2,收盘价的20日简单移动平均+2*收盘价的20估算标准差),VAR21+10,0,4,0)COLORFF0033
STICKLINE(VAR22 AND CROSS((1日前的最高价+1日前的最低价)/2,收盘价的20日简单移动平均+2*收盘价的20估算标准差),VAR21+10,0,3.3,0)COLORFF0066
STICKLINE(VAR22 AND CROSS((1日前的最高价+1日前的最低价)/2,收盘价的20日简单移动平均+2*收盘价的20估算标准差),VAR21+10,0,2.4,0)COLORFF0099
STICKLINE(VAR22 AND CROSS((1日前的最高价+1日前的最低价)/2,收盘价的20日简单移动平均+2*收盘价的20估算标准差),VAR21+10,0,1.6,0)COLORFF00CC
STICKLINE(VAR22 AND CROSS((1日前的最高价+1日前的最低价)/2,收盘价的20日简单移动平均+2*收盘价的20估算标准差),VAR21+10,0,0.8,0)COLORFF00FF
输出
注意止损:STICKLINE(VAR22 AND FILTER(VAR21< 1日前的VAR21,6) AND CROSS(收盘价的5日简单移动平均,收盘价的2日简单移动平均),VAR21+6,0,3,0)COLOR0035FF
STICKLINE(VAR22 AND FILTER(VAR21< 1日前的VAR21,6) AND CROSS(收盘价的5日简单移动平均,收盘价的2日简单移动平均),VAR21+6,0,2.4,0)COLOR0064FF
STICKLINE(VAR22 AND FILTER(VAR21< 1日前的VAR21,6) AND CROSS(收盘价的5日简单移动平均,收盘价的2日简单移动平均),VAR21+6,0,1.8,0)COLOR0093FF
STICKLINE(VAR22 AND FILTER(VAR21< 1日前的VAR21,6) AND CROSS(收盘价的5日简单移动平均,收盘价的2日简单移动平均),VAR21+6,0,1.2,0)COLOR00C2FF
STICKLINE(VAR22 AND FILTER(VAR21< 1日前的VAR21,6) AND CROSS(收盘价的5日简单移动平均,收盘价的2日简单移动平均),VAR21+6,0,0.6,0)COLOR00FFFF
输出
短底:STICKLINE(VAR21<-9 AND VAR21> 1日前的VAR21,VAR21-2,0,3,0),COLOR000033
STICKLINE(VAR21<-9 AND VAR21> 1日前的VAR21,VAR21-2,0,2.4,0),COLOR000066
STICKLINE(VAR21<-9 AND VAR21> 1日前的VAR21,VAR21-2,0,1.8,0),COLOR000099
STICKLINE(VAR21<-9 AND VAR21> 1日前的VAR21,VAR21-2,0,1.2,0),COLOR0000CC
STICKLINE(VAR21<-9 AND VAR21> 1日前的VAR21,VAR21-2,0,0.6,0),COLOR0000FF
DRAWTEXT(VAR21>9 AND FILTER(VAR21<1日前的VAR21,5),VAR21+2,'短顶'),画青色
DRAWTEXT(VAR21>20 AND FILTER(VAR21<1日前的VAR21,5),VAR21+21,'大顶'),画绿色
DRAWTEXT(VAR22 AND CROSS((1日前的最高价+1日前的最低价)/2,收盘价的20日简单移动平均+2*收盘价的20估算标准差),VAR21+10,'危险'),COLOR0033FF
DRAWTEXT(VAR22 AND FILTER(VAR21< 1日前的VAR21,6) AND CROSS(收盘价的5日简单移动平均,收盘价的2日简单移动平均),VAR21+6,'注意止损'),画黄色
DRAWTEXT(FILTER(VAR21<-9 AND VAR21>1日前的VAR21,18),1.8,'买票准备')
MA5赋值:收盘价的5日简单移动平均
MA10赋值:收盘价的10日简单移动平均
MA20赋值:收盘价的20日简单移动平均
MA30赋值:收盘价的30日简单移动平均
MA250赋值:收盘价的250日简单移动平均,画红色
N1赋值:上次MA5上穿MA10距今天数
N2赋值:上次MA10上穿MA5距今天数
如果N1如果N2
QSXS赋值:MA5>MA20 AND MA10>MA20 AND MA20>1日前的MA20 AND MA30>1日前的MA30
启动赋值:多*QSXS,画红色,LINETHICK0
跑道赋值:空*QSXS,COLORFFFF00,LINETHICK0
HKFJ赋值:5日内多最高值>=2 AND QSXS AND MA5>1日前的MA5 AND MA5>MA10
空中拉升:HKFJ*多,COLOR000099, 线宽为3
HKSJ赋值:上次空中拉升>0 AND NOT(1日前的空中拉升距今天数)+1
高度赋值:(C/HKSJ日前的C-1)*100,COLOR00FFFF
输出
客机安全高度:高度,COLOR999999
如果高度>0返回高度否则返回0