编写要求:
合在一起可以通过,但是压缩的严重,哪 位老师给解决一下
一、资金流
TYP := (HIGH + LOW + CLOSE)/3;
V1:=SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),14)/SUM(IF(TYP[80 为超买,当其回头向下跌破80 时,为短线卖出时机; '),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=35,70.1,'2.MFI<20 为超卖,当其回头向上突破20 时,为短线买进时机;'),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=35,65.1,'3.MFI>80,而产生背离现象时,视为卖出信号; '),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=35,60.1,'4.MFI<20,而产生背离现象时,视为买进信号。'),COLORMAGENTA;
{净值注入}
K1:=IF(CLOSE>=REF(CLOSE,1),HIGH-OPEN+CLOSE-LOW+CLOSE-REF(CLOSE,1),HIGH-OPEN+CLOSE-LOW);
K2:=IF(CLOSE<=REF(CLOSE,1),OPEN-LOW+HIGH-CLOSE+REF(CLOSE,1)-CLOSE,OPEN-LOW+HIGH-CLOSE);
DT:=VOL*K1/(K1+K2);
KT:=VOL-DT;
D5:=100*SUM(DT,5)/CAPITAL;
K5:=100*SUM(KT,5)/CAPITAL;
J5:=D5-K5;
D10:=100*SUM(DT,10)/CAPITAL;
K10:=100*SUM(KT,10)/CAPITAL;
J10:=D10-K10;
D20:=100*SUM(DT,20)/CAPITAL;
K20:=100*SUM(KT,20)/CAPITAL;
J20:=D20-K20;
BL5:=400/MAX(D5,K5);
BL10:=400/MAX(D10,K10);
BL20:=400/MAX(D20,K20);
D5B:=999-D5*BL5;
K5B:=999-K5*BL5;
J5B:=999-ABS(J5)*BL5;
D10B:=999-D10*BL10;
K10B:=999-K10*BL10;
J10B:=999-ABS(J10)*BL10;
D20B:=999-D20*BL20;
K20B:=999-K20*BL20;
J20B:=999-ABS(J20)*BL20;
流入:100*DT/CAPITAL,NODRAW,COLORRED;
流出:100*KT/CAPITAL,NODRAW,COLORGREEN;
净值:100*DT/CAPITAL-100*KT/CAPITAL,NODRAW,COLORMAGENTA;
五日流入:D5,NODRAW,COLORRED;
五日流出:K5,NODRAW,COLORGREEN;
五日净值:J5,NODRAW,COLORMAGENTA;
十日流入:D10,NODRAW,COLORRED;
十日流出:K10,NODRAW,COLORGREEN;
十日净值:J10,NODRAW,COLORMAGENTA;
二十日流入:D20,NODRAW,COLORRED;
二十日流出:K20,NODRAW,COLORGREEN;
二十日净值:J20,NODRAW,COLORMAGENTA;
二、主力潜伏
主力潜伏:COUNT(MACD<0,10)=10,COLORRED,NODRAW;
STICKLINE(主力潜伏,0,MACD*200,3.5,0),COLORRED;
100;
0;
-100;
-100,STICK;()]
解答:
?TYP := (HIGH + LOW + CLOSE)/3;
V1:=SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),14)/SUM(IF(TYP