Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 23:32:49 +0000



Post From: Sierra Chart Shared Variables

[2018-03-01 23:49:06]
JoseyWales - Posts: 67
The static struct is instantiated (created in memory) when Sierra Chart loads your custom dll which happens if you click the Add Custom Study button on the Chart Studies dialog for the first time, or you load a chartbook that uses a study in the same dll. The struct has a lifetime until Sierra Chart unloads the dll when you close Sierra Chart.

Therefore it will work across chartbooks, but it will not have the same shared data with a different instance of Sierra Chart running because that would be in a different part of memory. You'd have to write/read data to a file or look into the concept of Named Pipes or even sockets if you wanted cross instance shared memory.

Keep in mind that all these methods do not store the data to disk, you can use sc.StorageBlock if you need to for that:
ACSIL Interface Members - Variables and Arrays: sc.StorageBlock