askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.06k stars 3.95k forks source link

Documentation for use #1272

Closed clickbrain closed 6 years ago

clickbrain commented 6 years ago

Note: for support questions, please join our Discord server

askmike commented 6 years ago

Again, my apologies for posting this as an issue, but can't find any docs or another channel besides Discord.

Have you seen the documentation website at https://gekko.wizb.it/ ? For example, this explains the gist of the software: https://gekko.wizb.it/docs/introduction/about_gekko.html#The-gist

If those don't solve your problem: I know the docs are not perfect, but could you be more specific when you say:

Would like a walkthrough of functions and their impact in the UI. I am not trying to understand the different strategies, setup/install, but actual usage concepts.

What functions and usage concept are you talking about? I am trying to get a sense of what you want to understand and what you don't understand.

clickbrain commented 6 years ago

Thanks I've been through all the docs already. I am headed to bed, but will definitely send you notes in the AM with what I am seeking. Thanks for replying.

clickbrain commented 6 years ago

The core problem I have I guess is conceptual as it relates to the interface on the app.

Overview New to trading bots like this. Fairly new to some of the TA concepts, but get them overall. We are working on implementing our own strategy we've been testing on crypt for a few months and using it manually. That said, I am new to how these trade and what the terms are in the interface and what they mean for initiating trades. I also want to be sure my dev partner understands them all, so want to clarify what they mean in Gekko.

Thank you for any help you can provide for someone new to this world.

Overview Questions

  1. How do you stop a Live Gekko once it has started or can you?
  2. Can you have multiple Tradebot Live Gekkos running at the same time with different strategies on the same coin pairs and/or the same strategies on different coin pairs at the same exchange? We ask that, because the code seems to trade the entire balance.
  3. Is there any way to not trade full balance? If not, can you indicate in the code where we might customize that?

Interface/Concept Questions

  1. What is the difference between Paper Trader and Market Watcher?
  2. Clarification - Is Currency what you will use from our balance in our account to make buys and Asset is what you are buying? Seems obvious upon looking at it, but just want to be sure.

Strategy Choices I've chosen DEMA as strategy just for an example. I realize the specific strategy parameters are relevant to the strategy chosen, but want to be sure I understand them.

  1. Candle Size - I am assuming that Candle Size in some way impacts the strategy. The smaller the candle size the more granular the trading choices by the bot. Is that a correct assumption? If not, how exactly does candle size work in regards to Gekko and strategies and the impact it has.

  2. What is the Warmup period? How does that impact the trade? Is that the amount of data used by the TradeBot to begin to determine trades based on the trends? In that case, would not a longer warmup period be more accurate or powerful?

The note under it says it will use 10 hours of data as history when you put in 10 and 1 hour candle size. Why would someone choose less data?

Does this mean it accumulates 10 hours of immediate history up to the time that the bot was launched, so 10 hours before the bot was launched?

What is the impact on an algorithm and what limits should we place on it or not? I understand that some strategies do not go far back, because they are irrelevant and only recent history is pertinent, but just want to be sure I understand the impact and if there are standards, what most people would use there.

I initiated trading yesterday and it ran for 2 plus hours, but no trades were executed. When I looked in Terminal though, it showed drops greater than the .25 in the strategy I picked. Is it just because the combination of factors were not yet right to execute a trade or potentially that I entered things incorrectly and impacted the ability of the bot to execute a trade.

Does the system when live use the data I imported previously or does it import new data when executed?

I ran some backtests and saw percentage gains of 30%-40% using Dema on the data I downloaded, but then ran more later and showed losses on the backtest. Not sure why that would be when from the same set of data.

If there is other documentation or books outside of the project you would recommend, I would appreciate that as well.

Thanks for your assistance on this and my apologies for taking up your time.

Brad

askmike commented 6 years ago

Hey Brad,

Thanks a lot for your writeup, this is actually very valuable. As you can imagine after being in this problem space for a few years, it's hard to step away from everything you know to have a look from a different perspective.

How do you stop a Live Gekko once it has started or can you?

The current UI is very basic, these additions (amongst others) are planned next, see #911 for details.


Now to simply answer your questions (under the assumption that you only use gekko via the web interface, not directly from the commandline (CLI)):

Can you have multiple Tradebot Live Gekkos running at the same time with different strategies on the same coin pairs and/or the same strategies on different coin pairs at the same exchange?

Gekko will prevent you from running more than 1 live gekko on the same exchange for a few reasons:

If you really want this you have to split the gekkos over multiple exchange accounts.

Is there any way to not trade full balance? If not, can you indicate in the code where we might customize that?

Not at the moment, there have been a lot of discussions about different approaches here. But right now none of them are implemented (I'd advice to search the issuetracker for trade partial balance).

What is the difference between Paper Trader and Market Watcher?

A market watcher simply "monitors" the market and saves all market data into the database for further analysis (backtesting, etc). Paper trader does this as well but ON TOP it also runs a strategy and simulates results (by simulating real trading ont he signals).

Clarification - Is Currency what you will use from our balance in our account to make buys and Asset is what you are buying? Seems obvious upon looking at it, but just want to be sure.

Every market you can trade on will have two "currencies", but Gekko calls the main one "the currency" and the second one the "asset". Risk metrics are based on the idea that "the currency" is safer to hold. Examples:

The smaller the candle size the more granular the trading choices by the bot.

The candle size is by far the most important "setting". All indicators are formulas run over candles. However if you run MACD over hourly candles you get completely different results than over daily candles. You can see the same effect by going to a chart website like https://bitcoinwisdom.com/markets/bitfinex/btcusd and toggling different time interval (it looks like you are looking at different markets alltogether by zooming in and out).

What is the Warmup period?

Most indicators are based on some form of "averaging". Averages only work after you have a few samples. the warmup is something gekko provides so that your strategy does not trigger signals until a certain amount of history is gathered. How much you need depends on your underlying indicators (and personal preference). See here for some discussions on the topic: https://quant.stackexchange.com/questions/3174/what-is-the-minimum-history-data-size-to-get-an-accurate-ema-macd-for-latest-hi

Why would someone choose less data?

Because based on your indicators that would mean less accurate results.

What is the impact on an algorithm and what limits should we place on it or not? I understand that some strategies do not go far back, because they are irrelevant and only recent history is pertinent, but just want to be sure I understand the impact and if there are standards, what most people would use there.

This is 100% personal preference / opinion. The only advice I can give is always backtest far back, but don't weigh results from last year as much as results from last week. Some things change in the markets, some things don't.

Does the system when live use the data I imported previously or does it import new data when executed?

The UI currently does this very limited (only if you were already running a market watcher), via the commandline all data will be merged from local data + live market data.

I ran some backtests and saw percentage gains of 30%-40% using Dema on the data I downloaded, but then ran more later and showed losses on the backtest. Not sure why that would be when from the same set of data.

Probably some massive price movements, hard to tell.

If there is other documentation or books outside of the project you would recommend, I would appreciate that as well.

My own start down this rabbit whole was the excellent topic on bitcointalk: https://bitcointalk.org/index.php?topic=60501.0

That said: I am a terrible trader, I am a programmer making these systems. Gekko really is a platform to create your own strats partially because I am not good at making them (and partially because I wouldn't be giving them away for free).

clickbrain commented 6 years ago

Thank you for this excellent reply. Really appreciate the insights.

clickbrain commented 6 years ago

Thank you also for creating this. We will work to give back as we work with the system.

John1231983 commented 6 years ago

@askmike : I have very simple question. I read the document and I did not find it. My question related to the indicator in backtesting. It shows red and green colors that for bought and sold. However, I did not know which color is sold and for buying. Could you mention it in the document also? It will be good for a beginner. Thanks

asmealio commented 6 years ago

Silly question - is there a delete function?

abdirrohim commented 6 years ago

How to change port in gekko?? Current port:3000 I will change it.. Because i have 2 accoun in bitcoin.co.id and i will run on one vps..

I think, if i can change port, i can install 2 gekko on 1 vps..

Ex firts gekko: localhost:3000 2nd gekko localhost:2000

Please help me...

radumiron commented 6 years ago

@John1231983 , I actually have the same question, but couldn't find the answer. Did you figure it out?Adding on top to that, I am color-blind, and the fact that the indicators are green/red doesn't help :).

John1231983 commented 6 years ago

I think it followed the bifinex rule: Green is buy and RED is sell. Am I right?

radumiron commented 6 years ago

Yes, @John1231983, you're right, I also asked the same question on the Discord channel, got the same reply. Thanks!

zupy39 commented 6 years ago

@askmike: This thread began with some questions from clickbrain and I have one issue related to that so maybe I should post it here. As I understood you cannot run multiple Live Gekkos on the same exchange. However, what I am trying to do is to watch multiple coin pairs, run the same strategy on them and then simply create a "blank" advice whenever market is ready for trading. At this point I only receive an e-mail and Gekko does not buy or sell instead of me. So there should be no problem with the account balance. At the moment I am running 26 Live Gekkos on bash Windows 10 (tradingAdvisor is enabled, paperTrader is disabled, watcher is set to same exchange, but different ETH/coin pairs). According to the bash output all of them are working and receiving the data from exchange. Here come my questions:

1.) I have 26 different config.js files and one strategy.js file. So each config is calling the same strategy. Is this problematic? Should I also create separate strategy.js file for each config?

2.) You mentioned you cannot run multiple Live Gekkos, but it seems to me it is working. Although I cannot confirm that calculation results are correct for each coin pair, I still need some time to see that. Is there any better way for doing this? I actually only need watcher for multiple coin pairs, strategy calculations for each pair and emailer to send me notification each time the strategy detects a buy signal. TradingAdvisor is not needed for me, but I do not now how to send e-mail, if you don't create actual advice.

I hope I was clear. Thank you for your good work!

Zamora7 commented 6 years ago

@zupy39 did you get an answer? I am trying to do the same thing.

zupy39 commented 6 years ago

@Zamora7 no answer yet. The thing is performing great for several days now without any error. Also all my custom TA analysis, TULIP and TALIB indicators seem to be correct. Based on my experience I can confirm it is possible to run several live gekkos on the same exchange to create e-mail alerts etc...

askmike commented 6 years ago

@zupy39 this is a very old thread, would you mind posting your question on the forum?

More people will see your question there: http://forum.gekko.wizb.it/