Skip to content

Instantly share code, notes, and snippets.

worker_processes 1;
events {
worker_connections 1024;
}
http {
upstream lemmy {
# this needs to map to the lemmy (server) docker service hostname
server "lemmy:8536";
}
upstream lemmy-ui {
location / {
# The default ports:
# lemmy_ui_port: 1236(not used here)
# lemmy_port: 8536
set $proxpass "http://100.117.212.36:1236";
if ($http_accept ~ "^application/.*$") {
set $proxpass "http://100.117.212.36:8536";
}
# pictrs host
pictrs: {
url: "http://pictrs:8080/"
# api_key: "API_KEY"
}
# settings related to the postgresql database
database: {
# name of the postgres database for lemmy
database: "lemmy"
networks:
# communication to web and clients
lemmyexternalproxy:
# communication between lemmy services
lemmyinternal:
driver: bridge
internal: true
services:
### Keybase proof
I hereby claim:
* I am death916 on github.
* I am death916 (https://keybase.io/death916) on keybase.
* I have a public key ASDjg7Jh0cGdY2kmPgtT4cMLiekUVU3HJlouOrCJCjcYzgo
To claim this, I am signing this object:
This file has been truncated, but you can view the full file.
2017-07-18 19:20:55,388 INFO lbrynet.lbrynet_daemon.DaemonControl:92: Starting lbrynet-daemon from command line
2017-07-18 19:20:56,450 INFO lbrynet.lbrynet_daemon.DaemonServer:64: Using non-authenticated API
2017-07-18 19:20:56,453 INFO lbrynet.lbrynet_daemon.Daemon:254: Starting lbrynet-daemon
2017-07-18 19:20:56,565 INFO lbrynet.lbrynet_daemon.ExchangeRateManager:174: Starting exchange rate manager
2017-07-18 19:20:56,720 INFO lbrynet.lbrynet_daemon.Daemon:281: Platform: {"lbrynet_version": "0.13.1", "platform": "Windows-10-10.0.15063", "os_system": "Windows", "python_version": "2.7.13", "os_release": "10", "lbryum_version": "2.8.4", "ip": "2601:204:d500:5d11:6d68:226a:c929:a143", "lbryschema_version": "0.0.7", "processor": "AMD64 Family 23 Model 1 Stepping 1, AuthenticAMD", "build": "release"}
2017-07-18 19:20:56,726 INFO lbrynet.lbrynet_daemon.Daemon:488: Loading databases
2017-07-18 19:20:56,726 WARNING lbrynet.lbrynet_daemon.Daemon:499: db_revision file not found. Creating it
2
This file has been truncated, but you can view the full file.
2017-07-18 19:20:55,388 INFO lbrynet.lbrynet_daemon.DaemonControl:92: Starting lbrynet-daemon from command line
2017-07-18 19:20:56,450 INFO lbrynet.lbrynet_daemon.DaemonServer:64: Using non-authenticated API
2017-07-18 19:20:56,453 INFO lbrynet.lbrynet_daemon.Daemon:254: Starting lbrynet-daemon
2017-07-18 19:20:56,565 INFO lbrynet.lbrynet_daemon.ExchangeRateManager:174: Starting exchange rate manager
2017-07-18 19:20:56,720 INFO lbrynet.lbrynet_daemon.Daemon:281: Platform: {"lbrynet_version": "0.13.1", "platform": "Windows-10-10.0.15063", "os_system": "Windows", "python_version": "2.7.13", "os_release": "10", "lbryum_version": "2.8.4", "ip": "2601:204:d500:5d11:6d68:226a:c929:a143", "lbryschema_version": "0.0.7", "processor": "AMD64 Family 23 Model 1 Stepping 1, AuthenticAMD", "build": "release"}
2017-07-18 19:20:56,726 INFO lbrynet.lbrynet_daemon.Daemon:488: Loading databases
2017-07-18 19:20:56,726 WARNING lbrynet.lbrynet_daemon.Daemon:499: db_revision file not found. Creating it
2
class BotStrategy(object):
def __init__(self):
self.output = BotLog()
self.prices = []
self.closes = [] # Needed for Momentum Indicator
self.trades = []
self.currentPrice = ""
self.currentClose = ""
self.numSimulTrades = 1
self.indicators = BotIndicators()
#! python3
import sys, getopt
import time
from botchart import BotChart
from botstrategy import BotStrategy
def main(argv):
chart = BotChart("poloniex","BTC_XMR",300)
Traceback (most recent call last):
File "backtest.py", line 17, in <module>
main(sys.argv[1:])
File "backtest.py", line 14, in main
strategy.tick(candlestick)
File "G:\code\python\GIT\FORKS\trading-bot-master\trading-bot-master\part3\botstrategy.py", line 25, in tick
self.evaluatePositions()
File "G:\code\python\GIT\FORKS\trading-bot-master\trading-bot-master\part3\botstrategy.py", line 36, in evaluatePositions
if int(self.currentPrice < (self.indicators.movingAverage(self.prices,15))):
TypeError: '<' not supported between instances of 'float' and 'NoneType'