以下是同花顺墨航完美变色布林公式
同花顺墨航完美变色布林公式
源码
中线趋势20:MA(CLOSE,20),colorliblue,linethick3;
上轨:中线趋势20+2*STD(CLOSE,20),colorgreen,linethick2;
下轨:中线趋势20-2*STD(CLOSE,20),colorgreen,linethick2;
中线趋势:=MA(C,26),colorwhite,linethick3;
中线趋势20大于45度角:=ATAN((MA(C,20)/REF(MA(C,20),1)-1)*100)*180/3.14159>=45;
中线趋势20小于45度角:=ATAN((MA(C,20)/REF(MA(C,20),1)-1)*100)*180/3.14159<45;
LC:=REF(CLOSE,1);
rsi1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
RSI3:=SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100;
RSI金叉:=CROSS(RSI1,RSI2) OR RSI1=RSI2;
RSV=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
a=SMA(RSV,3,1);
b=SMA(a,3,1);
e=3*a-2*b;
IF(a<0) a=0;
IF(a>100) a=100;
IF(b<0) b=0;
IF(b>100) b=100;
IF(e<0) ;
IF(e>100);
K:=a,coloryellow;
D:=b,colorliblue;
J:=e,colorlired;
kdj金叉:=CROSS(j,k) OR j=k;
DIFF : =EMA(CLOSE,12) – EMA(CLOSE,26),colorred;
DEA : =EMA(DIFF,9),colorliblue;
macd:=2*(DIFF-DEA),nodraw;
MACD范围:=(MACD>-0.4 AND MACD<0.5 AND MACD>=REF(MACD,1));
均量线10:=MA(VOL,10);
均量线20:=MA(VOL,20);
军量线金叉:=CROSS(均量线10,均量线20);
macd金叉=CROSS(diff,dea);
均量线macd金叉:=(军量线金叉 AND macd金叉);
均量线rsi金叉:=(军量线金叉 AND RSI金叉);
均量线kdj金叉:=(军量线金叉 AND kdj金叉);
macdkdj金叉:=(macd金叉 AND kdj金叉);
k线变色条件1:=(( RSI金叉 AND KDJ金叉 AND MACD范围) OR 均量线macd金叉 OR 均量线rsi金叉 OR 均量线kdj金叉 OR macdkdj金叉);
十三日日均线下变绿色:=MA(C,13);
STICKLINE(C<MA(C,13),OPEN,CLOSE,8,0),colorligreen;
STICKLINE(C/REF(C,1)>1.0925 AND C=H,CLOSE,OPEN,8,0),colormagenta;
C3:=REF(C,1);
跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(跌停,OPEN,CLOSE,8,0),colorgreen;
dIFF : =EMA(CLOSE,12) – EMA(CLOSE,26),colorred;
DEA : =EMA(DIFF,9),colorliblue;
MACD:=2*(DIFF-DEA),nodraw;
macd金叉=CROSS(diff,dea);
diff大于45度角:=ATAN((DIFF/REF(DIFF,1)-1)*100)*180/3.14159>45;
k线变色条件2:=(macd金叉 AND diff大于45度角);
STICKLINE(k线变色条件1,OPEN,CLOSE,8,0),coloryellow;
STICKLINE(k线变色条件2,OPEN,CLOSE,8,0),coloryellow;
中线趋势20:MA(CLOSE,20),colorliblue,linethick3;
上轨:中线趋势20+2*STD(CLOSE,20),colorgreen,linethick2;
下轨:中线趋势20-2*STD(CLOSE,20),colorgreen,linethick2;
生命线:=MA(CLOSE,34),colorgreen,linethick3;
大30度且34日线:=ATAN((MA(C,34)/REF(MA(C,34),1)-1)*100)*180/3.14159>=40;
小30度且34日线:=ATAN((MA(C,34)/REF(MA(C,34),1)-1)*100)*180/3.14159<45;
上升:=IF(大30度且34日线,生命线,DRAWNULL),colorwhite,linethick3;
中轨色1:IF((中线趋势20大于45度角 AND 大30度且34日线),中线趋势20,DRAWNULL),colorwhite,linethick4;
中轨色2:IF((中线趋势20大于45度角 AND 小30度且34日线),中线趋势20,DRAWNULL),coloryellow,linethick4;
半年线:=MA(CLOSE,120),colorblue,linethick1;
年线:=MA(CLOSE, 250),colorblue;
二十金六十:IF(中线趋势20>=多空趋势60,下轨,DRAWNULL),colorred,linethick2;
二十金一百二十:IF(中线趋势20>=半年线,上轨,DRAWNULL),colorred,linethick2;
评论(0)