未来,人工智能技术将与其他学科知识融合,共同推动教育教学的发展。例如,人工智能技术和心理学、教育学等学科的结合,可以更好地了解学生的心理需求和学习情况,提供更加科学、全面的教育教学方案。
void WtHftStraDemo::tqz_marketMaking(const int codeLongOffsetTicks,const int codeShortOffsetTicks){
if(!this->__isMarketMakingAble())
return;
this->__lockBuy();//lock market_making.
this->__lockShort();
std::string buyOrderComment("code_buyOrder_marketMaking");
std::string shortOrderComment("code_shortOrder_marketMaking");
double currentMidPrice=this->_last_mid_price;//make sure mid price of market making is same.
double buyOrderPrice=this->__tqz_getMarketMakingLongPrice(this->_code.c_str(),currentMidPrice,codeLongOffsetTicks);
double shortOrderPrice=this->__tqz_getMarketMakingShortPrice(this->_code.c_str(),currentMidPrice,codeShortOffsetTicks);
uint32_t buyOrderLocalid=this->_ctx->stra_enter_long(this->_code.c_str(),buyOrderPrice,UNIT,buyOrderComment.c_str());
uint32_t shortOrderLocalid=this->_ctx->stra_enter_short(this->_code.c_str(),shortOrderPrice,UNIT,shortOrderComment.c_str());
std::string currentMarketTimeString=this->__tqz_getCurrentMarketTime();
std::string sendOrderTimeString=this->__tqz_getCurrentTime();
this->_code_buy_order=buyOrderLocalid;
this->_code_buy_orders.insert(buyOrderLocalid);
this->_code_short_order=shortOrderLocalid;
this->_code_short_orders.insert(shortOrderLocalid);
if(!this->_record_hft_log)
return;
double currentPrice=this->_ctx->stra_get_price(this->_code.c_str());//current market price.
this->_log_message_map[buyOrderLocalid]=this->__tqz_getNewLogMessage(this->_code,buyOrderLocalid,currentPrice,buyOrderPrice,"buy_order",currentMarketTimeString,sendOrderTimeString,buyOrderComment);