akapur / pyiqfeed

Python LIbrary for reading DTN's IQFeed
GNU General Public License v2.0
172 stars 109 forks source link

Order of the price data is incorrect in get_historical_bar_data #66

Open richy1996 opened 8 months ago

richy1996 commented 8 months ago

Seems the order of the prices in get_historical_bar_data is incorrect. should be date, time, HLOC, ... but the results are coming back as .. OHLC.. or something else. either way the high is not the first price that is displaying.

To recreate i'm simply running python example.py -b

richy1996 commented 8 months ago

seems the order of these lines in conn.py is the issue data[line_num]["high_p"] = np.float64(dl[3]) # 2 old data[line_num]["low_p"] = np.float64(dl[4]) # 3 old data[line_num]["open_p"] = np.float64(dl[2]) # 4 old data[line_num]["close_p"] = np.float64(dl[5]) data[line_num]["tot_vlm"] = np.int64(dl[6]) data[line_num]["prd_vlm"] = np.int64(dl[7]) data[line_num]["num_trds"] = np.int64(dl[8])

on lines 2279-2285

akapur commented 8 months ago

Please send a pull request.

On Thu, Jan 11, 2024 at 5:20 PM Richard Harrison @.***> wrote:

seems the order of these lines in conn.py is the issue data[line_num]["high_p"] = np.float64(dl[3]) # 2 old data[line_num]["low_p"] = np.float64(dl[4]) # 3 old data[line_num]["open_p"] = np.float64(dl[2]) # 4 old data[line_num]["close_p"] = np.float64(dl[5]) data[line_num]["tot_vlm"] = np.int64(dl[6]) data[line_num]["prd_vlm"] = np.int64(dl[7]) data[line_num]["num_trds"] = np.int64(dl[8])

on lines 2279-2285

— Reply to this email directly, view it on GitHub https://github.com/akapur/pyiqfeed/issues/66#issuecomment-1888060951, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGJAVBU7IHR37BCANBY7SDYOBQS5AVCNFSM6AAAAABBXGGX3CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBYGA3DAOJVGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>