Query editor
SELECTtime + offset AS time,min_price_usd,max_price_usd,open_price_usd,close_price_usd,CASEWHEN close_price_usd >= open_price_usd AND part IN (2, 3, 5, 6)THEN open_price_usdEND AS grow_open_usd,CASEWHEN close_price_usd < open_price_usd AND part IN (2, 3, 5, 6)THEN close_price_usdEND AS drop_close_usd,CASEWHEN close_price_usd >= open_price_usd AND part IN (2, 3, 5, 6)THEN close_price_usd - open_price_usd + 0.000001END AS grow_boby_usd,CASEWHEN close_price_usd < open_price_usd AND part IN (2, 3, 5, 6)THEN open_price_usd - close_price_usdEND AS drop_boby_usd,CASE WHEN part = 4 THEN min_price_usd END AS wick_min_usd,CASEWHEN close_price_usd >= open_price_usd AND part = 4THEN max_price_usd - min_price_usdEND AS grow_wick_usd,CASEWHEN close_price_usd < open_price_usd AND part = 4THEN max_price_usd - min_price_usdEND AS drop_wick_usd,min_price_flr,max_price_flr,open_price_usd / open_price_flr AS open_price_flr,close_price_usd / close_price_flr AS close_price_flr,CASEWHEN (close_price_usd / close_price_flr) >= (open_price_usd / open_price_flr)AND part IN (2, 3, 5, 6)THEN (open_price_usd / open_price_flr)END AS grow_open_flr,CASEWHEN (close_price_usd / close_price_flr) < (open_price_usd / open_price_flr)AND part IN (2, 3, 5, 6)THEN (close_price_usd / close_price_flr)END AS drop_close_flr,CASEWHEN (close_price_usd / close_price_flr