GJTJ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));
GJTJ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));
GJTJ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));
GJTJ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));
BAIJIN1:=BARSLAST(CROSS(30,GJTJ1))<2 AND BARSLAST(CROSS(GJTJ1,50))<2;
{ 爱约股_通达信股票指标公式}
BAIJIN2:=BARSLAST(CROSS(GJTJ4,GJTJ1))<2 AND GJTJ1>GJTJ4;
BAIJIN3:=GJTJ1>60 AND GJTJ4>70;
M1:=BAIJIN1 AND BAIJIN2 AND BAIJIN3;
HUANGJIN1:=BARSLAST(CROSS(50,GJTJ1))<3 AND BARSLAST(CROSS(GJTJ1,50))<3;
HUANGJIN2:=BARSLAST(CROSS(GJTJ4,GJTJ1))<2 AND GJTJ1>GJTJ4;
M2:=HUANGJIN1 AND HUANGJIN2;
XG:=BARSLAST(CROSS(GJTJ4,GJTJ1))<5 AND GJTJ1>GJTJ4;
M3:=COUNT(XG,3)=1 AND XG AND C>MA(C,20);
金三角:M1 OR M2 OR M3;