Gekko Forum
Possible to visualize more? - Printable Version

+- Gekko Forum (https://forum.gekko.wizb.it)
+-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html)
+--- Forum: General Discussion (https://forum.gekko.wizb.it/forum-14.html)
+--- Thread: Possible to visualize more? (/thread-57991.html)



Possible to visualize more? - emjayar - 08-20-2019

Hi there,

Is it possible with the backtesting to add more graphs (e.g., indicator output) to the result window? Currently I only see the closing price plotted there, but it would be very helpful to superimpose other information on that graph.

Thanks!


RE: Possible to visualize more? - Hallonstedt - 09-02-2019

(08-20-2019, 01:04 PM)emjayar Wrote: Hi there,

Is it possible with the backtesting to add more graphs (e.g., indicator output) to the result window? Currently I only see the closing price plotted there, but it would be very helpful to superimpose other information on that graph.

Thanks!

I suppose this is a feature request as this clearly is not built in already. At the given development rate of Gekko, I wouldn't hold my breath for adding fairly complex features as requested.

However, the strategies are quite easy to amend. You can, for example, add code that logs all the output of candles and indicators with semicolon separation, then import it into MS Excel and paint whatever graphs you want. The features of Excel are quite advanced, including candle sticks (see attached picture).

Add something like this to the strat.check() section of your favorit strategy (you obviously need to amend it to print your chosen indicators);
Code:
logRow = candle.start.format('YYYY-MM-DD HH:mm')+';'+candle.open.toFixed(0)+';'+candle.high.toFixed(0)+';'+candle.low.toFixed(0)+';'+candle.close.toFixed(0)+';'+this.tulipIndicators.ema10.result.result.toFixed(0)+';'+this.tulipIndicators.ema21.result.result.toFixed(0)+';'+this.tulipIndicators.psar.result.result.toFixed(0);
console.log(logRow);

And start it from a console like this;
Code:
node gekko --backtest --config config.js > results.csv

Clean it up of initial and trailing output from Gekko from results.csv and import it into Excel by clicking Data and then From Text/CSV.


RE: Possible to visualize more? - emjayar - 09-10-2019

Thanks a lot for the reply! I'll try to see if I can add some graphs in the code myself