手動平衡後,ロボットは平衡操作を把握し,利益切り替え戦略の状態を計算します.
if (GetPosition(PD_SHORT)[0]===0 && GetPosition(PD_LONG)[0]===0){
if (State!=STATE_IDLE){
var account = exchange.GetAccount();
if (account.Stocks > LastAccount.Stocks) {
Counter.w++;
} else {
Counter.l++;
}
LogProfit(_N(account.Stocks - InitAccount.Stocks), "收益率:", _N((account.Stocks - InitAccount.Stocks) * 100 / InitAccount.Stocks) + '%');
LastAccount = account;
}
State=STATE_IDLE;
}
投資も同様です
ゼロ 感放分享,替你排版了下.