Esempio n. 1
0
def dailytrade():
    #somechecks and some sleeps
    trading = True
    while trading:
        databasebuffer = []
        trading = check_trade_hours()
        trader(myvals)
        for each in databasebuffer:
            mongohelper.inserthisone(coll, each)
Esempio n. 2
0
    #somechecks and some sleeps
    trading = True
    while trading:
        databasebuffer = []
        trading = check_trade_hours()
        trader(myvals)
        for each in databasebuffer:
            mongohelper.inserthisone(coll, each)
        
#print(intc.iloc[200])
#print(intc.tail())

if(len(sys.argv) > 3):
    backtest = cmdlineargs[4]
    backtest = backtest.lower()
    if(backtest == "false"):
        backtest = False
    else:
        backtest = True
else:
    backtest = False

if backtest:
    dailycheck()
    for each in databasebuffer:
        mongohelper.inserthisone(coll, each)
else:
    dailytrade()