接口 IModuleAccount
- 所有超级接口:
TickDataAware,TransactionAware
模组账户代表一个模组内部的逻辑账户
若模组绑定了多个实体账户,也被看作是一个逻辑账户
- 作者:
- KevinHuangwl
-
方法概要
修饰符和类型方法说明double可用金额intgetNonclosedNetPosition(Contract contract) 获取指定合约的净持仓数量intgetNonclosedPosition(Contract contract, CoreEnum.DirectionEnum direction) 获取指定合约指定方向的持仓数intgetNonclosedPosition(Contract contract, CoreEnum.DirectionEnum direction, boolean isPresentTradingDay) 获取指定合约指定方向的持仓数double总持仓盈亏从接口继承的方法 org.dromara.northstar.common.TickDataAware
onTick从接口继承的方法 org.dromara.northstar.common.TransactionAware
onOrder, onTrade
-
方法详细资料
-
totalHoldingProfit
double totalHoldingProfit()总持仓盈亏- 返回:
-
availableAmount
double availableAmount()可用金额- 返回:
-
getNonclosedPosition
获取指定合约指定方向的持仓数- 参数:
direction-unifiedSymbol-- 返回:
-
getNonclosedPosition
int getNonclosedPosition(Contract contract, CoreEnum.DirectionEnum direction, boolean isPresentTradingDay) 获取指定合约指定方向的持仓数- 参数:
direction-isPresentTradingDay- 是否为今日仓unifiedSymbol-- 返回:
-
getNonclosedNetPosition
获取指定合约的净持仓数量- 参数:
unifiedSymbol-- 返回:
- 正数代表净多头持仓,负数代表净空头持仓
-