cond1:stkindi('','macd.macd1',0,5,0)>stkindi('','macd.macd1',0,5,-1);
cond2:stkindi('','macd.macd1',0,4,0)>stkindi('','macd.macd1',0,4,-1);
cond3:callstock('',vtclose,0,5,0)>callstock('',vtclose,0,5,-1);
cond4:callstock('',vtclose,0,4,0)>callstock('',vtclose,0,4,-1);
cond5:stkindi('','macd.macd1',0,18,0)>0 and stkindi('','macd.macd1',0,18,-1)<0;
if cond1 and cond2 and cond3 and cond4 and cond5 then
begin
sellshort(1,holding,marketr);
buy(1,1,marketr);
END
if callstock('',vtlow,0,18,0)<callstock('',vtlow,0,18,-1) then sell(1,holding,marketr); |