Skip to content

Instantly share code, notes, and snippets.

View ramene's full-sized avatar

Ramene Anthony ramene

  • Earth
View GitHub Profile
#!/bin/bash
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo bash -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list'
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r)
sudo apt-get -y install docker-engine
@ramene
ramene / zenbot.sh
Last active December 27, 2017 20:18
zenbot sim --days 2 --profit_stop_enable_pct=10 --profit_stop_pct=1 --trend_ema=36 --period=1h --verbose
$ docker-compose exec server zenbot sim --days 2 --profit_stop_enable_pct=10 --profit_stop_pct=1 --trend_ema=36 --period=1h --verbose
2017-12-25 16:00:00 14177.19 BTC-USD 189 0.00000 BTC 1000.00 USD +0.00% -0.58%
2017-12-25 17:00:00 14268.75 BTC-USD +0.64% 419 0.00000 BTC 1000.00 USD +0.00% -1.22%
2017-12-25 18:00:00 14199.99 BTC-USD -0.49% 537 0.00000 BTC 1000.00 USD +0.00% -0.74%
2017-12-25 19:00:00 14300.01 BTC-USD +0.70% 583 0.00000 BTC 1000.00 USD +0.00% -1.44%
2017-12-25 20:00:00 14276.44 BTC-USD -0.17% 386 0.00000 BTC 1000.00 USD +0.00% -1.28%
2017-12-25 21:00:00 14071.01 BTC-USD -1.44% 624 0.00000 BTC 1000.00 USD +0.00% +0.17%
2017-12-25 22:00:00 14089.99 BTC-USD +0.13% 500 0.00000 BTC 1000.00 USD +0.
@ramene
ramene / zenbot.sh
Last active July 19, 2023 03:43
zenbot trade --paper gdax.LTC-USD --order_type="taker"
2017-12-27 19:02:00 264.880 LTC-USD +0.25% 726 55 ++ 0.0245 0.0124 sell
2017-12-27 19:10:00 265.900 LTC-USD +0.38% 2 60 ++ 0.0512 0.0140 0.00000000 LTC 1000.00 USD +0.00% +0.00%
2017-12-27 19:12:00 266.900 LTC-USD +0.37% 852 65 +++ 0.0755 0.0192 0.00000000 LTC 1000.00 USD +0.00% -0.38%
2017-12-27 19:14:00 266.910 LTC-USD +0.00% 511 65 +++ 0.0701 0.0269 0.00000000 LTC 1000.00 USD +0.00% -0.38%
2017-12-27 19:16:00 267.940 LTC-USD +0.38% 778 69 +++ 0.0937 0.0287 0.00000000 LTC 1000.00 USD +0.00% -0.77%
2017-12-27 19:18:00 267.010 LTC-USD -0.35% 726 62 ++ 0.0607 0.0338 0.00000000 LTC 1000.00 USD +0.00% -0.42%
2017-12-27 19:20:00 267.770 LTC-USD +0.28% 796 65 +++ 0.0774 0.0342 0.00000000 LTC 1000.00 USD +0.00% -0.70%
2017-12-27 19:22:00 267.980 LTC-USD +0.07% 634 66 +++ 0.0774 0.0350
@ramene
ramene / simulations.sh
Last active July 19, 2023 03:44
zenbot simulations
./zenbot.sh sim gdax.BTC-EUR --avg_slippage_pct=0.045 --avgpoints=2064 --avgpoints2=718 --buy_stop_pct=42 --lastpoints=122 --lastpoints2=74 --markdown_buy_pct=4.729487024913039 --markup_pct=undefined --markup_sell_pct=-0.7752129835541433 --max_sell_loss_pct=25 --max_slippage_pct=5 --min_periods=166 --order_type=taker --period=178m --periodLength=178m --profit_stop_enable_pct=0 --profit_stop_pct=16 --rsi_periods=14 --sell_stop_pct=43 --strategy=trendline --days=14
docker-compose exec server zenbot sim gdax.LTC-USD --days=60 --filename none --strategy=trend_ema --periodLength=33m --min_periods=108 --markup_pct=undefined --order_type=taker --sell_stop_pct=23 --buy_stop_pct=0 --profit_stop_enable_pct=4 --profit_stop_pct=8 --lastpoints=313 --avgpoints=610 --lastpoints2=292 --avgpoints2=470 --markdown_buy_pct=0.572148671655925 --markup_sell_pct=1.8578730802765167
# Neural training...
docker-compose exec server ./scripts/genetic_backtester/darwin.js --selector="gdax.BTC-USD" --days=1 --currency_capital=1000 --us
@ramene
ramene / zenbot.sh
Last active July 19, 2023 03:49
docker-compose exec server zenbot trade --conf . --days=1 binance.ADA-BTC
Available command keys:
b - limit BUY
B - market BUY
s - limit SELL
S - market SELL
c - cancel order
m - toggle MANUAL trade in LIVE mode ON / OFF
T - switch to 'Taker' order type
M - switch to 'Maker' order type
$ docker-compose exec server zenbot backfill gdax.BTC-USD --days 2
$ docker-compose exec server zenbot sim --days 2 --profit_stop_enable_pct=10 --profit_stop_pct=1 --trend_ema=36 --period=1h --verbose
```
2017-12-25 16:00:00 14177.19 BTC-USD 189 0.00000 BTC 1000.00 USD +0.00% -0.58%
2017-12-25 17:00:00 14268.75 BTC-USD +0.64% 419 0.00000 BTC 1000.00 USD +0.00% -1.22%
2017-12-25 18:00:00 14199.99 BTC-USD -0.49% 537 0.00000 BTC 1000.00 USD +0.00% -0.74%
2017-12-25 19:00:00 14300.01 BTC-USD +0.70% 583 0.00000 BTC 1000.00 USD +0.00% -1.44%
@ramene
ramene / binance.IOTA-BTC.sh
Last active July 19, 2023 03:36
docker-compose exec server zenbot trade --strategy sar --days=1 --buy_pct=45 --sell_pct=99 --sell_stop_pct=2 binance.IOTA-BTC
node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. module.js:635:30
fetching pre-roll data:
api running on 172.17.0.4:20084/trades
Sun, 31 Dec 2017 16:38:46 GMT node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. at module.js:635:30
skipping 15039 hrs of previously collected data
@ramene
ramene / gist:4fdb53d68598bd665aa0edebd047d74f
Last active July 19, 2023 03:44
docker-compose exec server zenbot trade --paper --strategy=neural --buy_pct 20 --sell_pct 50 --markup_sell_pct=0.25 --markdown_buy_pct=0.25 --period=8s --max_sell_loss_pct=3 --poll_trades=1800 --order_poll_time 3600 --order_adjust_time=3600 --momentum=0.888 poloniex.XRP-BTC
Training
docker-compose exec server zenbot train --strategy=neural --buy_pct 20 --sell_pct 50 --markup_sell_pct=0.25 --markdown_buy_pct=0.25 --period=8s --max_sell_loss_pct=3 --poll_trades=1800 --order_poll_time 3600 --order_adjust_time=3600 --momentum=0.888 poloniex.XRP-BTC
---------------------------- STARTING PAPER TRADING ----------------------------
!!! Paper mode enabled. No real trades are performed until you remove --paper from the startup command.
Press l to list available commands.
2018-01-01 21:26:16 0.00014270 XRP-BTC +0.40% 2396 58 ++ 0.000142120 0.000141628 sell 489.00020403 XRP 0.00017876 BTC +7.18% -0.19%
2018-01-01 21:26:24 0.00014256 XRP-BTC -0.10% 3338 56 ++ 0.000142700 0.000141638 sell 489.00020403 XRP 0.00017876 BTC +7.08% -0.19%
2018-01-01 21:26:32 0.00014270 XRP-BTC +0.09% 7067 57 ++ 0.000142560 0.000141660 sell 489.00020403 XRP 0.00017876 BTC +7.18% -0.19%
@ramene
ramene / curl.sh
Created January 12, 2018 16:44
curl websocket
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
@ramene
ramene / pr.md
Created January 30, 2018 00:43 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: