打印本文打印本文 关闭窗口关闭窗口

请老师帮我编写一个程序

作者:金字塔 来源:cxh99.com 发布时间:2014年10月29日
  • 咨询内容:

    我想编写一个股票交易模型


    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);

打印本文打印本文 关闭窗口关闭窗口