Closed twu13 closed 3 years ago
There have been a few updates to the RobinHood package since I created the script & haven’t had the chance to glance over this but at the time it was lacking the latest bar when I running the script in real-time. If I remember correctly, I tried running this every 5 minutes & when calling the latest data it would take RH approx. roughly 10 seconds to update their bar data so the get_latest_crypto_quote() was a temporary patch to get the latest “bar” as waiting 10 seconds for updated bar data was far too long (in my opinion) to wait in trading the crypto.
You are correct in that this wrapper returns the OHLC prices for the entire day but I was only interested in the Closing price for the reason above, the OHL are just fillers for the bar.
Hope this helps,
Jason
From: Tony Wu @.> Reply-To: jgQuantScripts/Algo-Trading-Crypto @.> Date: Sunday, May 23, 2021 at 11:50 AM To: jgQuantScripts/Algo-Trading-Crypto @.> Cc: Subscribed @.> Subject: [jgQuantScripts/Algo-Trading-Crypto] latest crypto quote returns OHLC from different interval (#1)
It looks like the quote retrieved by get_latest_crypto_quote() returns Open, High, and Low prices based from the entire day, whereas the historical numbers you are rbinding to are specific to the interval specified (e.g. 5min) - is that intentional? Wouldn't you want the latest quote with OHLC from the same interval (previous 5 min) for the Bollinger Band calculations?
This is what I see when pulling the numbers for ETH earlier:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
That's helpful! Thank you
It looks like the quote retrieved by
get_latest_crypto_quote()
returns Open, High, and Low prices based from the entire day, whereas the historical numbers you are rbinding to are specific to the interval specified (e.g. 5min) - is that intentional? Wouldn't you want the latest quote with OHLC from the same interval (previous 5 min) for the Bollinger Band calculations?This is what I see when pulling the numbers for
ETH
earlier: