Hello all.
I made a little script to stop pairs I don't want to run anymore.
#!/bin/env bash
# usage stop_after_sell.sh pair market &
pair="$1"
market="$2"
pid_of=$(pgrep -a gunthy | grep "$pair $market" | cut -d' ' -f1)
while :; do
if tail -n1 "${market}-${pair}-trades.txt" | grep sell; then
kill -s SIGKILL "$pid_of"
break
else
sleep 120
fi
done
[ ! -f stop_after_sell.txt ] && touch stop_after_sell.txt
echo "$(date) $pair $market" >> stop_after_sell.txt
How to:
- save this script in GB folder, name it eg stop_after_sell.sh
- make it executable
chmod u+x stop_after_sell.sh
- launch it eg for BTC_ETH on poloniex
./stop_after_sell.sh BTC_ETC poloniex &
Note that ampersand is important.
When a sell happens this script kill GB running pair and track its work in
stop_after_sell.txt. So you can watch what it will kill.
Beware of that this script isn't
bullet proof it's made with "LA R.A.C.H.E : Rapid Application Conception and Heuristic Extreme-programming"
.
Be warn and enjoy.