marginPerLotSell = GetGlobalVar(6) * ContractUnit * BigPointValue * (tmpMargin) / 100;
// ===== 为四个账户分别计算手数 =====
// 账户1手数计算(总资金2800000)
Numeric totalBuyQty1 = IntPart(2800000 / marginPerLotBuy);
Numeric totalSellQty1 = IntPart(2800000 / marginPerLotSell);

01月13日 19:51我
BigPointValue要不要乘?

01月13日 19:52我
// 动态手数计算
marginPerLotBuy = GetGlobalVar(5) * ContractUnit * (tmpMargin) / 100;
marginPerLotSell = GetGlobalVar(6) * ContractUnit * (tmpMargin) / 100;这样对么
//------------------------------------------------------------------------
// 简称: test_0114_2026
// 名称:
// 类别: 策略应用
// 类型: 用户应用
// 输出: Void
//------------------------------------------------------------------------
Params
//此处添加参数
Vars
//此处添加变量
Defs
//此处添加策略函数
Events
//此处实现事件函数
//初始化事件函数,策略运行期间,首先运行且只有一次
OnInit()
{
}
//Bar更新事件函数,参数indexs表示变化的数据源图层ID数组
OnBar(ArrayRef<Integer> indexs)
{
if(BarStatus==2)
{
print("BigPointValue="+text(BigPointValue));
print("ContractUnit="+text(ContractUnit));
print("close*BigPointValue*ContractUnit=" + text(close *BigPointValue * ContractUnit));
}
}
//------------------------------------------------------------------------
// 编译版本 2026/1/14 85115
// 版权所有 wangkaiming
// 更改声明 TradeBlazer Software保留对TradeBlazer平台
// 每一版本的TradeBlazer策略修改和重写的权利
//------------------------------------------------------------------------close*BigPointValue*ContractUnit 相当于市值
你再乘以保证金率就是保证金
谢了