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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 39,322
» Latest member: DishisdesignJewellery
» Forum threads: 929
» Forum posts: 6,493

Full Statistics

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

Latest Threads
An official Gekko service...
Forum: Announcements
Last Post: Ruslanjoshua
07-24-2025, 06:27 AM
» Replies: 111
» Views: 246,242
Gekko 0.6 released
Forum: Announcements
Last Post: Mediks
07-14-2025, 07:09 AM
» Replies: 123
» Views: 331,775
New Gekko UI in the works
Forum: Announcements
Last Post: celemtine
07-03-2025, 07:24 AM
» Replies: 185
» Views: 322,577
Gekko with malware spotte...
Forum: Announcements
Last Post: pugoing
07-01-2025, 02:29 AM
» Replies: 212
» Views: 274,038
Gekko development status ...
Forum: Announcements
Last Post: sanmarconns
10-21-2024, 06:34 PM
» Replies: 744
» Views: 1,464,156
How to add Binance Future...
Forum: Technical Support
Last Post: Xavier32
10-07-2021, 02:20 PM
» Replies: 47
» Views: 133,755
Bittrex Configuration hel...
Forum: Bittrex
Last Post: yirzolusto
10-07-2021, 07:39 AM
» Replies: 6
» Views: 22,851
[Question] Why does gekko...
Forum: General Discussion
Last Post: cryptocurrency0
10-06-2021, 01:16 PM
» Replies: 16
» Views: 57,042
a couple of technical Que...
Forum: Technical Support
Last Post: mtom78632
10-06-2021, 11:08 AM
» Replies: 25
» Views: 71,671
crex24
Forum: Other exchanges
Last Post: marketingseo
10-05-2021, 09:47 AM
» Replies: 216
» Views: 511,298

 
  UI doesnt show any Exchange
Posted by: leonvaldez - 01-27-2019, 09:34 AM - Forum: Technical Support - No Replies

Hi

My UI doesnt show up any exchange not even in Live Gekkos, Local Data, Config, etc

I attach an image.

If somebody knows whats going on, 
I will apreciate your help



Attached Files
.jpg   2.jpg (Size: 101.63 KB / Downloads: 6)

  Please help me about my strategy
Posted by: f_o_r_z_a34 - 01-25-2019, 07:23 AM - Forum: Strategy Development - Replies (1)

Hey everyone,

I am trying to create most profitable strategy for TUSD/USD in Gekko.

Can anyone correct my strategy that you can see below ? If someone helps me I would be grateful    Shy

Thank you so much.

config.tradingAdvisor = {
enabled: true, 
method: 'buyatsellat', 
const buyat = 1.002
const sellat = 0.998
const stop_loss_pct = 0.995
const sellat_up = 1.004
candleSize: 60, 
historySize: 2,


  Kraken WebSockets Public API Version 0.1.0
Posted by: LordBB - 01-23-2019, 07:22 PM - Forum: Feature Requests - No Replies

Hi,

I was wondering iif this could be interesting for Gekko, like for High-Frequency trading or so?

https://www.kraken.com/en-us/help/websocket-api

++


Star Backtesting Tool XFFFF Limit of 1000
Posted by: Piff_Sara - 01-18-2019, 12:05 PM - Forum: General Discussion - No Replies

Hi guuys!
I'm running the backtesting tool of XFFFF, but I can run at most 1000 run in one shot!  Dodgy

Example:
I set up the TOML file with 1 milion setting combinations, but the backtester always stops at the 1000th.

Statistically speaking we would need to have hundreds of thousands tests in order to have some realiable results.

Anyone can help, please?

Cheers!!


  Rejected Sell Trades Can Lose 10% Of Your Portfolio... Or More
Posted by: crypto49er - 01-14-2019, 11:05 PM - Forum: Technical Discussion - Replies (12)

I had seen this issue for sometime but I finally came up with a really rough fix. I would really appreciate if someone can write the code to do this asynchronously.

Issue: (Known to occur in Coinbase Pro, but can occur for any exchange that lets you use limit orders and a post flag that prevent executing market orders) When Gekko issues a sell order, in the seconds that it receives the current price from the exchange and before it sends the sell order to the exchange, the price went up. Normally, that's a good thing. This shows there's so much volume that your order shouldn't have any problem getting filled. The problem is, when the order goes to the exchange, the exchange rejects it because Gekko is now trying to sell below the ask price. Once the order is rejected, Gekko doesn't retry the order. Technically, even if Gekko did, it would get a message back from the exchange "HTTP 400 Error: order not found" and it will continue to get this message until the retry attempts are exhausted. So that's the issue. If your strategy issued a sell order to get out of the market in anticipation of further drops, you're now screwed!!! Gekko will be holding the bag for you while the crypto goes down in price from 2% to 5% to 10% (on a bad day) or more if you are trading an extremely volatile crypto.

To Test This: Modify sticky.js inside the exchange/orders folder. (You need to check your trade pair in the Coinbase Pro UI to see the spread first. See note directly below). In line 129, replace this:

Code:
return r(ticker.ask);

with:

(for Coinbase Pro)
Code:
return r(ticker.ask - 1);

If you want to see rejected buy trades, you can modify line 111 from this:

Code:
return r(ticker.bid);

with:

(for Coinbase Pro)
Code:
return r(ticker.bid + 1);

***Note: I previously modified it from 0.03 to 10% but in my recent test, I was getting insufficient funds error instead of the rejected trade error. I now changed it to 1 but it really comes down to the trade pair. The optimum number is a number that is slightly larger than the spread.***

This essentially tricks Gekko into selling below ask or buying above bid prices. For rejected buy trades, they don't cost you anything except for potential gain. But that could be a lot! Anyway, the next time your strategy issues a buy/sell order, you will see the rejected trade error in the console. It looks something like this.
Quote:2019-01-14 16:07:18 (INFO): Trader Received advice to go long. Buying  ETC

2019-01-14 16:07:18 (DEBUG): Creating order to buy 2.174301930195067 ETC



Mon Jan 14 2019 16:07:23 GMT-0500 (EST) {}

sticky create

buy

2019-01-14 16:07:23 (DEBUG): [ORDER] statusChange: SUBMITTED

2019-01-14 16:07:23 (DEBUG): [ORDER] statusChange: OPEN

2019-01-14 16:07:24 (DEBUG): [ORDER] statusChange: REJECTED

2019-01-14 16:07:24 (INFO): [ORDER] summary: { price: 0,

  amount: 0,

  date: moment("1969-12-31T19:00:00.000"),

  side: 'buy',

  orders: 1 }
2019-01-14 16:07:24 (DEBUG): syncing private data
I know ETC was 51% attacked recently. This is just a test and ETC is the cheapest crypto I have access to on Coinbase Pro. But do note the erroneous 1969 date listed in console. It usually is 12/31/1969 or 1/1/1970. If you ever seen this in the past, your trade failed to execute.

Solution: I am not an advanced coder in Javascript, so this isn't the cleanest solution, but it works. The idea is to have your strategy issue another buy order after getting the "rejected" message from the exchange. One thing I noticed while coming up with this is if you try to issue another buy order, Gekko completely ignores it and doesn't even output a message to console. I'm guessing this is because older strategies send multiple buy orders and Gekko has to ignore them. So the only way to get Gekko to accept a new buy order is to issue a sell order first.

The files I modified are:
config file
gdax.js
strategy file

In the config file, we are going to store the state of "rejected" so the other files can read/write to them. I just added the following before the last line. You can probably add them anywhere.

Code:
config.IssueState = {
 rejected: false,
 side: 'sell',

}

In gdax.js, we are going to give it the ability to write to the rejected variable in the config file, so we need to add this at the top where the other required files are declared.

Code:
var config = require('../../core/util.js').getConfig();

Now, in the checkOrder function, in the if (status == 'pending') section, I changed it from:

Code:
if(status == 'pending') {
     // technically not open yet, but will be soon
     return callback(undefined, { executed: false, open: true, filledAmount: 0 });
   } if (status === 'done' || status === 'settled') {
     return callback(undefined, { executed: true, open: false });
   } else if (status === 'rejected') {
     return callback(undefined, { executed: false, open: false });
   } else if(status === 'open' || status === 'active') {
     return callback(undefined, { executed: false, open: true, filledAmount: parseFloat(data.filled_size) });
   }

to:

Code:
   if(status == 'pending') {
     // technically not open yet, but will be soon
     return callback(undefined, { executed: false, open: true, filledAmount: 0 });
   } if (status === 'done' || status === 'settled') {
     config.IssueState.rejected = false;
     return callback(undefined, { executed: true, open: false });
   } else if (status === 'rejected') {
       if (data.reject_reason == 'post only' ) {
         config.IssueState.rejected = true;
         config.IssueState.side = data.side;
       }
     return callback(undefined, { executed: false, open: false });
   } else if(status === 'open' || status === 'active') {
     return callback(undefined, { executed: false, open: true, filledAmount: parseFloat(data.filled_size) });
   }
It essentially updates the "rejected" variable in the config file to true if the trade was rejected. It will also store the side so we know if it is a buy or sell order. If the trade is successfully placed, it will change the "rejected" variable in the config file to false.

In the strategy, I again have to give it the ability to access the config file by adding this at the top, where all the other required files are declared:

Code:
var config = require ('../core/util.js').getConfig();
The line is slightly different than the one for gdax.js because of the strategy file is stored in a different location than gdax.js.

I then added a variable to check how often to check if the "rejected" variable is still true. This is a global variable at the top where other variables are placed. 

Code:
var waitForRejectedRetry = 0;
This is where asynchronous code would make this much cleaner. Instead of checking after x minutes, you can have this run only when status changes from either rejected or completed/settled in gdax.js. But I couldn't figure out how to implement that.

So instead this is the code in the check function of the strategy:
Code:
 if (config.IssueState.rejected){
   if (waitForRejectedRetry == 0){
     if (config.IssueState.side == 'buy'){
       this.advice('short'); // To reset previous buy order by issuing a sell order
       this.advice('long');
     } else {
       this.advice('long'); // To reset previous sell order by issuing a buy order
       this.advice('short');
     }
     waitForRejectedRetry = 11;
   }
   if (waitForRejectedRetry > 0) {
     waitForRejectedRetry--;
   }

 }
With this code, it will create a new buy/sell order if "rejected" is set to true in the config file. As mentioned previously, it has to issue a sell first if a buy order was rejected or buy first if a sell order was rejected. It will then wait ~10 minutes (the check order function doesn't always run every minute, assuming 1 minute candles). If the "rejected" variable is still valid, it will repeat this until the order is no longer rejected. Again, I wish it doesn't have to do this every x minutes but this is the only way to do it that I know of synchronously.

I tested this and confirmed that it works. Don't forget to remove the code in sticky.js otherwise every order will be rejected. If you're interested to simulating a scenario where every other trade starting with the first is a rejected trade, you can modify sticky.js to read from the "rejected" variable from the config file. I will include the code in a reply post if anyone is interested. 

I now have to implement this in all of the strategies that I use. I can't wait for the official fix from AskMike. I know it is on his to-do list.


  Coming up with a "Strategy"-strategy
Posted by: wilbertvdl - 01-13-2019, 11:43 PM - Forum: Automated Trading - Replies (14)

Hi all,

I'm wondering: how do you guys define which strategy you are eventually going to use in live trading?

I've been doing a fair bit of backtesting, with both manual parameters setting and bruteforce/gekkoga results. Both on various strategies like MACD, RSI_BULL_BEAR(_ADX), RSI, etc. And of course on various timeframes.

With all these combinations I obviously get very mixed results. One strategy with a certain set of parameters perform better on certain timeframes and other strategies better on other timeframes.

As far as I can see it there are a couple of steps involved in defining what strategy you're going to use:
Determine which asset/currency you're going to trade;
BTC/USDT, ETH/BTC, XRP/ETH, etc.

What timeframe would you like to cover in your upcoming trade-periode;
Are you looking for shortterm (few weeks, a month) or longer term (months, year) trade-period?

What timeframe in the history would resemble your upcoming trade-periode (I guess this requires some feeling for the market);
Do you expect your upcoming trade-periode to be overall bullish or bearish?
Was there a time-span in history with a comparable trend?

What is the actual trade strategy you're going to use?
Do you base that on trying out a couple of strategies? Do you have a go-to strategy?

Finding the right parameters
(brutforce/gekkoga)backtesting?

To papertrade or not to papertrade?
Once you have your tradeperiod, strategy and parameters, do you actually start papertrading or do you start live-trading based on your research so far?

To be honest, I'm quite struggling with these steps. Perhaps my aproach is faulty or my knowledge lacking.

How did you come up with the set-up you're using for live-trading and which strategy are you using?

I would love to read it!


  Parameter optimization of Neural strategies
Posted by: Bychance - 01-13-2019, 05:27 AM - Forum: Strategy Development - Replies (19)

Hi friends,
Is there any guide on how to optimize the parameters for neural strategies? I found several posts about using the genetic algorithm to optimize the parameters. I did not see any information if it can be used for neural strategies as well. However, I could not run the genetic algorithm and appreciate if anybody could help. The steps mentioned by Gekko warez did not work for me. I found some others had the same problem with running the genetic algorithm.
Thanks,


  Multiple assets trading
Posted by: Bychance - 01-13-2019, 05:21 AM - Forum: Strategy Development - Replies (3)

Hi friends, 
I started using Gekko currently. I'm using Linux commandline to run gekko. I added several alts and started trading based on BNB. Is there any way to limit the buy and sell of each coin based on its balance? Because I noticed that the trading bot used my total BNB balance just for one coin. It will be ideal if the trading bot just could buy and sell based on each coin's balance and add each profit (if any!) for further trading of that coin.
Thanks


  I can not start the web interface
Posted by: vam - 01-12-2019, 06:20 PM - Forum: Technical Support - No Replies

I installed gekko in docker in a virtual machine without nginx. When I try to access it from the host machine, I see this popup:



Disconnected

Something happened to either Gekko or the connection. Please check the terminal where Gekko is running or your network connection.
[i]This message is shown when the UI is unable to open a websocket connection with the Gekko Server.[/i]




Tell me something I'm doing wrong?


  Idex.market support
Posted by: vam - 01-12-2019, 06:16 PM - Forum: General Discussion - No Replies

Tell me please, is there any support for the Idex decentralized exchange?