I’m working on a project to receive real-time stock market data using JMP software and need your guidance. JMP supports its scripting language (JSL) and embedded Python execution, which I’d like to leverage. My goal is to capture specific stock data fields from a 32-bit DLL (StockDrv.dll) and store them in a JMP data table. I’ve developed a solution, but I’d greatly appreciate your review and suggestions to ensure it’s robust and efficient.
Background
I have a stock data client installed at I:\DZH\HailiLive\HailiLive.EXE, which provides a 32-bit DLL (I:\DZH\HailiLive\StockDrv.dll). This DLL delivers real-time stock data via Windows messages. The data is structured in a format called RCV_REPORT_STRUCTExV3, sent through a custom message (WM_APP + 1) with a work mode of RCV_WORK_SENDMSG (value 4). The relevant header file (Stockdrv.h) defines the DLL’s interface, including key functions like Stock_Init and Stock_Quit, and the data structure.
I need only the following fields:
Market: Stock market identifier (e.g., 'HS' for Shanghai).
Code: Stock code (e.g., "600050").
Name: Stock name.
Time: Transaction time.
LastClose: Previous closing price.
Open: Opening price.
High: Highest price.
Low: Lowest price.
NewPrice: Latest price.
Volume: Transaction volume.
Amount: Transaction amount.
BuyPrice1 to BuyPrice5: Five levels of bid prices.
BuyVolume1 to BuyVolume5: Five levels of bid volumes.
SellPrice1 to SellPrice5: Five levels of ask prices.
SellVolume1 to SellVolume5: Five levels of ask volumes.