Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using candlestick with mongodb-grafana #21

Open
moonlight16 opened this issue Sep 21, 2018 · 0 comments
Open

Using candlestick with mongodb-grafana #21

moonlight16 opened this issue Sep 21, 2018 · 0 comments

Comments

@moonlight16
Copy link

I'm trying to get candlesticks to work with the plugin 'mongodb-grafana':
https://github.com/JamesOsgood/mongodb-grafana

I have a mongodb query like this:

db.5b8f88f33345af4961e38a62.aggregate( [
{"$match": {"symbol": "ES", "interval": "15m"} },
{"$sort": {"dts": 1}},
{"$project": {"name": "ES backtest", "ts": "$dts", "value": {"open": "$Open", "high": "$High", "low": "$Low", "close": "$Close"}, "_id": 0}}
])

But the chart isn't displaying anything (no error either).

I assume I need to provide "name", "ts" (timestamp), and "value" as per instructions for the mongodb-grafana. Is the approach I'm taking correct? Any tips on getting this to work?

NOTE: I did get something like this working w/o candlesticks:

db.5b8f88f33345af4961e38a62.aggregate( [
{"$match": {"symbol": "ES", "interval": "15m"} },
{"$sort": {"dts": 1}},
{"$project": {"name": "ES backtest", "ts": "$dts", "value": "$Close", "_id": 0}}
])

Any help is much appreicated.

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

No branches or pull requests

1 participant