这是大庆老杨老师早期指标,作了下改动,大庆老杨老师是我敬佩的老师,在此向大庆老杨老师致谢!操作方法一目了然,希望对朋友们有所帮助,
主图原码如下,循环利用
input:N(3,1,100),N1(7,1,100),P(1,1,100),N3(6,1,100);
均价:=(HIGH+4*LOW+OPEN+CLOSE)/7;
均价差:= EMA(均价,13) - EMA(均价,34);
移动均价:= EMA(均价差,5);
差:=(均价差-移动均价)*5;
A:=IF(差>=1000 ,1000 ,IF(差<=均价,均价,差) );
智: CLOSE,colorblue,linethick3;
慧:if(智>forcast(forcast(智,13),l),智,forcast(forcast(智,13),l)),linethick3,COLOR248a24;
MA5:=MA(C,5);
MA13:=MA(C,13);
MA55:=MA(C,55);
MA125:=MA(C,125);
MA250:=MA(C,250);
a:=(3*c+l+o+h)/6;
垂帘:=(20*a+19*ref(a,1)+18*ref(a,2)+17*ref(a,3)+16*ref(a,4)+15*ref(a,5)
+14*ref(a,6)+13*ref(a,7)+12*ref(a,8)+11*ref(a,9)+10*ref(a,10)
+9*ref(a,11)+8*ref(a,12)+7*ref(a,13)+6*ref(a,14)+5*ref(a,15)
+4*ref(a,16)+3*ref(a,17)+2*ref(a,18)+ref(a,20))/210;
轨:=ma(垂帘,1);
partline(轨,轨>ref(轨,1),rgb(125,0,0),轨<ref(轨,1),rgb(0,125,0))
,COLORGREEN,LINETHICK4;
zar1:=SLOPE(EMA(CLOSE,2),5)*15+C;
zar2:=EMA(zar1,5);
zarA:=EMA(EMA(EMA(EMA(EMA(EMA(EMA(EMA(zar2,5),5),5),5),5),5),5),5);
zarB:=BARSLAST(CROSS(CLOSE,zarA));
zarC:=BARSLAST(CROSS(zarA,CLOSE));
STICKLINE(CLOSE<zarA,REF(CLOSE,zarC),REF(CLOSE,zarC),12,0),linethick3,COLOR00FF00;
良机:if(CLOSE>zarA AND CLOSE>REF(CLOSE,zarB),REF(CLOSE,zarB),REF(CLOSE,zarB)),COLORFFC8FF,pointdot,linethick2;
STICKLINE(CLOSE>zarA AND CLOSE>REF(CLOSE,zarB),REF(CLOSE,zarB),垂帘,1,0),COLORFFC8FF,linethick2;
STICKLINE(CLOSE>zarA AND CLOSE>REF(CLOSE,zarB),REF(CLOSE,zarB),REF(CLOSE,zarB),12,0),COLORFFC8FF,LINETHICK3;
恶化:IF(CLOSE<zarA AND CLOSE<REF(CLOSE,zarC),REF(CLOSE,zarC),REF(CLOSE,zarC)),COLOR00FF00,POINTDOT;
STICKLINE(CLOSE<zarA AND CLOSE<REF(CLOSE,zarC),REF(CLOSE,zarC),垂帘,1,0),COLOR00FF00,LINETHICK2;
xClose:=EMA((Open+High+Low+Close)/4,n) ;
xOpen:=EMA((Ref(Open,1) + Ref(xClose,1))/2,n);
Tempg:=Max(High, xOpen);
xHigh:=EMA(Max(Tempg, xClose),n);
Temp:=Min(Low,XOpen);
xLow:=EMA(Min(Temp, xClose),n);
x1:=Ref(C,1);
x2:=EMA(Max(C-x1,0),N)/EMA(abs(C-x1),N1)*100;
x3:=((3*EMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5)-
2*EMA(EMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5),3)-50)+50);
x4:=(x2+x3)/2;
x5:=EMA(C+(x4/50-1)*(MA(C,30)/20)*p,5);
n2c:=2*n3;
n3c:=2*n2c;
Var1:=Ref(Close,1);
Var3:=EMA(Max(Close-Var1,0),n3)/EMA(abs(Close-Var1),n3)*100;
Var4:=EMA(Max(Close-Var1,0),n2c)/EMA(abs(Close-Var1),n2c)*100;
Var5:=EMA(Max(Close-Var1,0),n3c)/EMA(abs(Close-Var1),n3c)*100;
Var6:=If(Cross(Var3,Var5),Low,Ref(Low,BarsSince(Cross(Var3,Var5))));
Var7:=If(Cross(Var5,Var3),High,Ref(High,BarsSince(Cross(Var5,Var3))));
Var8:=If(Close>=MA(Close,20),80,50);
Var9:=If(Close>=MA(Close,20),50,20);
VarA:=If(Var3<Var8 AND Ref(Var3,1)>=Var8,HHV(Ref(High,1),BARSLAST(Var3>=Var8 AND Ref(Var3,1)<Var8)-1),
Ref(HHV(Ref(High,1),BARSLAST(Var3>=Var8 AND Ref(Var3,1)<Var8)+1), BARSLAST(Var3<Var8 AND Ref(Var3,1))));
VarB:=If(High>VarA,Low,Ref(Low,BARSLAST(High>VarA)));
VarC:=If(High>VarA,Var3,Ref(Var3,BARSLAST(High>VarA)));
VarD:=If(High>VarB AND Var3<VarC AND Var3<Var5,High,Ref(High,BARSLAST(High>VarB AND Var3<VarC AND Var3<Var5)));
VarE:=If(Var3>Var9 AND Ref(Var3,1)<=Var9,LLV(Ref(Low,1),BARSLAST(Var3<=Var9 AND Ref(Var3,1)>Var9)+1),
Ref(LLV(Ref(Low,1),BARSLAST(Var3<=Var9 AND Ref(Var3,1)>Var9)+1),BARSLAST(Var3>Var9 AND Ref(Var3,1))));
VarF:=If(Low<VarE,High,Ref(High,BARSLAST(Low<VarE)));
Var10:=If(Low<VarE,Var3,Ref(Var3,BARSLAST(Low<VarE)));
Var11:=If(Low<VarF AND Var3>Var10 AND Var3>Var5,Low,Ref(Low,BARSLAST(Low<VarF AND Var3>Var10 AND Var3>Var5)));
乾: Var11,colorff00ff,LINETHICK3,LAYER0;
坤: VarD,COLOR6600ff,linethick3,layer1;
drawtext(Cross(x5,乾 ),xlow,'●'),colorblue,align0,linethick3;
drawtext(Cross(坤,x5 ),xhigh,'¥'),COLOR00FF00,align0,linethick3;
drawtext(Cross(x5,乾 ),xlow,'?'),colorwhite,align2,LINETHICK6;
drawtext(Cross(坤,x5 ),xhigh,'★'),colorFFABA3,align2,LINETHICK4;
|