Comments (9)
Upgrade your node... node > v7.x.x is required
from gekkoga.
Ok i saw the problem. Before running i must import the data specified in the config file and for that period.
Now trying to make it somehow live...
from gekkoga.
I have problems runnning this on node 8.9.1.
First terminal is giving that error:
xxx POST /api/backtest 500 1,060ms -
Error: non-error thrown: Child process has died.
at Object.onerror (/home/genetic/gekko/node_modules/koa/lib/context.js:105:40)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
GeneticA terminal is giving many errors like:
/gekko/gekkoga$ node run -c config/config.js
No previous run data, starting from scratch!
Starting training with: 4 units
{ StatusCodeError: 500 - "Internal Server Error"
at new StatusCodeError (/home/genetic/gekko/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/home/genetic/gekko/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/genetic/gekko/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/home/genetic/gekko/node_modules/request/request.js:188:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (/home/genetic/gekko/node_modules/request/request.js:1171:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (/home/genetic/gekko/node_modules/request/request.js:1091:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
name: 'StatusCodeError',
statusCode: 500,
Maybe i miss something ?
Can you help ?
Thanks.
from gekkoga.
It works fine on mine, after some workaround though...
I just have a kind of time out deconnection from the server after a long backtest. but i can easily restart the ga, and it continues from where it stopped.
I had to upgrade node, though, reinstall gekko and its dependencies, then reinstall gekkoga and the other npm packages mentionned on http://gekkowarez.com/gekko-genetic-algorithm/
Side question to @generalectric : what are the variables on which the GA is working in your sample config file ? seems to me its only candle size, history size and thresholds. Not 'signal', nor the short / long EMAs am i correct ?
edit : running on windows 10
from gekkoga.
Correct in the sample the macd long short signal are hard coded.. So it's only doing candles thresholds and history size.
You reminded me.. I'm going to move the timeout setting into the config. Keep in mind when this happens it will break configs.. So keep an eye out for commits where Sample-config.js has new stuff added to it.. Because you will need to add them to your config in the event you update
from gekkoga.
@sanitariu that's usually a face-palm error... Like when I realize I forgot something silly and wanna face palm myself. The error catching is really good.. You can usually find out exactly where the error is.. But in this case it's most likely something basic like no data.. Bad daterange... Bad stratname.. Are some examples probably the most common is I forgot to change stratname when I get that
from gekkoga.
Hello,
This is how I install all:
git clone git://github.com/askmike/gekko.git
npm install --only=production
npm install talib
I edit here web/vue/UIconfig.js and change the port to 3002
I changed access for 0.0.0.0
And instead localhost i am using 192.168.1.129
Here how it looks like:
const CONFIG = {
headless: true,
api: {
host: '0.0.0.0',
port: 3002,
},
ui: {
ssl: false,
host: '192.168.1.129',
port: 3002,
path: '/'
},
adapter: 'sqlite'
}
if(typeof window === 'undefined')
module.exports = CONFIG;
else
window.CONFIG = CONFIG;
Now running the node:
~/gekko/web$ node --max-old-space-size=8192 server.js
TAlib is enabled
Serving Gekko UI on http://192.168.1.129:3002/
Everything is fine. And i can access on web too.
Now gekkoga part in another terminal:
cd gekko
git clone https://github.com/gekkowarez/gekkoga.git
npm install random-ext
npm install fs-extra
cd gekkoga/config
cp sample-config.js your-new.js
Now i edit your-new.js and replace localhost:3000 with 192.168.1.129:3002
cd ..
gekko/gekkoga$ node run -c config/your-new.js
And now crash as before. I tried 3 times from scratch. Maybe i miss something
very little.
If anyone see it please help.
Error on terminal 1:
xxx POST /api/backtest 500 874ms -
Error: non-error thrown: Child process has died.
at Object.onerror (/home/genetic/gekko/node_modules/koa/lib/context.js:105:40)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
Error on terminal 2 where running gekkoga:
node run -c config/your-new.js
No previous run data, starting from scratch!
Starting training with: 4 units
{ StatusCodeError: 500 - "Internal Server Error"
at new StatusCodeError (/home/genetic/gekko/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/home/genetic/gekko/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/genetic/gekko/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/home/genetic/gekko/node_modules/request/request.js:188:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request. (/home/genetic/gekko/node_modules/request/request.js:1171:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage. (/home/genetic/gekko/node_modules/request/request.js:1091:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
name: 'StatusCodeError',
statusCode: 500,
message: '500 - "Internal Server Error"',
error: 'Internal Server Error',
options:
{ url: 'http://192.168.1.129:3002/api/backtest',
json: true,
body: { gekkoConfig: [Object], data: [Object] },
headers: { 'Content-Type': 'application/json' },
timeout: 900000,
method: 'POST',
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false },
response:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [Object],
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: false,
domain: null,
_events:
{ end: [Array],
close: [Array],
data: [Function],
error: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
socket:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: null,
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 9,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 934,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleTimeout: -1,
_idleNext: null,
_idlePrev: null,
_idleStart: 1199,
_destroyed: false,
[Symbol(asyncId)]: 18,
[Symbol(bytesRead)]: 176,
[Symbol(asyncId)]: 53,
[Symbol(triggerAsyncId)]: 30 },
connection:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: null,
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 9,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 934,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleTimeout: -1,
_idleNext: null,
_idlePrev: null,
_idleStart: 1199,
_destroyed: false,
[Symbol(asyncId)]: 18,
[Symbol(bytesRead)]: 176,
[Symbol(asyncId)]: 53,
[Symbol(triggerAsyncId)]: 30 },
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers:
{ 'content-type': 'text/plain; charset=utf-8',
'content-length': '21',
date: 'Fri, 10 Nov 2017 13:44:49 GMT',
connection: 'close' },
rawHeaders:
[ 'Content-Type',
'text/plain; charset=utf-8',
'Content-Length',
'21',
'Date',
'Fri, 10 Nov 2017 13:44:49 GMT',
'Connection',
'close' ],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 500,
statusMessage: 'Internal Server Error',
client:
Socket {
connecting: false,
_hadError: false,
_handle: null,
_parent: null,
_host: null,
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 9,
_maxListeners: undefined,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
_bytesDispatched: 934,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
parser: null,
_httpMessage: [Object],
read: [Function],
_consuming: true,
_idleTimeout: -1,
_idleNext: null,
_idlePrev: null,
_idleStart: 1199,
_destroyed: false,
[Symbol(asyncId)]: 18,
[Symbol(bytesRead)]: 176,
[Symbol(asyncId)]: 53,
[Symbol(triggerAsyncId)]: 30 },
_consuming: true,
_dumped: false,
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 6,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'POST /api/backtest HTTP/1.1\r\nContent-Type: application/json\r\nhost: 192.168.1.129:3002\r\naccept: application/json\r\ncontent-length: 779\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/api/backtest',
_ended: true,
res: [Circular],
aborted: undefined,
timeoutCb: [Function: emitTimeout],
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(outHeadersKey)]: [Object] },
request:
Request {
domain: null,
_events: [Object],
_eventsCount: 5,
_maxListeners: undefined,
body: '{"gekkoConfig":{"watch":{"exchange":"poloniex","currency":"USDT","asset":"BTC"},"paperTrader":{"slippage":0.05,"feeTaker":0.25,"feeMaker":0.25,"feeUsing":"taker","simulationBalance":{"asset":1,"currency":1},"reportRoundtrips":true,"enabled":true},"writer":{"enabled":false,"logpath":""},"tradingAdvisor":{"enabled":true,"method":"MACD","candleSize":240,"historySize":70},"trader":{"enabled":false},"backtest":{"daterange":{"from":"2017-07-01 00:00","to":"2017-09-07 00:00"}},"performanceAnalyzer":{"riskFreeReturn":5,"enabled":true},"valid":true,"MACD":{"historySize":70,"short":10,"long":21,"signal":9,"thresholds":{"up":"10.26","down":"-4.60"},"candleSize":240}},"data":{"candleProps":["close","start"],"indicatorResults":false,"report":true,"roundtrips":false,"trades":false}}',
headers: [Object],
timeout: 900000,
method: 'POST',
readable: true,
writable: true,
explicitMethod: true,
_qs: [Object],
_auth: [Object],
_oauth: [Object],
_multipart: [Object],
_redirect: [Object],
_tunnel: [Object],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Object],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: {},
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
uri: [Object],
proxy: null,
tunnel: false,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: '3002',
host: '192.168.1.129',
path: '/api/backtest',
_json: true,
httpModule: [Object],
agentClass: [Object],
agent: [Object],
_started: true,
href: 'http://192.168.1.129:3002/api/backtest',
req: [Object],
ntick: true,
timeoutTimer: null,
response: [Circular],
originalHost: '192.168.1.129:3002',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true },
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
read: [Function],
body: 'Internal Server Error' } }
from gekkoga.
To generalectric: it will be good to add something/somewhere to print .... "You do not have data, or waiting for data" and not crashing.
from gekkoga.
i adjust my gekkoga config file to exact date of imported data n its work. thankyou @sanitariu
from gekkoga.
Related Issues (20)
- Feature request: log all backtests HOT 2
- Error when starting a genetic simulation on actual config (macos)
- Calculation error of yearlyProfit HOT 1
- no "stratName" and "daterange" in result file
- One random number for two parameters HOT 1
- tulindError: needs to be number HOT 1
- update for gekko 0.6 HOT 2
- 500 - "Internal Server Error" HOT 6
- Score as mainObjective HOT 2
- General purpose of this project HOT 1
- Cannot read property 'exchange' of undefined HOT 4
- Parameter units HOT 1
- sharpe: null - global maximums can't get filled HOT 1
- Startprice/Endprice question HOT 1
- Critical security vulnerability during npm install HOT 4
- Questions - Number of Epochs & relaunch of GA session HOT 2
- "Global maximum" not persistent when profits are negative
- always picking up and working through default parameters.. // HOT 3
- Manual backtest results don't match GA results HOT 1
- Your website HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gekkoga.