大师的指标-金狐套利一代

金狐套利均线比1(通达信版) 股票
说明:此指标为均线比一代,只适用于通达信行情软件

均线比指标原代码(1代)

KPJ:=OPEN; SPJ:=CLOSE; ZGJ:=HIGH; ZDJ:=LOW;

YR:=KPJ/KPJ; KXKG:=K线开关;

EMA1:=MA(SPJ,参数A);

EMA2:=MA(SPJ,参数B);

BFB2:=EMA2/100;

均线比:(EMA1-EMA2)/BFB2,LINETHICK2;

AMA均线:MA(均线比,参数C),LINETHICK2;

PLOYLINE(YR,0),COLORFF00FF;

KPJC:=(KPJ-EMA2)/BFB2*KXKG;

SPJC:=(SPJ-EMA2)/BFB2*KXKG;

ZGJC:=(ZGJ-EMA2)/BFB2*KXKG;

ZDJC:=(ZDJ-EMA2)/BFB2*KXKG;

HKXTJ:=SPJ>=KPJ; LKXTJ:=1-HKXTJ;

HKX:=HKXTJ*KXKG; LKX:=LKXTJ*KXKG;

STICKLINE(HKX,ZGJC,ZDJC,0,0),COLOR5555FF;

STICKLINE(HKX,KPJC,SPJC,2,0),COLOR5555FF;

STICKLINE(LKX,ZGJC,ZDJC,0,0),COLOR00FF00;

STICKLINE(LKX,KPJC,SPJC,2,0),COLOR00FF00;