{量价趋势买卖}
RAV:=(CLOSE-LLV(LOW,9));
RAV1:=(HHV(HIGH,9)-LLV(LOW,9));
RAV2:=RAV/RAV1;
RAV3 := (HIGH + LOW + CLOSE+REF(C,1)+O)/5;
RAV4:=RAV2*100;
RAV5:=SMA(RAV4,3,1);
RAV6:=SMA(RAV5,3,1);
RAV7:=SUM(IF(RAV3>REF(RAV3,1),RAV3*VOL,0),9)/SUM(IF(RAV3<REF(RAV3,1),RAV3*VOL,0),9);
资金趋势:=100-(100/(1+RAV7)),COLORFFF000;
价格趋势:=(3*RAV5-2*RAV6)*1.1;
中:60,COLORWHITE;
{卖:=FILTER(CROSS(资金趋势,价格趋势),3); } {过滤3日内连续出现的信号}
{买:=FILTER(CROSS(价格趋势,资金趋势),3);}
卖:=CROSS(资金趋势,价格趋势);
买:=CROSS(价格趋势,资金趋势);
DRAWICON(卖,中+30,8);
STICKLINE(卖,中,中+15,1,0),COLORGREEN;
DRAWICON(买 AND BETWEEN(资金趋势,20,80),中-25,7);
STICKLINE(买 AND BETWEEN(资金趋势,20,80),中,中-15,1,0),COLORRED;