请老师把主力线指标与逃顶指标合成一个用,谢谢 主力线源码: MID:=(3*CLOSE+LOW+OPEN+HIGH)/6; 主力:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+ 16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+ 13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+ 10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+ 7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+ 4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORRED; IF(主力>=REF(主力,1),主力,DRAWNULL),COLORRED,LINETHICK2; IF(主力(O-C) OR (O-L)>(C-O)) COLORYELLOW,LINETHICK5,STICK; P1:=28;P2:=32;P3:=35; VAR1:=1; VAR21:=LLV(LOW,10); VAR31:=HHV(HIGH,25); 警戒线:P1*VAR1,LINETHICK1; 减仓线:P2*VAR1,COLORYELLOW,LINETHICK1; 卖出线:P3*VAR1,COLOR66FF00,LINETHICK1; 动力线:EMA((CLOSE-VAR21)/(VAR31-VAR21)*40,4)*VAR1,COLORRED,LINETHICK2; DRAWTEXT(CROSS(动力线,警戒线),20,'警惕!'),COLORWHITE; DRAWTEXT(CROSS(动力线,减仓线),28,'逢高减磅!'); DRAWTEXT(CROSS(动力线,卖出线),35,'出局吧 '); DRAWICON(CROSS(动力线,警戒线),30,2); DRAWICON(CROSS(动力线,减仓线),34,2); DRAWICON(CROSS(动力线,卖出线),39,2);
爱约股解答:
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
主力:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+
16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+
13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+
10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+
7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+
4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,COLORRED;
IF(主力>=REF(主力,1),主力,DRAWNULL),COLORRED,LINETHICK2;
IF(主力<=REF(主力,1),主力,DRAWNULL),COLORGREEN,LINETHICK2;
{逃顶提示源码:}
N:=90;M:=3;
低:=REF(LLV(L,N),M);
低点:=REFDATE(低,DATE);
XG:低点=L AND ((C-L)>(O-C) OR (O-L)>(C-O)) COLORYELLOW,NODRAW;
P1:=28;P2:=32;P3:=35;
VAR1:=1;
VAR21:=LLV(LOW,10);
VAR31:=HHV(HIGH,25);
警戒线:=P1*VAR1,LINETHICK1;
减仓线:=P2*VAR1,COLORYELLOW,LINETHICK1;
卖出线:=P3*VAR1,COLOR66FF00,LINETHICK1;
动力线:=EMA((CLOSE-VAR21)/(VAR31-VAR21)*40,4)*VAR1,COLORRED,LINETHICK2;
DRAWTEXT(CROSS(动力线,警戒线),H,'警惕!'),COLORWHITE;
DRAWTEXT(CROSS(动力线,减仓线),H,'逢高减磅!');
DRAWTEXT(CROSS(动力线,卖出线),H,'出局吧 ');
DRAWICON(CROSS(动力线,警戒线),H,2);
DRAWICON(CROSS(动力线,减仓线),H,2);
DRAWICON(CROSS(动力线,卖出线),H,2);
DRAWTEXT(XG,H,'低点'),COLORYELLOW;