GetLowestFee
简述
计算费用,若用户选择启用最低费用,则当根据费率计算的费用不足最低费用,则返回最低费
GetLowestFee(vAmount:Real;FeeRate:Real;action:Integer;LowestFeeType:Integer;OLowestFee:Real;CLowestFee:Real):Real
| 名称 | 类型 | 说明 |
|---|
| vAmount | Real | 实数,成交金额(税前) |
| FeeRate | Real | 实数,费率(%) |
| action | Integer | 整数,动作 |
| LowestFeeType | Integer | 整数,是否启用最低费用限制 |
| OLowestFee | Real | 实数,最低开仓费用 |
| CLowestFee | Real | 实数,最低平仓费用 |
| 返回 | Real | 费用 |
return array(
'不启用最低费用':GetLowestFee(999536,0.01,0,0,100,100),
'启用最低费用': GetLowestFee(999536,0.01,0,1,100,100)
);
//结果:array("不启用最低费用":99.9536,"启用最低费用":100)