龙听期货论坛's Archiver

龙听 发表于 2018-12-24 15:16

大智慧精准宝塔线指标公式源码 红色持股青色持币[大智慧公式]

[code]
var1:=CLOSE>ref(CLOSE,1) AND CLOSE>ref(CLOSE,2);
var2:=ref(var1,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
var3:=ref(var2,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
var4:=ref(var3,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
var5:=ref(var4,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
var6:=ref(var5,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
var7:=ref(var6,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
var8:=ref(var7,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
var9:=ref(var8,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
varA:=ref(var9,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
varB:=ref(varA,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
varC:=ref(varB,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
varD:=CLOSE<ref(CLOSE,1) AND CLOSE<ref(CLOSE,2);
varE:=ref(varD,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
varF:=ref(varE,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
var10:=ref(varF,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
var11:=ref(var10,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
var12:=ref(var11,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
var13:=ref(var12,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
var14:=ref(var13,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
var15:=ref(var14,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
var16:=ref(var15,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
var17:=ref(var16,1) AND CLOSE<=ref(CLOSE,1) AND CLOSE>=ref(CLOSE,2);
var18:=ref(var17,1) AND CLOSE>=ref(CLOSE,1) AND CLOSE<=ref(CLOSE,2);
STICKLINE(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR
var8 OR var9 OR varA OR varB OR varC,CLOSE,ref(CLOSE,1),6,1),COLORRED;{红1}
STICKLINE(varD OR varE OR varF OR var10 OR var11 OR var12 OR var13 OR
var14 OR var15 OR var16 OR var17 OR var18,CLOSE,ref(CLOSE,1),6,0),ColorFFFF00;{青色}
var19:=ref(varD OR varE OR varF OR var10 OR var11 OR var12 OR var13 OR
var14 OR var15 OR var16 OR var17 OR var18,1) AND var1;
STICKLINE(var19,ref(CLOSE,1),ref(CLOSE,2),6,1),COLORYELLOW;{黄色}
var1A:=ref(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR
var8 OR var9 OR varA OR varB OR varC,1) AND varD;
STICKLINE(var1A,ref(CLOSE,1),ref(CLOSE,2),6,2),Color00FF00;
STICKLINE(var19,ref(CLOSE,1),ref(CLOSE,2),8,0),COLOR00FFFF;
STICKLINE(var1A,ref(CLOSE,1),ref(CLOSE,2),8,0),COLORFF00FF;{紫红色}

MA5:MA(c,5),COLORRED,linethick2;
DD5:=MA5<ref(MA5,1);
PARTLINE(MA5,DD5),ColorFFFF00,linethick2;
x:=(3*c+l+o+h)/6;
多空线:(20*x+19*ref(x,1)+18*ref(x,2)+17*ref(x,3)+16*ref(x,4)+15*ref(x,5)+14*ref(x,6)
+13*ref(x,7)+12*ref(x,8)+11*ref(x,9)+10*ref(x,10)+9*ref(x,11)+8*ref(x,12)
+7*ref(x,13)+6*ref(x,14)+5*ref(x,15)+4*ref(x,16)+3*ref(x,17)+2*ref(x,18)+
ref(x,20))/210,coloryelLOW,linethick2;
DD:=多空线<ref(多空线,1);
PARTLINE(多空线,DD),colorblue,linethick5;A:=(MA5>多空线);
PARTLINE(多空线,A),COLORYELLOW,POINTDOT;A1:=(MA5<多空线);
PARTLINE(多空线,A1),COLORWHITE;

红色持股:0,linethick0,COLORRED;
晶红卖出:var1A,linethick0,COLORFF50FF;
青色持币:0,linethick0,COLORFFFF00;
黄色买入:var19,linethick0,COLOR00ffff;
[/code]

页: [1]