b8bd07c86553e12e05d7f0a011ecbc2626a26aed,QUANTAXIS/QAMarket/QABacktestBroker.py,QA_BacktestBroker,warp,#QA_BacktestBroker#Any#,188
Before Change
order.date = exact_time[0:10]
order.datetime = "{} 09:30:00".format(order.date)
elif order.frequence in [FREQUENCE.ONE_MIN, FREQUENCE.FIVE_MIN, FREQUENCE.FIFTEEN_MIN, FREQUENCE.THIRTY_MIN, FREQUENCE.SIXTY_MIN]:
exact_time = str(datetime.datetime.strptime(
order.datetime, "%Y-%m-%d %H:%M:%S") + datetime.timedelta(minute=1))
order.date = exact_time[0:10]
order.datetime = exact_time
elif order.order_model == ORDER_MODEL.STRICT:
After Change
else:
order.price = float(self.market_data.get("low"))
if order.market_type is MARKET_TYPE.STOCK_CN and order.towards is ORDER_DIRECTION.BUY:
if order.order_model is AMOUNT_MODEL.BY_MONEY:
amount = order.money/(order.price*(1+order.commission_coeff))
money = order.money
else:
amount = order.amount
money = order.amount * order.price*(1+order.commission_coeff)
order.amount = int(amount / 100) * 100
order.money = money
return order
def get_market(self, order):
get_market func
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: b8bd07c86553e12e05d7f0a011ecbc2626a26aed
Time: 2018-05-17
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAMarket/QABacktestBroker.py
Class Name: QA_BacktestBroker
Method Name: warp
Project Name: hellohaptik/chatbot_ner
Commit Name: 62c9d21484733b53fefd1569cf4b5776e7f87b4a
Time: 2018-08-28
Author: anchan.viraj@gmail.com
File Name: ner_v1/detectors/temporal/time/time_detection.py
Class Name: TimeDetector
Method Name: _get_meridiem
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 567717cc14a8c73b263153e0813e7218819b48ea
Time: 2018-05-16
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAMarket/QABacktestBroker.py
Class Name: QA_BacktestBroker
Method Name: warp