Login Page - Create Account

Support Board


Date/Time: Mon, 27 Oct 2025 10:13:14 +0000



[Programming Help] - [ACSIL] Dynamically set sc.DataFile based on sc.DataTradeServiceName()

View Count: 191

[2025-10-09 09:48:30]
PS2004 - Posts: 48
Hello!

I am looking for a way to universally set the sc.DataFile variable no matter what Data Feed I am connected to.

For example:
- my sc.SCDataFeedSymbol() is set to "MNQ?##"
- my Currently Selected Service (File >> Data/Trade Service Settings) is "Teton CME Routing"

To change the Symbol of the Chart my Custom Study is applied to, I have to set the sc.DataFile variable to be "MNQZ25_FUT_CME.scid".

But if I later change the Currently Selected Service to let's say "SC Data", then this code won't work anymore, because the format of the Selected Service is "MNQZ25-CME", so the sc.DataFile variable should be set to "MNQZ25-CME.scid".

Is there a built in way to do this automatically, for example:

sc.SetDataFileDynamically(const char* dataFeedSymbol), which can get the sc.SCDataFeedSymbol() as parameter and set the Symbol dynamically?

Or do I have to build a custom dictionary for each Data Feed that I want to support?

Thank you in advance!

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account