Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

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

Open
shr00mie opened this issue Jan 4, 2018 · 4 comments

Comments

@shr00mie
Copy link
Contributor

shr00mie commented Jan 4, 2018

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. :)

@DeviaVir
Copy link
Owner

DeviaVir commented Jan 7, 2018

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

@SlackerATX
Copy link

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

@ziad00
Copy link

ziad00 commented Jan 8, 2018

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.

@shr00mie
Copy link
Contributor Author

shr00mie commented Jan 8, 2018

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants