exchange.SetPrecision(pricePrecision, amountPrecision)
```pricePrecision```参数用来控制价格数据的精度。
pricePrecision
true
number
```amountPrecision```参数用来控制下单量数据的精度。
amountPrecision
true
number
```javascript
function main(){
// 设置价格小数位精度为2位,品种下单量小数位精度为3位
exchange.SetPrecision(2, 3)
}
def main():
exchange.SetPrecision(2, 3)
void main() {
exchange.SetPrecision(2, 3);
}
设置价格精度、下单量精度。
回测系统不支持该函数,回测系统的数值精度会自动处理。 pricePrecision
和amountPrecision
都必须是整型的数值。
{@fun/Trade/exchange.Buy exchange.Buy}, {@fun/Trade/exchange.Sell exchange.Sell}