askmike / gekko

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

Extending the UI chart #690

Closed askmike closed 7 years ago

askmike commented 7 years ago

Right now the charts found in the UI (backtesting + live strat runners) are very limited, they only show:

aa

However Gekko has a lot of other information that should be plotted in the chars as well:

I am thinking now of:

I was thinking something like this:

aa

Any thoughts on this?

thegamecat commented 7 years ago

This would be absolutely awesome. Would also be useful to be able to see all indicator values when hovering over the price line too.

Ultimately this is a tool to try and see if an indicator output is making sense regarding the price line.

Would also be useful to see volume bars on the price line.

I realise there has been a discussion about using the trading view graphs (and your reasoning for not using them is super sound), ultimately that is the type of thing that would be great to see.

askmike commented 7 years ago

Would also be useful to see volume bars on the price line.

Yes!

This would be absolutely awesome. Would also be useful to be able to see all indicator values when hovering over the price line too.

I'll make it so that when you hover over anywhere within the "combined" chart you will see all props (price, date, volume, indicator numbers) in one box that hovers at your mouse.

I realise there has been a discussion about using the trading view graphs (and your reasoning for not using them is super sound), ultimately that is the type of thing that would be great to see.

All behaviour above this comment is very easy to do for myself :)

thegamecat commented 7 years ago

Boom!

askmike commented 7 years ago

@thegamecat not related at all, but does this makes sense?

https://gekko.wizb.it/docs/introduction/about_gekko.html

(work in progress, lots of broken stuff).

thegamecat commented 7 years ago

Yep looks really good - only major change I would make is to the TA strategies section to state it's very easy to add your own Indicators with Nodejs knowledge.

thegamecat commented 7 years ago

I do wonder if there should be a tips and tricks section.

tomih commented 7 years ago

Hi, I think drawing library should be able to dynamicaly plot any number of time related data. It should plot on main chart or sub chart(s). I did that some time ago with highcharts. The json outputed by strategy dictated how many charts (canvases) there should be. Something like this:

[
{
    name: 'candlestick',
    target: 'canvas1',
    type: 'candle',
    data: {}
},
{
    name: 'ema',
    target: 'canvas1',
    type: 'line',
    data: {}
},
{
    name: 'macd',
    target: 'canvas2',
    type: 'line',
    data: {}
},
{
    name: 'buysell',
    target: 'canvas1',
    type: 'flag',
    data: {}
},
...
] 

I hope it's clear.

regards, T.

askmike commented 7 years ago

@tomih yes, that is exactly what I was thinking as well. I posted this issue here to get feedback on what this would look like visually.

As for implementation I am thinking a small list of all chartable elements as well where you can toggle what parts of the graph should be visible.

The chart would likely be driven by the JSON, but the price data will soon be removed from the backtest JSON response (the client can just fetch it using thegetCandles API call, in order to improve the issues outlined in #603).

tomih commented 7 years ago

Yes, backtester should return just backtest results. UI (the chart lib) should make separate request(s) to fetch candles and indicator data for the visible range of the chart.

As I already wrote once (and to ref #603), my strategy uses multiple timeframes (1, 15, 60, 240min, ...). 1 minute tf is used mainly for detecting pumps & dumps, other timeframes are used for different indicators. Therefore it would be nice to plot candles in different (selected) timeframes. I hope it makes sense. T.

thegamecat commented 7 years ago

So you have one strategy that calls different candle sizes?

How do you achieve this?

tomih commented 7 years ago

Actually I changed Gekko to create multitimeframe candles and emit them to strategy. https://github.com/tomih/gekko/tree/multitimeframe?files=1 T.

thegamecat commented 7 years ago

Nice will take a look.

JohannesFerner commented 7 years ago

This would actually allow to resolve #860 using some sort of Plugin or custom implementation in the strategy logic.

askmike commented 7 years ago

discussion moved to #793.

askmike commented 7 years ago

@JohannesFerner:

This would actually allow to resolve #860 using some sort of Plugin or custom implementation in the strategy logic.

Yes a chart tracking current portfolio balance would be a simple plugin listening to (currently undocumented) trade events & candle prices to output a new event "portfolio balance". This is currently part of the performanceAnalyzer though..

verbraucher commented 6 years ago

I think this feature is already part in the gekko Quasar UI: https://github.com/H256/gekko-quasar-ui

PGTBoos commented 5 years ago

@verbraucher this looks very usefull, are there plan for making this branch master ?. Having no access to candles seam a huge limitation with the current GUI. Yesterday i coded just a csv exporter (its in the strategies folder), to allow for data dumping and logging of additional data.

It would be great if additional lines could be drawn, on top of the graph (transparant overdraw?)

Are there more updated GUI's or is this the most advanced one so far ?