Exemple #1
0
def latest(macdFast=51183.07765162355,
           macdSlow=68970.07412787144,
           macdLag=794140.9481321955):
    global data
    data = xdg.client.getData()  #download new data
    data = xdg.client.toGraphFormat(data)  #convert to loaded format
    data = xdg.processData(data)  #process as if it were loaded data
    xdg.plots(data, macdFast, macdSlow, macdLag)
Exemple #2
0
def fresh(days=48, macdFast=51183.07765162355, macdSlow=68970.07412787144, macdLag=794140.9481321955):
    global data
    entries = loadFile("XDGUSD.csv") #load data from file
    updateData(entries)              #download new data from remote server
    saveFile(entries, "XDGUSD.csv")  #save updated data to a file
    
    timefrom = datetime.datetime.today() - datetime.timedelta(days=days)
    timefrom = timefrom.timestamp()
    
    data = parseFile(entries)               #parse already loaded data
    data = clipFile(data, timefrom=timefrom)#Load, parse, clip are loadData().
    data = processData(data)                #convert to candles
    plots(data, macdFast, macdSlow, macdLag)#plot
Exemple #3
0
trades = None
t_p = None

def latest(macdFast=51183.07765162355, macdSlow=68970.07412787144, macdLag=794140.9481321955):
    global data
    data = getData() #download new data
    data = toGraphFormat(data) #convert to loaded format
    data = processData(data) #process as if it were loaded data
    plots(data, macdFast, macdSlow, macdLag)

def fresh(days=48, macdFast=51183.07765162355, macdSlow=68970.07412787144, macdLag=794140.9481321955):
    global data
    entries = loadFile("XDGUSD.csv") #load data from file
    updateData(entries)              #download new data from remote server
    saveFile(entries, "XDGUSD.csv")  #save updated data to a file
    
    timefrom = datetime.datetime.today() - datetime.timedelta(days=days)
    timefrom = timefrom.timestamp()
    
    data = parseFile(entries)               #parse already loaded data
    data = clipFile(data, timefrom=timefrom)#Load, parse, clip are loadData().
    data = processData(data)                #convert to candles
    plots(data, macdFast, macdSlow, macdLag)#plot

if __name__ == "__main__":
    data = getData()
    data = toGraphFormat(data)
    data = processData(data)
    plots(data)
    #data = asyncio.get_event_loop().run_until_complete(getDataws())