Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 230 online users. » 0 Member(s) | 230 Guest(s)
|
Latest Threads |
Gekko development status ...
Forum: Announcements
Last Post: kontho
5 hours ago
» Replies: 1,006
» Views: 930,964
|
Gekko with malware spotte...
Forum: Announcements
Last Post: Dstewarts
5 hours ago
» Replies: 189
» Views: 170,064
|
Gekko 0.6 released
Forum: Announcements
Last Post: Pharagon
11-23-2024, 10:13 AM
» Replies: 122
» Views: 269,022
|
An official Gekko service...
Forum: Announcements
Last Post: drivemad2
11-22-2024, 07:24 AM
» Replies: 103
» Views: 189,807
|
New Gekko UI in the works
Forum: Announcements
Last Post: clduplicateremover
11-18-2024, 08:21 PM
» Replies: 174
» Views: 227,663
|
How to Soft Reset or Hard...
Forum: General Discussion
Last Post: lucifar
10-07-2021, 07:18 PM
» Replies: 22
» Views: 53,006
|
How to add Binance Future...
Forum: Technical Support
Last Post: Xavier32
10-07-2021, 02:20 PM
» Replies: 47
» Views: 108,364
|
Bittrex Configuration hel...
Forum: Bittrex
Last Post: yirzolusto
10-07-2021, 07:39 AM
» Replies: 6
» Views: 19,112
|
[Question] Why does gekko...
Forum: General Discussion
Last Post: cryptocurrency0
10-06-2021, 01:16 PM
» Replies: 16
» Views: 45,823
|
a couple of technical Que...
Forum: Technical Support
Last Post: mtom78632
10-06-2021, 11:08 AM
» Replies: 25
» Views: 58,576
|
|
|
Lowering tickrate |
Posted by: i00ney - 03-25-2018, 12:40 PM - Forum: Technical Discussion
- Replies (2)
|
|
Just curious, is there any benefit to lower the tickrate for example when using Binance?
Currently it is using the default of 20 seconds, but does it somehow have a positive effect to lower it to 10 or even 5 seconds?
|
|
|
Current Price, Last Buy Price, and Multiple Timeline Strategy Questions |
Posted by: CmvrkDunn - 03-24-2018, 05:18 PM - Forum: Strategy Development
- Replies (3)
|
|
Backtesting
Using the ui version of gekko, has their been any complaints of the backtesting total percentage being inaccurate?
For extensive and in depth backtesting, is there significant advantages using MongoDB vs SQLite? If not, are there instructions / discussions on how to interface with the SQLite database directly? If so, are there instructions on how to switch data storing to MongoDB and how to interact with the database directly?
Overlapping question: Does gekko have the ability in backtesting (or live and paper trading for that matter) to export trade summaries to an Excel or text file? Kind of like the backtesting summary but with more information such as buy in price, sell price as well? If so, is it possible to customize the data fields exported?
Is there any possibility of backtesting or ui live gekko displaying a tradingview.com chart? It would be so helpful to look at in depth detail of each trade afterwards to see what improvement in the strategy is possible or to find common trends.
Strategy
Does gekko have the ability to short if an exchange allows it? Using gekko on Bitfinex for example?
In sample strategies, I see references to this.settings. Where is this referring to? I recognize that this.config is referencing variables in the strategies toml file but didn't find a similar file for this.settings. Is this.settings referring to the timeframe and required history from gekko's ui? Does it refer to variables in your strat.init?
Has there been any discussions about strategies that recognize and act on patterns like an equilibrium, bull or bear flag, or inside bars?
In your response, you referenced trade.price as a property that holds average last buy price. Can you give a brief snippet of trade.price usage in a strategy (how do you call it, I imagine by assigning it to a variable in the update function of your strategy)?
Is there any perceivable way to change variables in your method while a live gekko is running (that the live gekko would then start acting on)? For example, in the case of having a general strategy but you manually place a buy at an opportune point, from the ui you could update your boughtin variable to true along with the buy in price and let the bot handle selling. This would help not having to stop and start the strategy over in this situation or risk having the bots buying and selling out of sync with the actual buy / sell situation on the exchange.
Assuming a strategy is using one minute candles, using counters to delay indicator result calculation, I edited the RSI and MACD indicators to each give multiple timeframe results to be used in the same strategy (calculations tested successfully). I did this to achieve quickest price reaction gekko allows as well as providing more strategy conditions to use. Can you think of any consequences of this? I'm sure there is a more elegant design approach than I took (willing to send you the files), and I'd love to hear if any come to mind and your thoughts on this. Ultimately I think this would be terrific if it could be integrated into the ui though I know it would require some major front end design changes.
Again, thank you, thank you, thank you for your time and helpful responses. They are beyond appreciated!!
|
|
|
Gekkosys for multi-pair trading. |
Posted by: Papa_Karma - 03-23-2018, 12:23 PM - Forum: Strategy Development
- Replies (3)
|
|
Greetings everyone.
Not a programmer I am, so please ignore my ignorance.
I can see logic in scripts (used to program human beings) and even edit till some point but struggling every time.
Perhaps there is a thread about things like this (could not find one, still reading through the forums) or you already tried to implement similar ideas so please share your thoughts
I use gekko's awesomeness on binance when i can't trade manually (sometimes using multiple gekkos so i won't have to digg strats' code too much - one bot enters, the other exits).
1. Lately, in this sideway market with not a lot of action and signals, i trade multiple pairs (in a raw, not simultaneously - too harsh for me) for example: have eth and watching eth's assets that are listed also vs btc, usdt, bnb; buying, let's say neo had a signal, and watching neo vs majors; selling for bnb; etc. This kind of approach brings more trades and action to the boring down/sideways and is good for normal trends as well.
I am working now to combine an appropriate system of gekkos and strats but some kind of logical blindness makes it slow for me.
2. On binance, it shows usd price of an asset along the price in market's currency and happens, that there is enough difference between usd prices of the same asset. So my other thought is about something that will monitor those differences and trade same asset across currencies. It looks possible but is it doable?
Thank you.
Live long, prosper and may the force be with you.
|
|
|
Plot indicators on the graph? |
Posted by: jasurakk - 03-21-2018, 01:30 PM - Forum: General Discussion
- Replies (2)
|
|
Now that I have been testing different indicators and strategies with a Gekko's back testing tool, I have found it quite difficult to actually gain any progress since I can't find any way to plot all of my indicator's values to the chart, and thus I don't quite know that what happens and why? So, is there actually any way to do it in Gekko? I mean; could I configure Gekko so that for example EMA's are plotted to the price chart, and RSI's or CCI´s would be plotted on their own charts etc.?
|
|
|
[SHARE] GAB - Gekko Automated Backtests |
Posted by: tommiehansen - 03-21-2018, 12:01 PM - Forum: Third Party Software
- Replies (147)
|
|
GAB
Gekko Automated Backtets
*** THIS IS BETA ***
If something does not work, it simply does not work since time hasn't existed yet to get it working.
Updated 14 april 2018 with MySQL as new option.
---
Why
I needed a way to run backtests for Gekko in a 'brute-force' manor automated and with multi-threading.
I also needed a way to compare all these runs and get extra data such as win percent etc.
-
Prerequisites (required)
1. Gekko installed and working
2. Webserver + PHP (preferrably 7.1+) with cURL and PDO SQLite or PDO MySQL/MariaDB
3. A user with write access
If you do not understand any of this it will be very hard to run this tool.
You can try googling for things such as install apache php 7.2.
-
How-to
0. Copy+Paste system/user.config.sample.php and rename the new file to user.config.php
1. Open user.config.php and make sure the $server variable is pointing at your Gekko install e.g. http://localhost:3000
2. Go to your-localhost/gab/ and see if it works.
3. Run something..
4. After you got some runs click 'View runs' in the menu and check results
--
Multi-server mode
If you're a nerd you can also use multi-server mode by specifying an array of servers instead of just one in your user.config.php like this:
$server = [
'http://localhost:3000',
'http://my-other-server:3000',
'http://my-third-server:3000',
];
If your Gekko-files are not in sync on all these servers it will fail miserably though.
Setting an array will randomly use one of the servers to run a strategy.
In this case it's 3 so setting threads to e.g. 6 will usually mean 2 threads will run on each of these servers.
Do note that e.g. Chrome has a max concurrent connections @ 6 so in order to increase max-threads (and have it actually run in paralell) you would need to either force higher max concurrent connections or randomize/create subdomains for post.php (and remove any CORS restrictions).
-
Dynamic parameters
GAB uses dynamic parameters, these work for all strategy paramers. Example, RSI BULL/BEAR:
Code: # SMA
SMA_long = 100:1000,100
SMA_short = 10:90,10
# BULL
BULL_RSI = 5:20,5
BULL_RSI_high = 70:90,5
BULL_RSI_low = 40:60,5
# BEAR
BEAR_RSI = 5:20,5
BEAR_RSI_high = 40:60,5
BEAR_RSI_low = 10:30,5
The format is <FROM>:<TO>,<STEPPING>.
This means that e.g. 10:20,5 will generate the range: 10,15,20
The params are inclusive meaning that odd stepping e.g. 5:15,10 will become 5,10,15 - the first and last of range is always kept.
-
Screens
Runner (select.php): https://i.imgur.com/kcXXMdW.png
Results (view.php): https://i.imgur.com/CPhvDEl.png
-
Donate
People keeps asking about this so i'll just leave it here for future reference:
BTC: 15cZUi7VvmCQJLbPXYYWChHF3JpsBaYDtH
ETH: 0xe03c5eb9DF93360e3Bcfcd13012B7DeebbED6923
-
Download
Go to: https://github.com/tommiehansen/gab/
or just clone: https://github.com/tommiehansen/gab.git
|
|
|
Advice and Trade logs |
Posted by: Kris191 - 03-20-2018, 04:26 PM - Forum: General Discussion
- Replies (7)
|
|
Hi All,
where are all the trades made by the bots logged i'm running 2 bots in CLI and get advice via email but it doesn't log the trade anywhere, Advicelogger is active also.
Please help i'm looking to track these trades from Gekko rather than pulling directly form the exchanges.
Thanks
|
|
|
Normalised Indicator to compare gains of different pairs |
Posted by: Gryphon - 03-20-2018, 03:14 PM - Forum: Strategy Development
- No Replies
|
|
I'm trying a 'moderator' approach to allow trading between multiple pairs - essentially a separate node server to run alongside gekko to receive the indicators from multiple gekko tradebots on different pairs, work out which is the best pair to be long on at any one time, and instructing the gekko bots to buy or sell accordingly
My first thought was to simply use a normalised EMA type comparison between all the pairs - whichever pair's ema has the most positive gradient goes long until another pair's ema gradient exceeds it, or it drops <0. A very simplistic approach to start with.
I know there are people here with far more experience using indicators than I have though, so I was wondering if anyone could recommend indicators that would be better suited to the task?
TIA
|
|
|
[Gekko development] Guaranteeing event order in the gekko stream |
Posted by: askmike - 03-20-2018, 09:37 AM - Forum: Technical Discussion
- Replies (1)
|
|
This is a technical post describing a solution in the architecture change of a gekko stream called the FIFO event emitter.
Gekko Streams have been in Gekko for over a year now, they represent a flexible collection of "plugins" that can all interact with each other using "events". The main idea is that each "plugin" is a box that consumes events and produces its own events. If you for example setup a "Gekko Paper trader" under the hood a number of plugins are created and glued together by Gekko, these plugins are (in the current 0.5.x version):
- Trading advisor: this plugin that takes candle data, feeds it into a stragy and emits new advice events.
- Paper trader: this plugin that takes advice events (from the trading advisor) calculates simulated roundtrips and emit new trade events.
- Performance analyzer: this plugins takes trade events and calculates overall statistics over them (profit, risk, etc) this plugin emits roundtrip events.
The beauty of keeping all the above plugins separate is that they are instant swappable: the only difference between a paper trader and a real trader is the second plugin in the above list being replaced with a plugin that actually real trades at a live exchange. Note that the input (advice events) and the output (trade events) are the same, this means that the other plugins don't care about what kind of trader is being ran (paper trader or live trader) as long as they send the same event in the same format. This essentially means that the plugins follow some kind of event based interface model.
The problem
During a backtest Gekko will compose the same set of plugins and pump market data (from a database) into them as fast as they can process them, the problem has to do with a main event called the "candle event" that represents an updated state of the market. This event is used by a lot of different plugins, for example by all 3 plugins in the list above. In response to the candle event the trading advisor can potentially broadcast an advice event, which will go into the paper trader who will emit a trade event. This event will go into the performance analyzer. Here is a visualization of what is happening.
It is extremely important that the paper trader can only process the advice event after it fully processed the candle event, because it needs simulate a trade based on the current price. The problem is guaranteeing that (which is ultimately determined by the order in which plugins are loaded which depends on a few different things).
How Gekko 0.5 solves it
The current Gekko (0.5x and below) does not actually deal with this problem, the implemented workaround is to add the candle the advice is based on to the candle event. The paper trader would completely ignore the raw candle event and always rely on the candle that was attached to the advice event. This works great and is fast, but it's a very limited workaround. In the new event system coming to 0.6 we will also issue events whenever anything in the portfolio changes. Which happens on every candle where the paper trader has a long exposure (assuming the price changed). This event is not possible in the current work around.
In depth
In most scenarios (for example during a backtest) all plugins are run in fully synchronous javascript code (in nodejs). This means that their complete execution will block everything else.
If we know that plugins will always execute everything synchronous we could defer the emitting of events to the next tick of the nodejs event loop. However doing so means that we need to guarantee that the next candle can only come in after all events have been propagated, which can become harder to manage. Especially if you don't want to use setTimeout since it does not allow for more than millisecond precision (which might potentially slow things down if you are queuing up a lot of orders) as well as the overhead of the node event loop. Keeping async plugins in mind, another downside is that it becomes tricky to parallelize multiple async plugins acting on the same event.
A more elegant solution is turn the native event emitter from nodejs (which behaves last in first out event queue, LIFO) into a FIFO (first in first out) event queue. Here is a visualization of the native nodejs event emitter applied to a gekko stream:
Take a look at red numbers which represent the order in which events are processed: This would cause the paper trader to act on advice using outdated market data (since the new candle has not hit the paper trader yet). Here is the gekko event emitter which forces all plugins to process an event (the candle event) before propagating the next one (the advice event).
The actual implementation consists of two parts:
1. Create a new class that allows plugins to emit an event but not actually propagate it straight away, add a function to emit an event which was pending (see the code).
2. Inside the main loop of the gekko stream, make sure to flush all pending events (one by one recursively) until all pending events are completely processed. Only after this start working with the next candle (see the code).
---
This is just the beginning, having more guarantees in place allow us to make more optimizations without having to worry about nasty race conditions.
|
|
|
Maybe someone already did something like this? |
Posted by: redriver - 03-19-2018, 09:09 PM - Forum: Strategy Development
- No Replies
|
|
Привет всем 2
Я не знаю, как программировать.
Помоги мне, пожалуйста.
Я работаю над одной стратегией
Начало
Логика с каждой новой свечой
1) если открытых позиций нет
с новой свечой, которую бот покупает на рынке
после покупки ставит стоп-лосс (покупная цена -х)
2) если есть открытые позиции, то положите новый стоп-лосс (цена открытия новой свечи - x)
Как этот алгоритм будет выглядеть в Гекко?
Ценить любую помощь
|
|
|
Internet connection loss |
Posted by: arminb - 03-19-2018, 04:06 PM - Forum: General Discussion
- Replies (3)
|
|
I noticed that my market watcher was removed as my internet connection got lost. Since then the bot did not trade. Now I manually created a new market watcher for the strat runner's exchange/currency/asset. The strat runner seems to have accepted the new market watcher and is up to date. Now I wonder if the bot will continue trading correctly? Also how can we prevent market watcher being removed on internet connection lost?
|
|
|
|