Closed Gab0 closed 7 years ago
Can you share your:
Ran full seven month history for clearer results. Profits: UI -58% CMD -100%
config.tradingAdvisor = {
enabled: true,
method: 'MACD',
candleSize: 1,
historySize: 10,
adapter: 'sqlite',
talib: {
enabled: false,
version: '1.0.2'
}
}
.....
config.MACD = {
// EMA weight (α)
// the higher the weight, the more smooth (and delayed) the line
short: 10,
long: 21,
signal: 9,
// the difference between the EMAs (to act as triggers)
thresholds: {
down: -0.025,
up: 0.025,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 1
}
};
....
config.paperTrader = {
enabled: true,
// report the profit in the currency or the asset?
reportInCurrency: true,
// start balance, on what the current balance is compared with
simulationBalance: {
// these are in the unit types configured in the watcher.
asset: 1,
currency: 100,
},
// how much fee in % does each trade cost?
fee: 0.25,
// how much slippage/spread should Gekko assume per trade?
slippage: 0.05,
}
Ah! In your CLI config you set candleSize
to 1. candleSize is in minutes. Could you try again with either the UI set to 1 minute or the CLI backtester to 60?
And that was the problem :x Would be nice to comment ' candle size in minutes' on the config file just to.. not let this be in vain haah Thanks.
Ah yes, great idea.
[ bug report]
Action taken Imported poloniex data; Ran a backtest on feb 1st to feb 2nd on the UI frontend. Ran backtest from the command line. Same time period, same parameters (MACD standard)
Expected result Same results on both.
Actual result Backtest result from UI seems fine, a profit of like 1% i think. But on the command line, profit is -90%. It seems to buy and sell always in clusters, in this standard MACD it always buys and then sells subsequently (suffering immediate loss from fee). With some settings it even buy/sells like eight times in sequence.
Other information A piece of the debug: