我想编写一个股票交易模型
N:=INTPART((7-C)/0.05);
T=((7-C)/0.05;
买入条件:T=N,并且现在的价格低于上次买入的价格,买入量为10*N;
卖出条件:价格等于1.
大概是这么个意思,请老师给我帮帮忙
INTPART
这个函数什么意思?
n:=round((7-c)/0.05);
T:=(7-C)/0.05;
variable:m=0;
if holding=0 and t=n and m=0 then begin
buy(1,10*n,market);
m:=1;
end
if holding=0 and m=1 and t=0 and c<enterprice then buy(1,10*n,market);
if h>=1 and l<=1 then sell(1,0,market);