我想把两个附图公式和 MA2六条均线组合成一个指标!希望您能帮忙!谢谢了!

2024-11-26 03:44:10
推荐回答(1个)
回答1:

MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:MA(CLOSE,M4);
MA5:MA(CLOSE,M5);
MA6:MA(CLOSE,M6);
VAR11:=EMA(EMA(C,9),9);
控盘:=(VAR11-REF(VAR11,1))/REF(VAR11,1)*1000;
VAR22:=100*WINNER(C*0.95);
STICKLINE(控盘>REF(控盘,1) AND 控盘>0,O,C,1.5,0),COLORFF00FF;
VAR1:=C-REF(C,1);
VAR2:=100*EMA(EMA(VAR1,6),6)/EMA(EMA(ABS(VAR1),6),6);
M5:=EMA(C,5);
MA13:=EMA(C,13);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,M5))+1),LLV(L,BARSLAST(CROSS
(MA13,M5))+1),H=HHV(H,BARSLAST(CROSS(M5,MA13))+1),HHV(H,BARSLAST(CROSS
(M5,MA13))+1),0);
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(M5,MA13))+1),HHV(H,BARSLAST(CROSS
(M5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,M5))+1),LLV(L,BARSLAST(CROSS
(MA13,M5))+1),0);
BT:=(LLV(VAR2,2)=LLV(VAR2,7) AND COUNT(VAR2<0,2) AND CROSS(VAR2,MA(VAR2,2))) AND
REF(DOWN,1)REF(DOWN,1);
DRAWTEXT(BT,L*0.99,'↑短牛'),COLOR0000FF;
TJ1:=REF(DOWN,1)REF(DOWN,1) AND CDRAWTEXT(TJ1,L*0.99,'↑中牛'),COLORFF00FF;
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
TJ2:=REF(DOWN,1)REF(DOWN,1) AND CDRAWTEXT(TJ2,L*0.97,'↑大牛'),COLOR00FFFF;
ST:=REF(UP,1)>REF(UP,2) AND DOWNDRAWTEXT(ST,H*1.03,'↓卖'),COLOR00FF00;

M1-M6是自定义均线的参数,自设。

PS:怎么又是你?呵呵,又按你要求修改了,以后想好了再问哈。