LC := REF(CLOSE,1);
VID := SUM(VOL,2)/(((HHV(HIGH,2)-LLV(LOW,2)))*100);
RC := (CLOSE-LC)*VID;
LONG := SUM(RC,0);
DIFF := SMA(LONG,10,1);
DEA := SMA(LONG,20,1);
LON : =DIFF-DEA;
LONMA := MA(LON,10);
LONT : =LON, COLORSTICK;
if LONMA>0 and holding<=0 then
begin
sellshort(1,holding,marketr);
buy(1,1,marketr);
end
if LONMA<0 tand holding>=0 hen
begin
sell(1,holding,marketr);
buyshort(1,1,marketr);
END