九毛八公式指标
请老师给死叉横线做个输出,即有数值出来,能看到MA6和MA18的死叉点位,谢谢。 MA1:MA(C,6); MA2:MA(C,18); SXN:=BARSLAST(CROSS(MA2,MA1)); XL1:=(MA1-REF(MA1,1))/MA1; XL2:=(MA2-REF(MA2,1))/MA2; N:=(REF(MA1,1)-REF(MA2,1))/(XL1*REF(MA1,1)-XL2*REF(MA2,1)); JP:=(1-N*XL1)*REF(MA1,1); JZ:=IF(SXN=0,JP,REF(JP,SXN)); 死叉横线:STICKLINE(SXN>0,JZ,JZ,20,1),COLORred;
公式模块:
MA1:MA(C,6),PRECIS2;
MA2:MA(C,18),PRECIS2; SXN:=BArslAST(crOSS(MA2,MA1)); XL1:=(MA1-REF(MA1,1))/MA1; XL2:=(MA2-REF(MA2,1))/MA2; N:=(REF(MA1,1)-REF(MA2,1))/(XL1*REF(MA1,1)-XL2*REF(MA2,1)); JP:=(1-N*XL1)*REF(MA1,1); JZ:=IF(SXN=0,JP,REF(JP,SXN)); 死叉横线:JZ,LINETHICK0,COLORRED,PRECIS2; DRAWTEXT(SXN=0,死叉横线,NUMTOSTRN(死叉横线,2),-12),COLORWHITE; STICKLINE(SXN>0,JZ,JZ,20,1),COLORred;