コード例 #1
0
ファイル: Eval_Corr.py プロジェクト: Algo-Fx/Donchian_Channel
import numpy as np
import pandas as pd
import os.path
import time
from Functions import datapath, read_history, read_order, MagicNumber, pickle_write, pickle_read

print("system: ", sys.version)
print("numpy: ", np.__version__)
print("panda: ", pd.__version__)

# -----------------------------------------------------------------
# -----------------------------------------------------------------
# read data
# -----------------------------------------------------------------
if read_order:
    orders = pickle_read(datapath, MagicNumber, "order_M_indicator.pickle", "Reading Order data")

if read_history:
    history = pickle_read(datapath, MagicNumber, "history_M_Indicator.pickle", "Reading History data")

# -----------------------------------------------------------------
# -----------------------------------------------------------------
# correlate data
# -----------------------------------------------------------------
if read_order:
    print("Correlating Order Data")
    order_cor = orders.corr()

if read_history:
    print("Correlating History Data")
    history_cor = history.corr()
コード例 #2
0
    for profit in dataframe:
        if profit >= 0:
            # count = count + 1
            count += 1
        else:
            count += 1  # = count -1
    return count


#-----------------------------------------------------------------
#-----------------------------------------------------------------
# read data
#-----------------------------------------------------------------
if read_indicator:
    indicator = pickle_read(datapath, MagicNumber, 
        'indicator.pickle', 
        'Reading Indicator data')    
    cols = indicator.columns.tolist()  # get rid of ambiguous columns 'Ticket', 'Open/Close'
    cols = cols[0:2] + cols[4:]
    indicator = indicator[cols]

if read_order:
    orders = pickle_read(datapath, MagicNumber, 
        'orders.pickle', 
        'Reading Order data')

if read_history:
    history = pickle_read(datapath, MagicNumber, 
        'history.pickle', 
        'Reading History data')    
コード例 #3
0
ファイル: Add_Stats.py プロジェクト: Algo-Fx/Donchian_Channel
    count = 0
    for profit in dataframe:
        if profit >= 0:
            # count = count + 1
            count += 1
        else:
            count += 1  # = count -1
    return count


# -----------------------------------------------------------------
# -----------------------------------------------------------------
# read data
# -----------------------------------------------------------------
if read_indicator:
    indicator = pickle_read(datapath, MagicNumber, "indicator.pickle", "Reading Indicator data")
    cols = indicator.columns.tolist()  # get rid of ambiguous columns 'Ticket', 'Open/Close'
    cols = cols[0:2] + cols[4:]
    indicator = indicator[cols]

if read_order:
    orders = pickle_read(datapath, MagicNumber, "orders.pickle", "Reading Order data")

if read_history:
    history = pickle_read(datapath, MagicNumber, "history.pickle", "Reading History data")

# -----------------------------------------------------------------
# add Stats
# -----------------------------------------------------------------
if read_indicator:
    print("Calculating stats for Indicator Data")
コード例 #4
0
import os.path
import time
from Functions import datapath, read_history, read_indicator, read_order, MagicNumber, pickle_write, pickle_read

print('system: ', sys.version)
print('numpy: ', np.__version__)
print('panda: ', pd.__version__)


#-----------------------------------------------------------------
#-----------------------------------------------------------------
# read data
#-----------------------------------------------------------------
if read_indicator:
    indicator = pickle_read(datapath, MagicNumber, 
        'indicator_wStats.pickle', 
        'Reading Indicator data')

if read_order:
    orders = pickle_read(datapath, MagicNumber, 
        'orders_wStats.pickle', 
        'Reading Order data')

if read_history:
    history = pickle_read(datapath, MagicNumber, 
        'history_wStats.pickle', 
        'Reading History data')

#-----------------------------------------------------------------
# merge history and indicator files, both have same number of rows
# both from on new bar
コード例 #5
0
ファイル: Eval_Corr.py プロジェクト: lxxhk/Donchian_Channel
import numpy as np
import pandas as pd
import os.path
import time
from Functions import datapath, read_history, read_order, MagicNumber, pickle_write, pickle_read

print('system: ', sys.version)
print('numpy: ', np.__version__)
print('panda: ', pd.__version__)

#-----------------------------------------------------------------
#-----------------------------------------------------------------
# read data
#-----------------------------------------------------------------
if read_order:
    orders = pickle_read(datapath, MagicNumber, 'order_M_indicator.pickle',
                         'Reading Order data')

if read_history:
    history = pickle_read(datapath, MagicNumber, 'history_M_Indicator.pickle',
                          'Reading History data')

#-----------------------------------------------------------------
#-----------------------------------------------------------------
# correlate data
#-----------------------------------------------------------------
if read_order:
    print('Correlating Order Data')
    order_cor = orders.corr()

if read_history:
    print('Correlating History Data')