Support Board
Date/Time: Wed, 27 Nov 2024 11:55:57 +0000
[Programming Help] - Opening a symbol on an open chart using ACSIL
View Count: 436
[2023-09-01 15:21:17] |
User584005 - Posts: 27 |
If i have 2 charts side by side chart #1 and chart #2. Is there a way to use ACSIL and send a symbol to chart #2? What im trying to accomplish is say i type in TSLA in chart #1, I want to be able to have chart #2 automatically change to a different symbol such as SPY or QQQQ based on the custom study that is active. I want to do this programmatically across any random symbol I type in chart #1. Hoping this is something simple like having a command for reference chart #2 --> change symbol to SPY |
[2023-09-01 17:00:06] |
ForgivingComputers.com - Posts: 960 |
You can do this with two studies, one on each chart. Chart #1 "publishes" its symbol using persistent integer or string Variables, Chart #2 Gets the persistent variable from chart #1 and acts accordingly.
|
[2023-09-01 18:27:27] |
User584005 - Posts: 27 |
Should this be as simple as writing sc.SetPersistentSCString(1, "SPY.scid"); And then calling it using sc.GetPersistentSCString(1); When I push to the log file the "SPY.scid" doesnt seem to be coming through and I'm just seeing blank text. What am i doing wrong? |
[2023-09-01 19:34:47] |
ForgivingComputers.com - Posts: 960 |
Persistent variables are not global across charts. You need to use something like this: sc.GetPersistentIntFromChartStudy()
But there is no similar function for strings. |
To post a message in this thread, you need to log in with your Sierra Chart account: