Make up your own function and pass a function pointer. You know what to do, right? Just do what the manual says the functions do.

Also, your BrokerHistory2 call is wrong. You don't even know how much memory you need - you need to call GET_MAXTICKS, and then call malloc.

~~~~ IN GENERAL~~~~
Any time that the plugin outputs memory (such as T6 ticks or strings), the caller is responsible for supplying the memory. You have supplied memory zero times. Fix this.

If you're not sure whether or not it's an output, read the manual.

Last edited by AndrewAMD; 11/21/19 15:00.