Forum Discussion
MAX hourly price deviation
Hi everyone, I have this data https://www.cryptodatadownload.com/cdd/Binance_ETHUSDT_minute.csv
Which has 367925 row. And looks like this.
It contains price deviation data for every minute fro past few days, where [open] = current minute open price, [high] = current minute highest price, [low] = current minute lowest price and [close] = current minute closing price.
I'm trying to find maximum positive price deviation within the following hour for every minute.
My measure goes like this
MAX_PRICE_CHANGE =
VAR CURRENT_PRICE = MAX(Binance_ETHUSDT_minute[close])
VAR CURRENT_TIME = MAX(Binance_ETHUSDT_minute[date])
VAR PLUS1HOUR_TIME = CURRENT_TIME+1/24
VAR MAX_1HOUR_PRICE = CALCULATE( MAX(Binance_ETHUSDT_minute[high]), 'Binance_ETHUSDT_minute'[date]>CURRENT_TIME, Binance_ETHUSDT_minute[date]<=PLUS1HOUR_TIME )
RETURN
( MAX_1HOUR_PRICE - CURRENT_PRICE ) / CURRENT_PRICE
But I dont even know if it works, cause it takes eternity to calculate and never finishes.
Please advise the right way to do this.
2 Replies
- v-luwang-msft
Community Support
Hi xxenoss ,
I tested it against your data and again it failed, it tells me ,no enough memory to do it .And when intercepting part of the data and using the measure it was able to get the data, in my opinion the base data is too big.
you can follow the guide in this article to optimize your data model.
Best Regards
Lucien
- v-luwang-msft
Community Support
Hi xxenoss ,
Has your problem been solved, if so, please consider Accept a correct reply as the solution to help others find it.
Best Regards
Lucien