when I try paper trader in CLI, I get a "RangeError: Maximum call stack size exceeded" error. If I lower the trading advisor required history size below 4000, the paper trader will work, but over this number I will get an error. Any way around this?
I need the history size to be high because I am running a strategy that utilizes multiple candle sizes in the strategy.
I am running this on Windows 10 and installed without bash.
events.js:156
EventEmitter.prototype.emit = function emit(type) {
^
RangeError: Maximum call stack size exceeded
1. CMD says something about a vulnerability and doesnt look like it install the decencies
2. Tried to run it anyways and the importer has no options for any exchanges. I tried to use gekko before and this was always an issue i had no idea how to resolve in the past.
I'm not sure if this is possible or has been created before but can a Gekko Strategy be used to manage a current trade. Crypto exchanges aint the best for risk management and i wondered if you could fire up a bot to execute a sell at a determined price, one for a stoploss and the other for a take profit.
Has anyone any idea on how to make this work? I understand it will be a manual process to add a price into the strat and fire up the bot, but if it can be used as a solid automated risk management bot, this would not only be a counter to coinegy but will be a great tool for traders who like to control the entry and exit but need sleep at some point in the the day.
Hi
How I can write an indicator that uses other indicator result as input? I mean like tradingview.com who has "apply indicator on Ichimoku" for instance.
thanks
I want to use the talib MOM momentum indicator to see when momentum is decreasing but I can't find much useful documentation on it. Is anyone able to show me an example? For instance, I want to see when the MACD bars in the attached picture are becoming filled. Thank you very much for helping!
After updating to Gekko 0.6.6 yesterday, the UI is no longer reading downloaded datasets. In the images below, Image #1 shows that the Importer is reading that there are some Currently Running Imports but when clicked on #2 shows that they are complete. Image #3 shows that these datasets are not being read as Available Data in the Backtest section and #4 shows the files in the gekko/history folder are not being compiled as SQLite databases.
I deleted my node_module folder and reinstalled to troubleshoot but this is still not working. Does anyone have a solution for this?
I am trying to get comfortable with gekko and Javascript to script my own strategy. I thought to begin my quest by getting an example strategy working in backtesting.
Unfortunately I couldn't get the native strategy as for the Tulip strategy to work.
2018-10-20 18:17:38 (INFO): Setting up Gekko in backtest mode
2018-10-20 18:17:38 (INFO):
2018-10-20 18:17:38 (WARN): The plugin Candle writer does not support the mode backtest. It has been disabled.
2018-10-20 18:17:38 (INFO): Setting up:
2018-10-20 18:17:38 (INFO): Trading Advisor
2018-10-20 18:17:38 (INFO): Calculate trading advice
2018-10-20 18:17:38 (INFO): Using the strategy: dump
2018-10-20 18:17:38 (INFO):
2018-10-20 18:17:38 (INFO): Setting up:
2018-10-20 18:17:38 (INFO): Paper Trader
2018-10-20 18:17:38 (INFO): Paper trader that simulates fake trades.
2018-10-20 18:17:38 (INFO):
2018-10-20 18:17:38 (INFO): Scanning local history for backtestable dateranges.
2018-10-20 18:17:38 (DEBUG): Available 43199
2018-10-20 18:17:38 (DEBUG): Optimal 43198
2018-10-20 18:17:38 (INFO): Gekko is able to fully use the local history.
2018-10-20 18:17:38 (INFO): Gekko was able to find a single daterange in the locally stored history:
2018-10-20 18:17:38 (INFO): from: 2018-09-20 13:39:00
2018-10-20 18:17:38 (INFO): to: 2018-10-20 13:37:00
2018-10-20 18:17:38 (INFO): WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-10-20 18:17:38 (INFO): WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
2018-10-20 18:39:23 (INFO): Setting up Gekko in backtest mode
2018-10-20 18:39:23 (INFO):
2018-10-20 18:39:23 (WARN): The plugin Candle writer does not support the mode backtest. It has been disabled.
2018-10-20 18:39:23 (INFO): Setting up:
2018-10-20 18:39:23 (INFO): Trading Advisor
2018-10-20 18:39:23 (INFO): Calculate trading advice
2018-10-20 18:39:23 (INFO): Using the strategy: dump
2018-10-20 18:39:23 (INFO):
2018-10-20 18:39:23 (INFO): Setting up:
2018-10-20 18:39:23 (INFO): Paper Trader
2018-10-20 18:39:23 (INFO): Paper trader that simulates fake trades.
2018-10-20 18:39:23 (INFO):
2018-10-20 18:39:23 (INFO): Scanning local history for backtestable dateranges.
2018-10-20 18:39:23 (DEBUG): Available 43199
2018-10-20 18:39:23 (DEBUG): Optimal 43198
2018-10-20 18:39:23 (INFO): Gekko is able to fully use the local history.
2018-10-20 18:39:23 (INFO): Gekko was able to find a single daterange in the locally stored history:
2018-10-20 18:39:23 (INFO): from: 2018-09-20 13:39:00
2018-10-20 18:39:23 (INFO): to: 2018-10-20 13:37:00
2018-10-20 18:39:23 (INFO): WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-10-20 18:39:23 (INFO): WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
TypeError: Cannot read property 'ema10' of undefined
at Base.strat.check (/home/rabberzzz/gekko/strategies/dump.js:32:36)
at Base.bound [as check] (/home/rabberzzz/gekko/node_modules/lodash/dist/lodash.js:729:21)
at Base.propogateTick (/home/rabberzzz/gekko/plugins/tradingAdvisor/baseTradingMethod.js:167:10)
at Base.bound [as propogateTick] (/home/rabberzzz/gekko/node_modules/lodash/dist/lodash.js:729:21)
at Base.calculateSyncIndicators (/home/rabberzzz/gekko/plugins/tradingAdvisor/baseTradingMethod.js:129:8)
at Base.bound [as calculateSyncIndicators] (/home/rabberzzz/gekko/node_modules/lodash/dist/lodash.js:729:21)
at afterAsync (/home/rabberzzz/gekko/plugins/tradingAdvisor/baseTradingMethod.js:94:10)
at asyncIndicatorRunner.processCandle (/home/rabberzzz/gekko/plugins/tradingAdvisor/baseTradingMethod.js:105:7)
at /home/rabberzzz/gekko/plugins/tradingAdvisor/asyncIndicatorRunner.js:103:5
at /home/rabberzzz/gekko/node_modules/lodash/dist/lodash.js:5144:23
--> in Database#all('\n SELECT * from candles_EUR_ETH\n WHERE start <= 1538314739 AND start >= 1538311740\n ORDER BY start ASC\n ', [Function])
at Reader.get (/home/rabberzzz/gekko/plugins/sqlite/reader.js:98:11)
at Reader.bound [as get] (/home/rabberzzz/gekko/node_modules/lodash/dist/lodash.js:729:21)
at Market.get (/home/rabberzzz/gekko/core/markets/backtest.js:61:15)
at Market.bound [as get] (/home/rabberzzz/gekko/node_modules/lodash/dist/lodash.js:729:21)
at Market.processCandles (/home/rabberzzz/gekko/core/markets/backtest.js:105:10)
at bound (/home/rabberzzz/gekko/node_modules/lodash/dist/lodash.js:729:21)
at Statement.<anonymous> (/home/rabberzzz/gekko/plugins/sqlite/reader.js:108:5)
I have searched every post I could find on undefined outcome or undefined property, but still I couldn't find the solution.
I saw today that Bitfinex released their Honey Framework Indicator Library. Looks like it has some stuff that TA-lib and tulip don't have: VWAP, True Strength, Donchian Channel and some others.
I thought it'd be great to use it in Gekko but am not sure if we can integrate it. Do you think it will work with Gekko? And do you think it will work on exchanges other than Finex?
I got it installed with the same Bash command as installing TA-lib and Tulip but haven't scripted a strategy yet. Would be great to hear from those who are better with node.js
I can't post the links but there is a github and a Medium article.
I have just installed Gekko and in trying to configure Local Data my Market text boxes are missing, i only have dates, and on the api setup tab i have no credential text boxes. Please see attached screen shots.
Gekko Strategies are about to change! The main thing I need to update now is meta information (things about your strategy) so strategies become easier to work with for Gekko. The goal of these changes are:
- Better dealing with strategy parameters (no more TOML files)
- More information so Gekko can display all strategies in a nice page so people can read about more conviently. Specifically so Gekko can render this page: https://app.gekkoplus.com/strategies/macd
See the link above for the full page.
New strategy format proposal
That page currently needs a JSON structure that describes the meta of the strategy, this is the JSON structure:
Code:
{
"name": "MACD",
"slug": "macd",
"description": "\n\n <p>The MACD is one of the most popular trend watching <strong>indicators</strong> in finance, it was created by Gerald Appel in the late 1970s. By using multiple price averages (EMAs) of different periods (one that follows the market more closely and one that lags behind, only catching bigger price swings). The indicator itself ouputs multiple numbers, when comparing them they can be interepted as signals that show when the trend of the price is changing.</p>\n\n <p><img src='/assets/MACD-pic.gif' alt='the MACD visualized in a candle chart' /></p>\n\n <p>The MACD <strong>strategy</strong> in Gekko is a simple strategy that implements the indicator. By comparing the difference between the EMAs from the signal the strategy triggers buy and sell signals. The strategy does come with additional logic:</p>\n\n <ul>\n <li><strong>thresholds:</strong> a signal will be triggered as soon as the difference goes above or below a configurable threshold, making the strategy more flexible than simply checking if the difference is above or below zero.</li>\n <li><strong>persistance:</strong> instead of trading as soon the difference is above or below the threshold, the strategy will wait a few candles to see if the difference keeps persisting. Only if it does the strategy will actually signal to Gekko to buy or sell. By setting persistance to 0 this behaviour is disabled.</li>\n </ul>\n\n ",
"intro": "The MACD is one of the most popular trend watching indicators in finance, it was created by Gerald Appel in the late 1970s. By using ...",
"quant": "1337quant",
"exchanges": [
{
"slug": "kraken",
"name": "Kraken",
"markets": [
"USD/BTC",
"USD/ETH",
"USD/BCH"
]
},
{
"slug": "poloniex",
"name": "Poloniex",
"markets": [
"USDT/BTC",
"USDT/ETH",
"USDT/BCH",
"USDC/BTC",
"USDC/ETH",
"USDC/BCH"
]
}
],
"frequencies": {
"min": 30,
"mid": 60,
"max": 360
},
"indicators": [
"MACD"
],
"parameters": {
"thresholds": {
"up": {
"type": "float",
"min": 0,
"max": 1,
"default": 0.025
},
"down": {
"type": "float",
"min": 0,
"max": -1,
"default": -0.025
}
},
"MACD indicator": {
"short": {
"type": "int",
"min": 1,
"max": 100,
"default": 10
},
"long": {
"type": "int",
"min": 1,
"max": 100,
"default": 21
},
"signal": {
"type": "int",
"min": 1,
"max": 100,
"default": 9
}
}
},
"highlightedBacktest": {
"id": "/backtest-MACD-basic-profit",
"performanceReport": {
"startTime": "2018-07-03 00:16:00",
"endTime": "2018-08-02 03:16:00",
"timespan": "a month",
"market": 15.805757433037172,
"balance": 8440.8606609821,
"profit": 1837.5706609821,
"relativeProfit": 27.828107821738854,
"yearlyProfit": 22279.133681120486,
"relativeYearlyProfit": 337.3944455130773,
"startPrice": 6603.29,
"endPrice": 7646.99,
"trades": 7,
"startBalance": 6603.29,
"exposure": 0.4426002766251729,
"sharpe": 50.99866402802568,
"downside": null,
"alpha": 1821.7649035490629,
"risk": 8
},
"market": {
"exchange": "binance",
"currency": "USD",
"asset": "BTC"
},
"tradingAdvisor": {
"candleSize": 60
}
}
}
- market and tradingAdvisor are the "default" market & candleSize.
- "highlightedBacktest" is the performanceReport of a backtest using this strategy (over the default market and configSize).
- "parameters" is now in JSON.
- rest is meta
That's a draft, does anyone think we need anything else? Maybe we can pull out the HTML and put it in a readme MD file?