From 5fbb62a5dcf506e0ddb27188a9ad862ec9c1ddf9 Mon Sep 17 00:00:00 2001 From: MoonGem <34537029+MoonGem@users.noreply.github.com> Date: Sun, 25 Mar 2018 10:17:27 -0500 Subject: [PATCH] Delete random.py --- user_data/random/random.py | 64 -------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 user_data/random/random.py diff --git a/user_data/random/random.py b/user_data/random/random.py deleted file mode 100644 index f2f474043..000000000 --- a/user_data/random/random.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env python3 -import os -import multiprocessing -import subprocess -import re -PROC_COUNT = multiprocessing.cpu_count() - 1 -cwd = os.getcwd() -print(cwd) -WORK_DIR = os.path.join( - os.path.sep, - os.path.abspath(os.path.dirname(__file__)), - '..', 'freqtrade', 'main.py' -) - -# Spawn workers -command = [ - 'python3.6', - WORK_DIR, - 'backtesting', -] -global current -global procs -current = 0 -procs = 0 -DEVNULL = open(os.devnull, 'wb') - -while True: - while procs < PROC_COUNT: - try: - procs + 1 - proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - wait = proc.communicate() - string = str(wait) - params = re.search(r'~~~~(.*)~~~~', string).group(1) - mfi = re.search(r'MFI Value(.*)XXX', string) - fastd = re.search(r'FASTD Value(.*)XXX', string) - adx = re.search(r'ADX Value(.*)XXX', string) - rsi = re.search(r'RSI Value(.*)XXX', string) - tot = re.search(r'TOTAL(.*)', string).group(1) - total = re.search(r'[-+]?([0-9]*\.[0-9]+|[0-9]+)', tot).group(1) - if total and (float(total) > float(current)): - current = total - print('total better profit paremeters: ') - print(total) - if params: - print(params) - print('~~~~~~') - print('Only enable the above settings, not all settings below are used!') - print('~~~~~~') - if mfi: - print('~~~MFI~~~') - print(mfi.group(1)) - if fastd: - print('~~~FASTD~~~') - print(fastd.group(1)) - if adx: - print('~~~ADX~~~') - print(adx.group(1)) - if rsi: - print('~~~RSI~~~') - print(rsi.group(1)) - procs - 1 - except Exception as e: - print(e)