diff --git a/src/example/orderflow_strategy.cpp b/src/example/orderflow_strategy.cpp index 7593e865ad682828a536c1bd36fcd624f7285dc0..6545e2240227b0908cc69426610a054559c0b076 100644 --- a/src/example/orderflow_strategy.cpp +++ b/src/example/orderflow_strategy.cpp @@ -65,8 +65,8 @@ void orderflow_strategy::on_bar(const bar_info& bar) auto unbalance = bar.get_unbalance(_multiple); if(_order_data->buy_order == INVALID_ESTID) { - //可以买入的 - //需求失衡,说明有买方力量大于卖方力量,顺势而为则买入 + //鍙互涔板叆鐨 + //闇姹傚け琛★紝璇存槑鏈変拱鏂瑰姏閲忓ぇ浜庡崠鏂瑰姏閲忥紝椤哄娍鑰屼负鍒欎拱鍏 auto ub = unbalance.first; if(ub->size() > _threshold) { @@ -75,8 +75,8 @@ void orderflow_strategy::on_bar(const bar_info& bar) } if (_order_data->sell_order == INVALID_ESTID) { - //可以卖出的 - //需求失衡,说明有买方力量大于买方力量,顺势而为则卖出 + //鍙互鍗栧嚭鐨 + //闇姹傚け琛★紝璇存槑鏈変拱鏂瑰姏閲忓ぇ浜庝拱鏂瑰姏閲忥紝椤哄娍鑰屼负鍒欏崠鍑 auto ub = unbalance.second; if (ub->size() > _threshold) { @@ -193,6 +193,6 @@ void orderflow_strategy::try_sell() } if (_open_once + pos.get_short_position() + pos.short_pending < _position_limit) { - _order_data->sell_order = sell_for_close(_code, _open_once, tick.buy_price()); + _order_data->sell_order = sell_for_open(_code, _open_once, tick.buy_price()); } } \ No newline at end of file