ecc2b9c5e94dfd9875084d5a91ffe58d9dd20ccb,QUANTAXIS/QAMarket/QAMarket_core.py,QA_Market,market_make_deal,#QA_Market#Any#Any#,14

Before Change


            QA_signal_message={"trade_status":"success","price":str(bid.price),
            "code":str( bid.code),"amount":str( bid.amount),"time":str( bid.time),
            "towards":str( bid.towards)}
            QA_signal_send("market","strategy",True,QA_signal_message)
            return True
        else:
            QA_util_log_info("not success")
            return False

After Change


        QA_util_log_info("==== Market Board ====")
        if float(bid.price) < float(item["high"]) and  float(bid.price) > float(item["low"]) or float(bid.price) == float(item["low"]) or float(bid.price) == float(item["high"]):
            QA_util_log_info("deal success")
            message = {
                "header":{
                    "source":"market",
                    "status":200,
                    "session":[str(bid.user),str(bid.strategy)]
                },
                "body":{
                    "bid":{
                        "price":str(bid.price),
                        "code":str(bid.code),
                        "amount":str(bid.amount),
                        "time":str(bid.time),
                        "towards":str(bid.towards)
                        },
                    "market":{
                        "open":item["open"],
                        "high":item["high"],
                        "low":item["low"],
                        "close":item["close"],
                        "amount":item["amount"],
                        "code":item["code"]
                        }
                    }
                }

            QA_signal_send(message)
            return True
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: ecc2b9c5e94dfd9875084d5a91ffe58d9dd20ccb
Time: 2017-04-10
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAMarket/QAMarket_core.py
Class Name: QA_Market
Method Name: market_make_deal


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: b024b8a03fcb2bb99d84490254c98fbbf4026dbf
Time: 2017-04-11
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAARP/QAAccount.py
Class Name: QA_Account
Method Name: QA_account_update


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: ecc2b9c5e94dfd9875084d5a91ffe58d9dd20ccb
Time: 2017-04-10
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAMarket/QAMarket_core.py
Class Name: QA_Market
Method Name: market_make_deal


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: a12380c46286a052eaea6617a9a13d37f74dab5e
Time: 2017-04-11
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAMarket/QAMarket_core.py
Class Name: QA_Market
Method Name: market_make_deal