Last active
August 31, 2021 18:23
-
-
Save fatherofluqmaan/4c5d52aa33780a4711bb7c58b468f786 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Script created by @fatherofluqmaan using Bash | |
# Utilising Interlace (created by Codingo), pycryptobot (created by Michael Whittle), notify (Created by projectdiscovery) | |
dte=$(date +"%Y-%m-%d %T") | |
dt=$(date +"%Y-%m-%d") | |
inF="./short-pairs.txt" | |
c=$(< "short-pairs.txt" wc -l) | |
a="$c" | |
echo "[i] This is a script for running pycyptobot on coinbase pro only" | |
sleep 1 | |
mkdir -p raw-sim-outputs | |
mkdir -p interlace-results | |
echo "Enter number of parallel bots required" | |
read -r uT | |
echo "[i] Running smart-switching for granularity" | |
sleep 2 | |
echo "Enter suffix for file outputs (run1,cc,robin,moon,HODL)" | |
read -r nme | |
echo "[+] Current config.json file settings" | |
echo -e "\n" | |
cat config.json | grep -B30 '.telegram' | awk -F'\"telegram' '{print $1}' || cat config.json | |
sleep 3 | |
echo "[i] Running simulations, total pairs count: $c" | |
uC="interlace -tL $inF -threads $uT -c 'python3 pycryptobot.py --sim fast-sample --simstartdate 2021-05-15 --simenddate 2021-08-12 --market _target_ --disabletelegram 2> ./raw-sim-outputs/_target_-$nme-raw-ou> | |
eval "$uC" | |
echo "[i] Creating simulations results file with just the Margin information" | |
while IFS= read -r PP; do | |
cat ./raw-sim-outputs/"$PP"-"$nme"-raw-out.txt | grep "All Trades Margin.*" | sed -e "s@^@$dte-$grn-$PP @" >> ./interlace-results/"$nme"-interlace-results.txt | |
let "--c" | |
echo "Simulation results remaining: $c" | |
done < "$inF" | |
sort -u ./interlace-results/"$nme"-interlace-results.txt >> ./"$nme"-results_"$dt".txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interlace: https://github.com/codingo/Interlace) | |
pycryptobot: https://github.com/whittlem/pycryptobot) | |
notify: https://github.com/projectdiscovery/notify) | |
pairs.txt (a text file with coinbase pairs e.g. ETH-EUR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment