Support Board
Date/Time: Mon, 27 Oct 2025 12:22:30 +0000
Post From: [ACSIL] Dynamically set sc.DataFile based on sc.DataTradeServiceName()
| [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! |
