手机端
当前位置:爱约股 > 公式技巧 > 动能彩量 改为同花顺用

动能彩量 改为同花顺用

 网友求助:

动能彩量 改为同花顺用!谢谢!
主要是公式导入后量柱的颜色都不显示,请解决下!

源码如下:
var1:=high-low;
var2:=ABS(open-close );
var3:=high-if(close>open,close,o);
var4:=if(close>open,o,close)-low;
var5:=(var2/var1)*vol;
var6:=(var3/var1)*vol;
var7:=(var4/var1)*vol;
var8:=IF(VOL/CAPITAL>0.001,1,EXP(ABS(LOG(VOL/CAPITAL*100))));
var9:=(c-ma(c,5))/ma(c,5)*100;
var10:=ma(c,5)>ma(c,10) and ma(c,10)>ma(c,30) and ma(c,30)>ma(c,60);
var11:=ma(c,5)<ma(c,10) and ma(c,10)<ma(c,30) ;
var12:=100*(1-WINNER(C));
var13:=100*WINNER(C);
多头成交:stickline(c>ma(c,30),0,vol,8,1),colorred;
空头成交:stickline(c<ma(c,30),0,vol,8,1),colorgreen;
向上攻击量:stickline(var5>=var6 and var5>=var7 AND C>O,0,var5,8,0),colorred;
向下攻击量:stickline(var5>=var6 and var5>=var7 and c<o,0,var5,8,0),colorgreen;
上探量:stickline(var6>VAR5 and var6>var7,0,var6,8,0),colorcc00ff;
下探量:stickline(var7>var5 and var7>var6,0,var7,8,0),colorff6600;
相对地量:stickline( var8>2 and vol<ma(vol,5)/2,0,vol,2.5,0),color00ffff;
drawtext(var8>2 and v<ma(v,5)/2,v*3,'地量'),color00ffff;
放量:stickline(vol>ma(vol,5)*2.5,0,vol,2.5,0),colorwhite;
逢高出货:drawtext(var6>var5 and var9>2 and var6>var7 and c>ma(c,5) and c>ma(c,30) and h>ma(c,60) and v>ma(v,5) and var6>=ma(v,5),vol,'逢高出货'),colorgreen;
逢低跟进:drawtext(var7>var5 and var7>var6 and var9<-2 and c<ma(c,30) and var7<ma(v,5)/2 and ma(v,5)<ma(v,10),vol*2,'逢低跟进'),colorffbb00;
强势参与:drawtext(var5>ma(v,5)*2 and var5>=var6 and var5>=var7 and c>o or v>ma(vol,5)*3 and var10 ,vol,'强势参与'),colorcc00ff;
空头释放:drawtext(var5>=var6 and var5>=var7 and c<o and var5/vol>0.7 and var11 and var5>ma(v,5),var5*2,'空头释放')colorgreen;
ma5:ma(vol,5),colorred;
ma10:ma(v,10),colorgreen;

 

 

解答如下:

var1:=HIGH-LOW;
var2:=ABS(OPEN-CLOSE );
var3:=HIGH-IF(CLOSE>OPEN,CLOSE,O);
var4:=IF(CLOSE>OPEN,O,CLOSE)-LOW;
var5:=(var2/var1)*VOL;
var6:=(var3/var1)*VOL;
var7:=(var4/var1)*VOL;
var8:=IF(VOL/CAPITAL>0.001,1,EXP(ABS(LOG(VOL/CAPITAL*100))));
var9:=(C-MA(C,5))/MA(C,5)*100;
var10:=MA(C,5)>MA(C,10) AND MA(C,10)>MA(C,30) AND MA(C,30)>MA(C,60);
var11:=MA(C,5)<MA(C,10) AND MA(C,10)<MA(C,30) ;
var12:=100*(1-WINNER(C));
var13:=100*WINNER(C);
STICKLINE(C>MA(C,30),0,VOL,8,1),colorred;//多头成交:
STICKLINE(C<MA(C,30),0,VOL,8,1),colorgreen;//空头成交:
STICKLINE(var5>=var6 AND var5>=var7 AND C>O,0,var5,8,0),colorred;//向上攻击量:
STICKLINE(var5>=var6 AND var5>=var7 AND C<O,0,var5,8,0),colorgreen;//向下攻击量:
STICKLINE(var6>VAR5 AND var6>var7,0,var6,8,0),colorcc00ff;//上探量:
STICKLINE(var7>var5 AND var7>var6,0,var7,8,0),colorff6600;//下探量:
STICKLINE( var8>2 AND VOL<MA(VOL,5)/2,0,VOL,2.5,0),color00ffff;//相对地量:
DRAWTEXT(var8>2 AND V<MA(V,5)/2,V*3,'地量'),color00ffff;
STICKLINE(VOL>MA(VOL,5)*2.5,0,VOL,2.5,0),colorwhite;//放量:
DRAWTEXT(var6>var5 AND var9>2 AND var6>var7 AND C>MA(C,5) AND C>MA(C,30) AND H>MA(C,60) AND V>MA(V,5) AND var6>=MA(V,5),VOL,'逢高出货'),colorgreen;
DRAWTEXT(var7>var5 AND var7>var6 AND var9<-2 AND C<MA(C,30) AND var7<MA(V,5)/2 AND MA(V,5)<MA(V,10),VOL*2,'逢低跟进'),colorffbb00;
DRAWTEXT(var5>MA(V,5)*2 AND var5>=var6 AND var5>=var7 AND C>O OR V>MA(VOL,5)*3 AND var10 ,VOL,'强势参与'),colorcc00ff;
DRAWTEXT(var5>=var6 AND var5>=var7 AND C<O AND var5/VOL>0.7 AND var11 AND var5>MA(V,5),var5*2,'空头释放'),colorgreen;
ma5:MA(VOL,5),colorred;
ma10:MA(V,10),colorgreen;

TAG:同花顺
分享至:

相关推荐