-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest.py
51 lines (48 loc) · 2.48 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import KrakenBot
from KrakenBot import KrakenController as KrakenController
from KrakenBot import KrakenApiRequests as KrakenApiRequests
from KrakenBot import HelperFunctions as HelperFunctions
from KrakenBot import TestingModel as TestingModel
from KrakenBot import TestBuilder as TestBuilder
from KrakenBot import TrainingModel as TrainModel
import os
import json
# Setting Directories up
directory_path = (KrakenBot.__path__[0])
trainingPath=directory_path+'/generatedData/set/'
modelSaveLocation=directory_path+'/generatedModels/1.5.pth'
testLocation=directory_path+'/tests/tmp.jpeg'
classificationSave=directory_path+'/tests'
logFileLocation=directory_path+'/logs/logs.txt'
holdingSummaryLocation=directory_path+'/logs/holdings.txt'
modelLocation=directory_path+'/generatedModels/1.4.3_b.pth'
massSortingDirectory='E:\gits\Data Sets\MAIN_LARGEST_DATASET\\1.5\\images'
trainingPath='E:\gits\Data Sets\MAIN_LARGEST_DATASET\\1.5\\training\\'
configFile=directory_path+'/logs/configuration.json'
# Loading Configuration File
configuration=(HelperFunctions.readConfigurationFile(configFile))
key= configuration['key']
privateKey= configuration['privateKey']
minSellAdjustment=configuration['minSellAdjustment']
maximumHoldingsValue=configuration['maximumHoldingsValue']
barsToUse=configuration['barsToUse']
timeControl=configuration['timeControl']
deviceUsedToModel=configuration['deviceUsedToModel']
numEpochs=configuration['numEpochs']
amount=[]
pair=[]
for attribute, value in configuration['pairs'].items():
pair.append(attribute)
amount.append(value)
# HelperFunctions.SetupDirectories(directory_path)
# HelperFunctions.CSVBuilderClassification('E:\gits\Data Sets\MAIN_LARGEST_DATASET\\1.5\\images')
# TestingModel.ClassifyImages(modelLocation,massSortingDirectory,deviceUsedToModel)
# TrainModel.train(trainingPath,modelSaveLocation, numEpochs)
# HelperFunctions.CSVBuilderClassification(classificationSave)
# KrakenController.tradingBot(key,privateKey,pair,amount,minSellAdjustment,maximumHoldingsValue,barsToUse,timeControl,testLocation,classificationSave,modelLocation,logFileLocation,holdingSummaryLocation,deviceUsedToModel)
# amountsXMR=[0.02, 0.1, 0.1, 0.1, 0.1]
amountsXMR=[0.2, 0.5, 0.75, 1.0, 1.0]
amountsArray=[]
amountsArray.append(amountsXMR)
pairsArray=['DOTUSD']
KrakenController.newTradingBot(amountsArray,key,privateKey,pairsArray,minSellAdjustment,maximumHoldingsValue,timeControl,testLocation,classificationSave,modelLocation,logFileLocation,holdingSummaryLocation,deviceUsedToModel)