ilgizar-candlestick-panel
ilgizar-candlestick-panel copied to clipboard
Using candlestick with mongodb-grafana
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.