天软金融分析.NET函数大全 > 金融函数 > 期货 > 期货手续费

FuturesFeeAmount    

简述

  获得指定日期货合约手续费(元/手),与系统参数(期货合约代码)相关
定义
futuresfeeamount(endt:date;feeamounttype:usrdefine):real
参数
名称类型说明
endtdate指定日,
feeamounttypeusrdefine手续费类型
显示值 取值
开仓手续费(元/手) 0
平仓手续费(元/手) 1
短线开仓手续费(元/手) 2
短线平仓手续费(元/手) 3
返回realreal:
  • 范例

    范例一:  
    //计算cu1404 在2014年3月28日的开仓手续费(元/手)。
    setsysparam(pn_stock(),"cu1404");
    return FuturesFeeAmount(inttodate(20140328),0);

    //结果:0 (元/手)
    范例二:
    //根据期货手续费(交易额万分之)和期货手续费(元/手)计算cu1404 在2014年3月28日交易手续费。
    vol1:=10;  //交易张数
    price:=3000; //交易价格
    setsysparam(pn_stock(),"cu1404");
    contractunit:=base(703007); //合约乘数
    //期货手续费(金额法)
    FeeRate:=FuturesFeeRate(inttodate(20140328),0);
    Fee1:=(vol1*price*contractunit)/10000*FeeRate;
    //期货手续费(数量法)
    FeeAmount:=FuturesFeeAmount(inttodate(20140328),0);
    Fee2:=vol1*FeeAmount;
    return Fee1+Fee2;

    //结果:7.5(元)
相关