zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

\templates\dashboard.ejs - exchange.name = gdax, but tradingview exchange id = coinbase

Open shr00mie opened this issue 7 years ago • 4 comments

just got around to taking a peek at the newly implemented dashboard. lookin' good for a first pass. and me being the lucky one, already found a bug.

as far as zenbot is concerned, the exchange.name for coinbase/gdax, is the latter. so the dashboard is trying to call gdax:coincurrency from tradingview.com. problem is, on tradingview.com, it's not gdax, but coinbase, so the call would have to be coinbase:coincurrency. image

probably a simple fix at the top of dashboard.ejs with something along the lines of if exchange.name = gdax, then exchange.name = coinbase.

image

confirmed and tested by replacing all instances of <%= exchange.name.toUpperCase() %> with COINBASE: image

i'm sure there's a more elegant solution which i'll leave in the hands of the more experienced.

looks like doing what i did is causing some sort of referencial error from i think it was...\stats\index.html. i'll see if i can catch it when it happens next time. doesn't appear to crash zenbot, and it probably won't happen once the aforementioned code to replace gdax with coinbase is done.

i played around with the default ranges and technicals a bit. after manually refreshing the page, i noticed that the custom timeframes remained, but the technicals were reset. is this something we can preserve with cookies?

Example - technicals selected and applied: image

after hitting F5: image

...while we're here...there's a lot of dead space. any chance we might be able to do something more like...: image

aaand another thing. i was wondering why the time on the graph was so far off. looked at the code. sure nuff, hardcoded. image

might i suggest using something like THIS to implement something like var tzName = jstz.determine().name(); to pull TZ from browser?

actually. one more thing. i noticed that after the bot made a purchase, i had to manually refresh the page for it to register. would be nice if the thing refreshed that data on its own and maybe even made a noise/notification when an event like that happened. :)

shr00mie avatar Jan 04 '18 23:01 shr00mie

the GDAX/Coinbase thing should be fixed. Leaving this issue open for the TZ.

DeviaVir avatar Jan 07 '18 16:01 DeviaVir

I just pulled and I'm still getting an invalid symbol in the GUI. It's showing GDAX rather than COINBASE.

SlackerATX avatar Jan 07 '18 20:01 SlackerATX

Modified the symbol line in the TradingView.widget to this: "symbol": "<%if (exchange.name.toUpperCase() == "GDAX") {%>COINBASE<%} else {%><%= exchange.name.toUpperCase() %><%}%>:<%= asset.toUpperCase() %><%= currency.toUpperCase() %>",

It works for me now but unsure if I created other bugs on the way.

ziad00 avatar Jan 08 '18 02:01 ziad00

@ziad00, from what i could tell, that was the only consequential reference as that's what TV requires for the correct feed. looking forward to testing the PR.

shr00mie avatar Jan 08 '18 05:01 shr00mie