飞狐趋势宝塔线主图指标公式

[复制链接]
查看211 | 回复0 | 2021-8-21 12:51:24 | 显示全部楼层 |阅读模式

PMA:=MA(C,5),COLORWHITE,LINETHICK1,pointdot;
X:=(3*C+L+O+H)/6;
多空线:=wma(c,20),COLORFF00FF,LINETHICK1,pointdot;
DD:=多空线<REF(多空线,1);
上升趋势:PMA>多空线,linethick0;
STICKLINE(上升趋势,PMA,多空线,3,1),COLORff00ff;
drawtext(cross(pma,多空线),h*1.003,'见红买');
TY:=C;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
A:=REF(C,BARSLAST(HD)); B:=REF(L,BARSLAST(LD));
T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;
T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);
顶:IF(T1,A,A),COLORYELLOW,POINTDOT;
底:IF(T2,B,B),COLORGREEN,POINTDOT;
最新价:c,linethick0;

AAA0:=(3*C+H+L+O)/6;
VAR111:=(8*AAA0+7*REF(AAA0,1)+6*REF(AAA0,2)+5*REF(AAA0,3)+4*REF(AAA0,4)+3*REF(AAA0,5)+2*REF(AAA0,6)+REF(AAA0,8))/36;
VAR21:=(HHV(VAR111,5)+HHV(VAR111,10)+HHV(VAR111,20))/3;
VAR31:(LLV(VAR111,5)+LLV(VAR111,10)+LLV(VAR111,20))/3;
VAR41:(HHV(VAR21,5)+HHV(VAR21,10)+HHV(VAR21,20))/3,linethick2,colorffff00;
VAR51:(LLV(VAR31,5)+LLV(VAR31,10)+LLV(VAR31,20))/3;
VAR61:=(LLV(VAR111,2)+LLV(VAR111,4)+LLV(VAR111,6))/3;
短线:VAR111,COLORWHITE,linethick2;
中线:VAR61,COLORYELLOW,linethick2;
PARTLINE(VAR111=VAR61,VAR61),COLORGREEN,linethick2;
PARTLINE(VAR111=VAR41,VAR111),COLORREd,linethick2;
PARTLINE(VAR111<VAR41 and VAR111>VAR61 and VAR111>ref(VAR111,1),VAR111),COLORff00ff,linethick2;
PARTLINE(VAR111=VAR61 and VAR111=VAR31,VAR111),COLOR00ab00,linethick2;
PARTLINE(VAR111=VAR61 and VAR111=VAR31 and VAR111=VAR51,VAR111),COLORff4b00,linethick2;

变红:VAR111=VAR41 and ref(VAR111,1)<ref(VAR41,1),linethick0;
红线:VAR111=VAR41,linethick0;
探底反弹:ref(VAR111,1)=ref(VAR61,1) and ref(VAR111,1)=ref(VAR31,1) and ref(VAR111,1)=ref(VAR51,1)
and VAR111>VAR51 and VAR111>VAR31 and VAR111>VAR61,linethick0;
反弹: ref(VAR111,1)=ref(VAR61,1) and VAR111>VAR61,linethick0,colorffff00;
{用法:黄托底买进,绿压顶卖出。}
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);
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}
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(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),COLORFFCC66;
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(var19,REF(CLOSE,1),REF(CLOSE,2),6,0),COLOR00c8ff;
STICKLINE(var19,REF(CLOSE,1),REF(CLOSE,2),4,0),COLOR10ecff;
STICKLINE(var19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ffff;
STICKLINE(var19,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR10f0ff;
STICKLINE(var1A,REF(CLOSE,1),REF(CLOSE,2),8,0),COLOR00d900;
STICKLINE(var1A,REF(CLOSE,1),REF(CLOSE,2),6,0),COLOR93ffd1;
STICKLINE(var1A,REF(CLOSE,1),REF(CLOSE,2),4,0),COLOR93ff22;
STICKLINE(var1A,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR24ff22;
STICKLINE(var1A,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR090ff2;

aaa:=Close > Ref(Close, 1) and Ref(Close, 1) > Ref(Close, 2) and Ref(Close, 1) < Ref(Close, 3) and If(Ref(Close, 3) < Ref(Close, 4), 1, If(Ref(Close, 4) < Ref(Close, 5),Ref(Close, 1) < Ref(Close, 4) or( Ref(Close, 2) < Ref(Close, 4) and Ref(Close, 3) >= Ref(Close, 5) ),If(Ref(Close, 5) < Ref(Close, 6), 1,Ref(Close, 6) < Ref(Close, 7))));
bbb:=Close < Ref(Close, 1) and Ref(Close, 1) < Ref(Close, 2) and Ref(Close, 1) > Ref(Close, 3) and If(Ref(Close, 3) > Ref(Close, 4), 1, If(Ref(Close, 4) > Ref(Close, 5),Ref(Close, 1) > Ref(Close, 4) or( Ref(Close, 2) > Ref(Close, 4) and Ref(Close, 3) <= Ref(Close, 5) ),If(Ref(Close, 5) > Ref(Close, 6), 1,Ref(Close, 6) > Ref(Close, 7))));
drawicon(aaa and close>ref(open,2),low,1);
drawicon(bbb and close<ref(close,2),high*1.002,2);
drawtext(aaa and close>ref(open,2),low*0.998,'三翻红');

drawtext(bbb and close<ref(close,2),high*1.002,'三翻绿'),color00ff00;
黄底:var19,linethick0;
红烛:var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR var8 OR var9 OR varA OR varB OR varC ,linethick0,color0099ff;
三翻红:if(aaa and close>ref(open,2),1,0),linethick0;
三平底:if(aaa,1,0),linethick0;

三翻绿:if(bbb and close<ref(close,2),1,0),linethick0;

202108211231.gif

202108211231.gif

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则