def test_zec_minutes(): path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "trade_zec.json") demo = Strategy( symbols='zeccny', account=ACCOUNT_INFO, config_path=path, live=False, data_files=[ 'D:/bopu/yunbi_trade/trades_data/yunbi_zeccny_minute.csv', ]) demo.run()
def test_qtum_minutes(): demo = Strategy( symbols='qtumcny', account=ACCOUNT_INFO, live=False, data_files=[ 'D:/bopu/yunbi_trade/trades_data/yunbi_qtumcny_minute.csv', ]) demo.set_config({'order_qty': 1, 'enter_price': 10, 'symbol': 'qtumcny'}) demo.run()
from yunbi.strategy.macd import Strategy, Order from yunbi.trade.client import get_api_path from config import ACCOUNT_INFO import os if __name__ == '__main__': # back test # demo = Strategy(symbols='ethcny', account=ACCOUNT_INFO, live=False, # data_files=["2017-05-29.log", "2017-05-30.log", "2017-05-31.log"]) # demo.set_config({'order_qty': 100, 'enter_price': 0.5, 'symbol': 'ethcny'}) # demo.run() path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "trade_sc.json") demo = Strategy(symbols='sccny', account=ACCOUNT_INFO, config_path=path, live=True) demo.run()