Data Plugin: How to define `LPARAM RecentInfo` for reading ASCII?

I have to write a data plug-in to read intraday prices from files exactly as per the ASCII example from the ADK. I use a separate Python application to apply price filtering and construct the data files.

My situation is very similar to https://forum.amibroker.com/t/disable-or-programmatically-flush-in-memory-cache/3077. In that post, Tomasz explained that the last LPARAM argument is "RecentInfo struct documented in ADK".

MY QUESTIONS
(1) Can I put LPARAM RecentInfo as zero 0? If yes, then things are much simpler.
(2) If the answer to (1) is 'no', what should I put under nStructSize?

ADDITIONAL REQUEST
I know this is not a Python forum, but if anyone has experience using Python's win32api.SendMessage() to send the WM_USER_STREAMING_UPDATE to Amibroker, please share your experience.

One problem that I'm still googling is how to mark the nBitmap field. According to the ADK html: "To mark which fields are valid you should store combination of RI_*** bit flags defined in Plugin.h into nBitmap field.". How should I do that in Python?

I've spent the last many hours googling and reading the ADK html & sample code; yet there's still a big gap in knowledge. I develop in Linux + Python and have almost no experience in Windows messaging nor C++. Unfortunately, I have to do this as it is critical to my project.

Thanks!

1 Like

You can't write data plugins in Python (interpreted language). You need a language that compiles to native machine code - C/C++ is recommended. If you don't have C/C++ experience (and your question about struct size says so), it is recommended to hire programmer because things like these are absolute basics. As to the question - you can find it yourself in supplied examples - use "find in files" for nStructSize. And sure you can pass zero but features like Time&Sales and RT quote window won't work without that.

1 Like

Hi, Tom. I was wondering could you referred me to recommended reading or some sort of material guarding development of a data plug in in c++/c# ? I'm having a hard time locating this type of documentation and instructions.

Thanks for your reply, Tomasz.

I won't need Time&Sales nor RT quote window for my use-case, so I'll pass zero into the RecentInfo struct.

No, I am not thinking of writing the DLL in Python. For that, I plan to use VC++.

My Python app is the one doing the data cleaning and when done, it sends the WM_USER_STREAMING_UPDATE message to AmiBroker for AB to import the data.

I'll consider that, thanks.