Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 3,645
» Latest member: guiduck
» Forum threads: 658
» Forum posts: 3,549

Full Statistics

Online Users
There are currently 76 online users.
» 0 Member(s) | 76 Guest(s)

Latest Threads
Upcoming Strategy Competi...
Forum: Strategy Development
Last Post: crypto49er
12-12-2018, 10:51 PM
» Replies: 43
» Views: 2,423
Gekko only sell
Forum: Technical Support
Last Post: c00l
12-11-2018, 07:51 PM
» Replies: 0
» Views: 39
[Question] Why does gekko...
Forum: General Discussion
Last Post: hitripley
12-11-2018, 01:33 PM
» Replies: 2
» Views: 88
TALIB RSI Required parame...
Forum: Technical Support
Last Post: batssmasher
12-10-2018, 05:26 AM
» Replies: 1
» Views: 59
It is normal for both syn...
Forum: General Discussion
Last Post: mrpaiva
12-09-2018, 06:03 PM
» Replies: 0
» Views: 50
Is there a way to disable...
Forum: Technical Discussion
Last Post: askmike
12-08-2018, 11:08 PM
» Replies: 3
» Views: 110
[Share] RSI-BB-ADX with c...
Forum: Strategy Development
Last Post: Kris191
12-07-2018, 05:58 AM
» Replies: 14
» Views: 685
Big difference in live pa...
Forum: Technical Support
Last Post: mark.sch
12-06-2018, 08:12 AM
» Replies: 4
» Views: 192
Neural Network strategy b...
Forum: Strategy Development
Last Post: deandree
12-04-2018, 09:18 PM
» Replies: 5
» Views: 605
[SHARE] GAB - Gekko Autom...
Forum: Third Party Software
Last Post: taraxacum666
12-02-2018, 01:18 PM
» Replies: 136
» Views: 37,539

 
  [TECH TUT] Updating a old exchange integration to Gekko 0.6+
Posted by: askmike - 11-26-2018, 11:34 AM - Forum: Guides - No Replies

This is a technical guide that explains how to migrate legacy exchange wrapper files to new Gekko Broker wrapper files used by Gekko +0.6. This is meant for technical contributors to Gekko who want to update an old exchange integration into Gekko. This isn't an exact guide but it roughly covers the things you need to fix.

All exchange wrappers can be found here: https://github.com/askmike/gekko/tree/de...e/wrappers

- All files ending with .js.old are old wrappers not updated yet.
- All files ending with .js are new wrappers not are working with Gekko 0.6 or higher.

If you want to update an outdated wrapper you need to do a few things:

- Remove all requires to any files outside the `gekko/exchange` directory, such as log and util (the wrappers are now part of a standalone library called Gekko Broker).
- Some function signatures have changed, such as:
  - checkOrder: the callback needs to be passed on object describing partial fills & order rejection
  - cancelOrder: the callback needs to be passed err as well as a "filled" boolean and optionally more data regarding partial fills.
- Error handling works different now, you need to create a function that will handle correct (non error result) and you will need to create a global function that will process the exchange SDK output and normalize error types for the new retry system.

You can look at existing updated implementations for example, and be sure to check out the wrapper reference here: https://gekko.wizb.it/docs/extending/add...hange.html


  Looking for support installing on Windows 10
Posted by: francesco marzolo - 11-24-2018, 08:35 AM - Forum: Technical Support - Replies (3)

Hi

I'm trying to install Gekko on Windows 10.

I'm getting 

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64", you can set the PYTHON env variable.

I have PATH,  PYTHON and PYTHONENV:
PATH=...;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64
PYTHON=C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64
PYTHONENV=C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64

Please see the complete log attached


  Last candle data
Posted by: Kris191 - 11-23-2018, 10:47 PM - Forum: Technical Discussion - Replies (4)

Hi all,

Can someone help me please. I want to pull the low and high of the last candle into my strat and log in console, for some reason i cannot figure out how to get the data pulled through, can anyone help me out please.

Thanks


  Bollinger Band question
Posted by: Kris191 - 11-22-2018, 10:43 AM - Forum: Strategy Development - No Replies

Hi all,

I want to use gekko as a signal bot for my BBrsi strat, i thought i had got it, but i got a long advice and the price never touched the the lower band. Has anyone got experience in getting the BB system to work? Do i need to get Gekko to signal when the price is greater than or less than the lower band?

thanks

This is my code:

Code:
var _ = require('lodash');
var log = require('../core/log.js');

var BB = require('./indicators/BB.js');
var rsi = require('./indicators/RSI.js');

// let's create our own method
var method = {};

// prepare everything our method needs
method.init = function () {
 this.name = 'BB';
 this.nsamples = 0;
 this.trend = {
   zone: 'none',  // none, top, high, low, bottom
   duration: 0,
   persisted: false
 };

 this.requiredHistory = this.tradingAdvisor.historySize;

 // define the indicators we need
 this.addIndicator('bb', 'BB', this.settings.bbands);
 this.addIndicator('rsi', 'RSI', this.settings);
  logic = {longpos: false};
  this.logic = logic;
  this.lastCandle;
  this.currentCandle;
}


// for debugging purposes log the last
// calculated parameters.
method.log = function (candle) {
 // var digits = 8;
 // var BB = this.indicators.bb;
 // //BB.lower; BB.upper; BB.middle are your line values

 // log.debug('______________________________________');
 // log.debug('calculated BB properties for candle ', this.nsamples);

 // if (BB.upper > candle.close) log.debug('\t', 'Upper BB:', BB.upper.toFixed(digits));
 // if (BB.middle > candle.close) log.debug('\t', 'Mid   BB:', BB.middle.toFixed(digits));
 // if (BB.lower >= candle.close) log.debug('\t', 'Lower BB:', BB.lower.toFixed(digits));
 // log.debug('\t', 'price:', candle.close.toFixed(digits));
 // if (BB.upper <= candle.close) log.debug('\t', 'Upper BB:', BB.upper.toFixed(digits));
 // if (BB.middle <= candle.close) log.debug('\t', 'Mid   BB:', BB.middle.toFixed(digits));
 // if (BB.lower < candle.close) log.debug('\t', 'Lower BB:', BB.lower.toFixed(digits));
 // log.debug('\t', 'Band gap: ', BB.upper.toFixed(digits) - BB.lower.toFixed(digits));

 // var rsi = this.indicators.rsi;

 // log.debug('calculated RSI properties for candle:');
 // log.debug('\t', 'rsi:', rsi.result.toFixed(digits));
 // log.debug('\t', 'price:', candle.close.toFixed(digits));
}

method.check = function (candle) {
 var BB = this.indicators.bb;
 var price = candle.close;
 this.nsamples++;
 var rsi = this.indicators.rsi;
 var rsiVal = rsi.result;
 var Trend = 'none';
 if (candle.open <= candle.close) Trend = 'Bearish';
 if (candle.open >= candle.close) Trend = 'Bullish';

 
 // price Zone detection
 var zone = 'none';
 if (price >= BB.upper) zone = 'top';
 if ((price < BB.upper) && (price >= BB.middle)) zone = 'high';
 if ((price > BB.lower) && (price < BB.middle)) zone = 'low';
 if (price <= BB.lower) zone = 'bottom';
 //log.debug('current zone:  ', zone);
 //log.debug('current trend duration:  ', this.trend.duration);

 if (this.trend.zone == zone) {
   this.trend = {
     zone: zone,  // none, top, high, low, bottom
     duration: this.trend.duration+1,
     persisted: true
   }
 }
 else {
   this.trend = {
     zone: zone,  // none, top, high, low, bottom
     duration: 0,
     persisted: false
   }
 }
// <= less than or equal to & >= greater than or equal to

 if (price < BB.lower && rsiVal >= this.settings.thresholds.low && this.logic.longpos !== true){ // && rsiVal <= this.settings.thresholds.low) { // && this.trend.duration >= this.settings.thresholds.persistence) {
   this.logic.longpos = true;
   this.advice('long')
   log.info('Price has crossed Lower band at ' + price,);
   log.info('Current RSI is ' + rsiVal.toFixed(2));
   log.info('New Candle is a a ' + Trend, 'Candle');
 }
 //else if (price > BB.lower && rsiVal >= this.settings.thresholds.high && this.logic.longpos !== false) { // rsiVal <= this.settings.thresholds.low) { // && this.trend.duration >= this.settings.thresholds.persistence) {
   //this.logic.longpos = false;
   //this.advice('short')
//}
 else if (price > BB.upper && rsiVal >= this.settings.thresholds.low && this.logic.longpos !== false) { // && rsiVal >= this.settings.thresholds.high) { // && this.trend.duration >= this.settings.thresholds.persistence) {
   this.logic.longpos = false;
   this.advice('short')
   log.info('Price has crossed Lower band at ' + price,);
   log.info('Current RSI is ' + rsiVal.toFixed(2));
   log.info('New Candle is a  ' + Trend, 'Candle');
}
    else {log.info ('Nothing todo!')
        log.info('Current Price is ' + price,);
        log.info('New Candle is a  ' + Trend, 'Candle');}


  CLI Auto start at time
Posted by: Kris191 - 11-21-2018, 09:34 PM - Forum: Technical Discussion - Replies (1)

Hi all,

I'm using a PI3 to run Gekko bots and i want to sync the start time to the chart time on Tradingview, can someone help me? i want to schedule the bots to execute at midnight in CLI.

Can anyone help me with this?

Thanks


  Gekko Config Generator
Posted by: daniikun - 11-21-2018, 09:13 PM - Forum: Third Party Software - No Replies

Hey Guys,

I wrote a small tool to automatically generate the configs for gekko's backtest.

I describe it in detail in my repo: https://github.com/danisenpai/gekko-config-generator


  Big difference in live papertrader & live tradingbot
Posted by: CryptoAlpha - 11-21-2018, 01:54 PM - Forum: Technical Support - Replies (4)

Hello!

I just started using gekko and deployed my first live trading bot yesterday. At the same time i started a live paper trader with the same strategy.

When i checked the results today i saw that the paper trader had made twice the amount of trades and the profits are insane.
I'm running the exact same strategy so why am i getting such a big difference?  I use the bot on Binance, and set the paper traders trading fee to 0.1,  is that the right value? Binance fee is 0.1%?  Also paying fees with BNB giving a discount of 25%.

The trades being done by the two are similar when it comes to profit target and duration, but i do see that the trading bot is closing more orders at the same price it bought compared to the paper trader.


exchange  currency  asset         status duration                          strategy      PnL      type trades
binance      BTC VET                  running 19 hours, 57 minutes     -----          -0.044      tradebot 82
binance      BTC VET                  running 19 hours, 52 minutes     -----           45.374    papertrader 206



Hope someone can help me with this, i have no idea what causes the difference.

Thanks!  Big Grin


  real profit?
Posted by: barrubba - 11-21-2018, 01:34 PM - Forum: Strategy Development - No Replies

can someone pubblish some real profit and strat used?
i've read only about backtest and papertrading...would be interesting speaking about real results... 
thanks to everyone want to share! Wink


  Profits only in longer duration Candles
Posted by: altamash - 11-19-2018, 03:15 PM - Forum: Strategy Development - Replies (3)

I am new to crypto bots.
Thank you guys for your contribution towards this forum. It helped me a lot.
Coming to the point.

I manually backtested hundreds of strategies with different time frames for the past 8 months data (I couldn't get the GA to work)
Most of the strategies available built-in or custom (available on GitHub) with default parameters yielded losses in this bear market in one hour or 15 minutes candles.

But if I configure Candle size to 10 hours or more, then strategies like DEMA, MACD, neuralnet return positive results but with only few trades . As 10 hour candle size leads to longer exposure (in days) i feel it implies more risk.

I couldn't find a strategy which would perform in a bear market with smaller candlesize say 5 min or 1 min so gekko can do more frequent low risk/profit trades.

Am I missing anything? Would appreciate any pointers or leads


  Beginner's question
Posted by: pdbc - 11-15-2018, 02:44 PM - Forum: General Discussion - No Replies

Hi everybody.

Just joined this community. I would like to start coding my own strategy on this framework, I'm coming from a deeply modified-by-me version of Zenbot, but before going in deep with this new framework, I need to know if with Gekko I can overpass limits which I have with Zenbot. I hope someone of you experts can spend a little bit of time for a rookie like me.

Here my questions:

1) Is it possible to open different positions? In the meaning of: can I set a buy order, let it to be executed, store all the details in an object and then, if needed, set again a new buy order, let it to be executed and [...], so opening different long positions, till some conditions trigger the "sell" order for a certain position?
Example:

Time= 1000
buy trigger -> buy order -> bought 1 BTC at 5000€ -> store details in positions[1]

Time= 2000
buy trigger -> buy order -> bought 1 BTC at 4900€ -> store details in positions[2]

Time= 3000
buy trigger -> buy order -> bought 1 BTC at 5100€ -> store details in positions[3]

Time= 4000
sell trigger -> sell order for positions[2] at 5200€/BTC -> delete positions[2]

(With Zenbot it was not possible, it buys and sells a percentage of the total capital, so I had to deeply modify the engine to succed this)

2) Is it possible to open simultaneous order, and follow them one by one?

Example:

Time= 1000
buy trigger -> buy order at fixed price 4900€/BTC (order[1]) -> waiting for order[1] to be settled...

Time= 2000
buy trigger -> buy order at fixed price 4800€/BTC (order[2]) -> waiting for order[2] to be settled...

Time= 3000
price is 4900€/BTC -> order[1] settled -> store details in positions[1]

Time= 4000
sell trigger -> sent order for positions[1] at fixed price 5200€/BTC (order[3]) -> waiting for order[3] to be settled...

Time= 5000
price is 4800€/BTC -> order[2] settled -> store details in positions[2]

...and so on.

(With Zenbot, this is not possible. I should deeply modify the code, but I prefer to switch to a different platform before taking up this real asspain)

-------
That's all! Pretty easy to answer if you are acquainted with the code, but not for me if I have to read all the sources.

As said, it is not a matter of coding again my strategy, I will do this in a pretty fair time, but a matter of having an underlying framework which will support me and does not costrain me to modify everything in deep!

If something is not clear, please ask me and I will answer all of your questions. I really would like to leave Zenbot framework, cause till now it was a never-ending modifying job to tailor it to my needs.

Thanks to all!