源代码:
var1=ifelse(open<=refBefore(open,1),0,max(high-open,open-refBefore(open,1)));
var2=ifelse(open>=refBefore(open,1),0,max(open-low,open-refBefore(open,1)));
var3=sum(var1,5);
var4=sum(var2,5);
var5=ifelse(var3>var4,(var3-var4)/var3,ifelse(var3==var4,0,(var3-var4)/var4));
var6=ma(var5,5);
var8=ifelse(open<=refBefore(open,1),0,max(high-open,open-refBefore(open,1)));
var9=ifelse(open>=refBefore(open,1),0,max(open-low,open-refBefore(open,1)));
vara=sum(var8,3);
varb=sum(var9,3);
varc=ifelse(vara>varb,(vara-varb)/vara,ifelse(vara==varb,0,(vara-varb)/varb));
vard=ma(varc,3);
火=barsFromPrevTrue(ema(close,5)<refBefore(ema(close,5),1));
draw(火,color="red");
vare=highest(close,2);
varf=barsFromPrevTrue(vare<refBefore(vare,2));
var10=ifelse(varf>=1,lowest(vare,varf),low);
var11=var10+var10*varf*0.5/100;
var12=ifelse(var11<refBefore(var11,1),ma(low,3),var11);
var13=var10+var10*(varf-1)*1.618/100;
山=count(ema(close,5)>refBefore(ema(close,5),1),5);
draw(山,color="white");
var14=ifelse(open<=refBefore(open,1),0,max(high-open,open-refBefore(open,1)));
var15=ifelse(open>=refBefore(open,1),0,max(open-low,open-refBefore(open,1)));
var16=sum(var8,3);
var17=sum(var9,3);
var18=ifelse(vara>varb,(vara-varb)/vara,ifelse(vara==varb,0,(vara-varb)/varb));
var19=ma(varc,3);
买入或持股="";
drawStickBetweenIf(山>0,火,0,fill=true,linewidth=2,color="red");
var1a=ifelse(open<=refBefore(open,1),0,max(high-open,open-refBefore(open,1)));
var1b=ifelse(open>=refBefore(open,1),0,max(open-low,open-refBefore(open,1)));
var1c=sum(var8,3);
var1d=sum(var9,3);
var1e=ifelse(vara>varb,(vara-varb)/vara,ifelse(vara==varb,0,(vara-varb)/varb));
var1f=ma(varc,3);
下跌抛出="";
drawStickBetweenIf(山>0,火,山,fill=false,linewidth=2,color="#f0f000");
var20=ifelse(open<=refBefore(open,1),0,max(high-open,open-refBefore(open,1)));
var21=ifelse(open>=refBefore(open,1),0,max(open-low,open-refBefore(open,1)));
var22=sum(var8,3);
var23=sum(var9,3);
var24=ifelse(vara>varb,(vara-varb)/vara,ifelse(vara==varb,0,(vara-varb)/varb));
var25=ma(varc,3);
观望="";
drawStickBetweenIf(山==0&&火==0,0,1,fill=false,linewidth=4,color="blue");
var26=ifelse(open<=refBefore(open,1),0,max(high-open,open-refBefore(open,1)));
var27=ifelse(open>=refBefore(open,1),0,max(open-low,open-refBefore(open,1)));
var28=sum(var8,3);
var29=sum(var9,3);
var2a=ifelse(vara>varb,(vara-varb)/vara,ifelse(vara==varb,0,(vara-varb)/varb));
var2b=ma(varc,3);
植被="";
drawStickBetweenIf(山<火,火,山,fill=true,linewidth=1,color="#00ff00");
var2c=ifelse(open<=refBefore(open,1),0,max(high-open,open-refBefore(open,1)));
var2d=ifelse(open>=refBefore(open,1),0,max(open-low,open-refBefore(open,1)));
var2e=sum(var8,3);
var2f=sum(var9,3);
var30=ifelse(vara>varb,(vara-varb)/vara,ifelse(vara==varb,0,(vara-varb)/varb));
var31=ma(varc,3);
var32=(close-lowest(low,5))/(highest(high,5)-lowest(low,5))*10;
k=sma(sma(var32,2,1),2,1);
draw(k,color="#00ff00");
d=sma(sma(sma(var32,2,1),2,1),3,1);
draw(d,color="yellow");
j=(3*sma(sma(var32,2,1),2,1)-2*sma(sma(sma(var32,2,1),2,1),3,1));
draw(j,color="#f00ff0");
var33=ifelse(open<=refBefore(open,1),0,max(high-open,open-refBefore(open,1)));
var34=ifelse(open>=refBefore(open,1),0,max(open-low,open-refBefore(open,1)));
var35=sum(var8,3);
var36=sum(var9,3);
var37=ifelse(vara>varb,(vara-varb)/vara,ifelse(vara==varb,0,(vara-varb)/varb));
var38=ma(varc,3);
drawStickBetweenIf(refBefore(山,1)==0&&山>0,0,-1,color="red",fill=true,linewidth=2);
drawText(refBefore(火,3)>0&&refBefore(火,2)>0&&refBefore(火,1)>0&&火==0&&refBefore(火,1)>山,refBefore(火,1),"逃顶",color="yellow");