I’m going to get started in developing a simple data plug-in for myself.
I’m nearing the end of a course in C++ and I’ve read the ADK and understood/retained about 80-90% of it.
The instructor in the course teaches, (amongst other things)pointers, for the purpose of being able to work with code from older projects, but says that passing function by reference (e.g &i) is nowadays used to achieve the same job, and the programmer does not have to be as concerned with allocating and then releasing data on the ‘heap’, and memory leaks.
I notice that in the ADK, the examples mainly use pointers.
Am I able to write my functions passing parameters by reference instead of using pointers and de-referecing,
For the purpose of this project?
Secondly, I don’t understand the manual precisely. I know how to call and listen to Websockets in Python, and I know how to create files from them. I don’t know how valuable it would be to redo that work in C++, if I am able to continuously wrote and overwrote files using my Python scripts (running concurrently)
If I am going to use a file based approach, does the data sit in the file (e.g BTCUSDT.AQI) and continue to fill up (appended) until it is called (e.g by a Notify() call being sent from AmiBroker), an array is sized and memory allocated, data read and then imported into AmiBroker (and can then be safely deleted while a new file is filled up) essentially meaning that the files are a kind of, perhaps a kind of ‘buffer’? Or, is set up so that single line files are created, (is there a way of or is it even desirable calling Notify() here?) and then the AQI file is imported and deleted?
The reason I ask, is that I want to get the file creation side of the project right before I get started. I’d love to hear thoughts.
The third, and perhaps this is a stupid question( in fact I rather suspect it is) I notice that character arrays are used in the sample (e.g char…). There’s no reason that I haven’t noticed, that I couldn’t simply use strings, is there?
Thanks for your wisdoms.