Support Board
Date/Time: Tue, 26 Nov 2024 20:15:21 +0000
[Programming Help] - sc.selectedtradeaccount strange behaviour
View Count: 263
[2023-10-18 17:17:06] |
User987654 - Posts: 69 |
If this falls outside of Sierra Support, I understand and please move it to "Submit as programming help". If not, this is the behaviour I am seeing. If I open up 2 sub-instances and I have 2 trading accounts with the same clearing firm and trading the same contract (CL). In the 1st sub-instance if sc.selectedtradeaccount="acct2", then after charts load "Trade Window for Chart" will show the account to be "acct2", which is correct. After this, I go to 2nd sub-instance and load acsil study where sc.selectedtradeaccount="acct1" but after the charts load "Trade Window for Chart" will not show "acct1", instead shows "acct2", which is wrong. In this case, I am setting the sc.selectedtradeaccount in sc.SetDefaults{}. I've tried setting it in if(sc.index==0 && sc.IsFullRecalculation==1){} but when I do this, if the chart the study is on references a study from another chart, it will endlessly reload once I open the "Trade Window for Chart". This method, however, does set the account properly for both instances. Teton routing with denali feed Windows Server 2016 Date Time Of Last Edit: 2023-10-18 17:51:33
|
[2023-10-19 14:16:09] |
Sierra_Chart Engineering - Posts: 17182 |
This does not make sense for the chart to be reloading when opening the Trade Window: I've tried setting it in if(sc.index==0 && sc.IsFullRecalculation==1){} but when I do this, if the chart the study is on references a study from another chart, it will endlessly reload once I open the "Trade Window for Chart".
There is some other reason for this: High CPU Usage | Inactive User Interface | Poor Performance | Long Time to Load Chart Data | Charts Reloading Often: 30.3 - Charts Reloading Often Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
To post a message in this thread, you need to log in with your Sierra Chart account: