Login Page - Create Account

Support Board

Date/Time: Tue, 24 May 2022 05:11:03 +0000

Post From: Can I persist a custom object?

[2013-05-28 21:59:56]
drmrboyc - Posts: 7

I've built a custom class, which is implemented in a separate .h & .cpp file included in my Custom DLL project. In my main cpp file, I instantiate the object after the SCDLLName("DLLName") function call, but before the scsf_MainFunction().

I'm using the syntax:

Object myObject;

Then inside scsf_MainFunction()-sc.SetDefaults code block, I initialize the object with a call:

myObject.InitializeObject("Custom Params");

The object takes the "Custom Params" string and stores it for later use, however, when I attempt to access that information during a later call, it is gone!

I believe this is related to object persistence between bars, but I could be doing something else wrong and just not see it.

Is there any particular method I can use to persist my object between bars?

Thank you!