编写要求:
由于水平有限,本人自制的大智慧银山谷公式中红颜色彩带与标准的银山谷公式有一定的差距,请高手修改这句大智慧银山谷函数《FILLRGN(ma10,ma30, ma30>ma10 and ma5>ma10,RGB(255,0,0),ma5EMA(CLOSE,6) and EMA(CLOSE,6)>EMA(CLOSE,7) and EMA(CLOSE,7)>EMA(CLOSE,8) and EMA(CLOSE,8)>EMA(CLOSE,9)
and EMA(CLOSE,9)>EMA(CLOSE,10) and EMA(CLOSE,10)>EMA(CLOSE,11) and EMA(CLOSE,11)>EMA(CLOSE,12)
and EMA(CLOSE,12)>EMA(CLOSE,13) and EMA(CLOSE,13)>EMA(CLOSE,14) and EMA(CLOSE,14)>EMA(CLOSE,15)
and EMA(CLOSE,15)>EMA(CLOSE,20) and EMA(CLOSE,20)>EMA(CLOSE,30) and EMA(CLOSE,30)>EMA(CLOSE,60) and EMA(CLOSE,60)>EMA(CLOSE,90)
and EMA(CLOSE,90)>EMA(CLOSE,120) and EMA(CLOSE,120)>EMA(CLOSE,250);
A2:=EMA(CLOSE,5)>EMA(CLOSE,6) and EMA(CLOSE,6)>EMA(CLOSE,7) and EMA(CLOSE,7)>EMA(CLOSE,8) and EMA(CLOSE,8)>EMA(CLOSE,9)
and EMA(CLOSE,9)>EMA(CLOSE,10) and EMA(CLOSE,10)>EMA(CLOSE,11) and EMA(CLOSE,11)>EMA(CLOSE,12)
and EMA(CLOSE,12)>EMA(CLOSE,13) and EMA(CLOSE,13)>EMA(CLOSE,14);
B1:=IF(a1,1,2);
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),C,REF(C,1),7,0),Color0000DD;
STICKLINE((((((((((((VAR1 OR VAR2) OR VAR3) OR VAR4) OR VAR5) OR VAR6) OR VAR7) OR VAR8) OR VAR9) OR VARA) OR VARB) OR VARC),L,H,0.5,0),Color0000DD;
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),C,REF(C,1),7 ,0 ),Color00DD00;
STICKLINE((((((((((((VARD OR VARE) OR VARF) OR VAR10) OR VAR11) OR VAR12) OR VAR13) OR VAR14) OR VAR15) OR VAR16) OR VAR17) OR VAR18),H,L,0.5 ,0 ),Color00DD00;
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);
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(VAR19,REF(CLOSE,1),REF(CLOSE,2),3 ,0 ),ColorDDDDDD;
STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),ColorDD8800;
银山谷:=MA5>MA10 AND MA5>MA30 AND CROSS(MA10,MA30);
DRAWICON(银山谷,MA30,1);
FILLRGN(ma10,ma30, ma30>ma10 and ma5>ma10,RGB(255,0,0),ma5c and ref("macd.diff"(12,26,9),A1+1)<"macd.diff"(12,26,9) and cross("macd.diff"(12,26,9),"macd.dea"(12,26,9));
底背离MACD:DRAWTEXT(FILTER(B1>0,5),low,'▲'),COLORyellow;
DRAWTEXT(FILTER(B1>0,5),low*0.98,'MACD'),COLOR00ff00;
A2:=BARSLAST(ref(cross("kdj.k"(9,3,3),"kdj.d"(9,3,3)),1));
B2:=ref(c,A2+1)>c and ref("kdj.k"(9,3,3),A2+1)<"kdj.k"(9,3,3) and cross("kdj.k"(9,3,3),"kdj.d"(9,3,3));
底背离KDJ:DRAWTEXt(FILTER(B2>0,5),low,'▲'),COLORYELLOW;
DRAWTEXT(FILTER(B2>0,5),low*0.98,'KDJ'),COLORred;
A3:=BARSLAST(ref(cross("RSI.RSI1"(12,26,9),"RSI.RSI2"(12,26,9)),1));
B3:=ref(c,A3+1)>c and ref("RSI.RSI1"(8,55,55),A3+1)<"RSI.RSI1"(8,55,55) and cross("RSI.RSI1"(8,55,55),"RSI.RSI2"(8,55,55));
底背离RSI:DRAWTEXT(FILTER(B3>0,5),low,'▲'),coloryellow;
DRAWTEXT(FILTER(B3>0,5),low*0.98,'RSI'),colorf0f000;
A4:=BARSLAST(ref(cross("dmi.pdi"(14,6),"dmi.mdi"(14,6)),1));
B4:=ref(c,A4+1)>c and ref("dmi.pdi"(14,6),A4+1)<"dmi.pdi"(14,6) and cross("dmi.pdi"(14,6),"dmi.mdi"(14,6));
底背离DMI:DRAWTEXT(FILTER(B4>0,5),low,'▲'),coloryellow;
DRAWTEXT(FILTER(B4>0,5),low*0.98,'DMI'),colorF00FF0;
C1:=BARSLAST(ref(cross("macd.dea"(12,26,9),"macd.diff"(12,26,9)),1));
D1:=ref(c,C1+1)"macd.diff"(12,26,9) and cross("macd.dea"(12,26,9),"macd.diff"(12,26,9));
顶背离MACD:DRAWTEXT(FILTER(D1>0,5),HIGH*1.01,'▼'),COLOR00FF00;
DRAWTEXT(FILTER(D1>0,5),HIGH*1.03,'MACD'),COLORRED;
C2:=BARSLAST(ref(cross("kdj.d"(9,3,3),"kdj.k"(9,3,3)),1));
D2:=ref(c,C2+1)"kdj.k"(9,3,3) and cross("kdj.d"(9,3,3),"kdj.k"(9,3,3));
顶背离KDJ:DRAWTEXT(FILTER(D2>0,5),HIGH*1.01,'▼'),COLOR00FF00;
DRAWTEXT(FILTER(D2>0,5),HIGH*1.03,'KDJ'),COLORF00FF0;
C3:=BARSLAST(ref(cross("RSI.RSI2"(8,55,55),"RSI.RSI1"(8,55,55)),1));
D3:=ref(c,C3+1)"RSI.RSI1"(8,55,55) and cross("RSI.RSI2"(8,55,55),"RSI.RSI1"(8,55,55));
顶背离RSI:DRAWTEXT(FILTER(D3>0,5),HIGH*1.01,'▼'),COLOR00FF00;
DRAWTEXT(FILTER(D3>0,5),HIGH*1.03,'RSI'),COLORYELLOW;
解答:
?ma5:ma(c,5),layer0;
ma10:ma(c,10),layer0;