Hey people, happy to have jumped into Gekko after watching a few of Crypto49ers videos on Youtube. I was aware of Gekko over a year ago but only in the last few days have i jumped into the world of Gekko backtesting.
After doing lots of reading & exploring, I want to say a massive big thank you to askmike & the other developers for sharing & developing a great thing! Im already looking forward to the new UI and watching closely at the exciting Gekkoplus project!
So far i'm playing with cheap shit alt coins so i'm happy to have a little punt at live trading here & there over the quiet xmas period...
I initially installed on OSX and did some backtesting with some data, all went along fine but I did have some problems with npm & dependancies. They got solved easily with crypto49ers great videos and the info on here & the web. Then i used my Poloniex API key... again all running fine on OSX.
Then I installed on Pi - so far only have run the --ui version.
But i think my first mistake was using the same API key as my backtesting OSX - on my live Pi - i got fairly regular "nonce supplied" errors. A quick search on here and learn there is a 8 per second limit, so I generated a new API key, so one for live Pi & one for backtesting on mac. - But i'm still getting fairly regular nonce errors. on some occasions i get a whole html dump of a cloudflare page (504 error) in my terminal.
So my 1st question: Are the nonce errors because my live bot is using 1 minute candles? Am i hammering the API too much? is there any easy solution?
2nd question: My pi is using 6gb card, my strat runner is pulling 1 min candles. Is this a ticking time-bomb? my instinct tells me im going to run out of space in sqlite soon. Any ideas how much GB of disc space a month of 1 minute candles will be. Should i look at a cron script to clean up or is that a bad idea & required for the bot to work?
3rd question: I sometimes get
Code:
'[ws] stale websocket client, terminating..'
error. So far im not finding much info on that.. Any help or pointers please. Pi is running the --ui with ethernet connection. Is this because im running the UI? i plan to run the CLi in the future, but i find the UI helpful for now.
I tried to install "LSTM_MACD_RSI_V3" and got this error when I tried to run it:
<-- POST /api/backtest
xxx POST /api/backtest 500 226ms -
Error: non-error thrown:
This Gekko instance encountered an error and can't continue
at Object.onerror (C:\Users\threi\Gekko\gekko-stable\node_modules\koa\lib\context.js:105:40)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
I installed synaptic to my gekko folder and put the strategy file LSTM_MACD_RSI_V3.js in my strategy folder.
There is no .toml file. Is that the reason for the crash?
using tradebot in a market BTC-USDT on Binance, Gekko worked well if I have BTC funds and 0 USDT (it starts to sell, than buy, etc.)
If I start with 100 USDT (for example) and 0 BTC it should buy BTC as first step but it won't buy anything.
Do Gekko only works if it starts with BTC funds? (So i should manually buy BTC and then start gekko??)
Instead of using APIs like fetch_ohlcv from exchange interfaces?
Synthesized candle works fine in realtime trader, speed is OK there, but it becomes an issue when backtesting with imported history data. I tried to import half a year's data from bitfinex and it took a whole night to complete. I guess it'll be slower if the rate limit is low for an exchange.
Could anyone explain what advantage it has to use synthesized candle from trades?
I am building new start using some talib indicators . but i couldn't find the complete parameters for RSI .
I want to use upper band at 80 and lower band at 20 with 5 length. but what i found in talib parameters is only optInTimePeriod
i tried adding 2 optInTimePeriod but it didn't work . also how can i add different length. how can i calculate rsi values using upper and lower band with my length ?
They ruin my strategy. Is there a way to just place normal limit orders at the exact price the strategy calls for without trying to be on top of order book and cancel when limit orders don’t fill? In fact, is there a way to issue your own limit orders at specified price as opposed to just waiting for candle to close?
I also made a video about it if you want to know which files I had to modify. Honestly, it was 3 files (including the config file) and adding a DCA strategy. But if you want to explore modifying your strategies with the ideas I describe below, it's worth a watch.
I know dollar cost average might not be something that's interesting to members of this forum. But you can expand upon this in multiple ways (you still need to use Gekko to do the following, not Gekko-DCA):
-Set a limit on how much your bot trades (ex: you have $200 but only want the bot to trade $100)
-Layer your buys and sells (ex: Use 50% of your portfolio to buy at price A, and 50% to buy at price B, Sell 25% when the price hits your 1st target, sell the remaining 75% when it hits your 2nd target)
-Run multiple bots using one exchange API keys by locking each bot to a specific amount (add code in your strat to adjust the amount based on profit/losses so the bot always have a full balance to work with)
Those are just some of the ideas that I can think of off the top of my head, I'm sure there are plenty others. Love to hear what you guys think.
but i have just a question because my gekko doesnt use the whole amount of currency or asset.
for example i have 1000usd and gekko buys xrp but not for the whole 1000usd, so there is always 35-40usd rest.
or when selling back from xrp to usd gekko doesn't sell all xrp, so like about 90 xrp will stay.
is this maybe misconfiguration by me or it is like some security margin so gekko can be sure the amount is big enough so the order will not be canceled or something?
I am trying to adapt the native traling stop loss into some open source neural net based strategies, but the same problem described at https://steemit.com/gekko/@crypto49er/ge...esn-t-work happens. I mean, when the stop loss is triggered, the conditions to buy are satisfied, and the strategy advice to buy again.
In order to avoid that, I am trying to figure out how to put an extra condition, using timeout or any other kind of logic, in order to avoid the strategy to buy again.
The problem is that I am not able to find how to register my code to be notified when the trigger loss got triggered.
Can someone please provide me some sample code for this?