Zorro Plugin [exclusive] -

// Called once when Zorro loads the plugin int PLUGIN_INIT(void) // Initialize resources, load ML models, etc. return 0; // 0 = success, non-zero = error

Compile (MinGW):

double PLUGIN_CALL(char* name, double* params, int nParams) if(strcmp(name, "sentiment") == 0 && nParams >= 1) // params[0] is a pointer to a string? Actually passed as double hack. // Better: pass ticker as string via a separate function. return get_sentiment((char*)(int)params[0]); // unsafe but illustrative zorro plugin

// Called before Zorro unloads the plugin int PLUGIN_EXIT(void) // Free memory, close handles return 0;

Zorro Plugin: Architecture, Implementation, and Application in Algorithmic Trading Systems // Called once when Zorro loads the plugin

We tested three configurations on a 3.4 GHz Intel i7, 16GB RAM, Windows 10:

plugin("myplugin.dll"); print(plugin_call("add", 5, 3)); // prints 8.000000 // Better: pass ticker as string via a separate function

int PLUGIN_INIT(void) curl_global_init(CURL_GLOBAL_DEFAULT); curl = curl_easy_init(); model = load_model("sentiment.onnx"); return (curl && model) ? 0 : 1;