Support Board
Date/Time: Mon, 23 Dec 2024 19:52:26 +0000
ACSIL documentation: the sc.Defaults code block
View Count: 1936
[2015-10-19 08:00:10] |
User44052 - Posts: 34 |
I once came across a page in the online documentation which I can no longer find using a search. The page had detailed information about the sc.Defaults code block, with a list of what should go INSIDE this code block and what shouldn't. Can you please help me find that page again? Thanks in advance. |
[2015-10-19 09:12:32] |
Sierra Chart Engineering - Posts: 104368 |
This is the documentation here: https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scSetDefaults 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, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2015-10-19 17:12:38] |
User44052 - Posts: 34 |
Thanks. And sorry, I'd been doing searches for sc.Defaults instead of sc.SetDefaults. My purpose was some sc members used in the TradingSystem.cpp example: sc.AllowMultipleEntriesInSameDirection = false;
Take the sc.SupportReversals member for example. What if I set this member using an sc.Input? For example, my trading study would be running, with sc.SupportReversals set initially as false (using an input field).sc.MaximumPositionAllowed = 10; sc.SupportReversals = false; // This is false by default. Orders will go to the simulation system always. sc.SendOrdersToTradeService = false; During the day, if I change the study input to true, would all subsequent trades start supporting reversals, or do I have to close the chart/chartbook and re-apply the study? Does it matter if at the time I make this change there is an open position already? |
[2015-10-19 18:00:10] |
User44052 - Posts: 34 |
To rephrase the question, which of the two locations below - A or B - is the right place to put a statement that changes whether orders are sent to trade service or a statement that allows reversal: //This is the basic framework of a study function. SCSFExport scsf_SkeletonFunction(SCStudyInterfaceRef sc) { // Section 1 - Set the configuration variables and defaults if (sc.SetDefaults) { sc.GraphName = "Skeleton Function"; sc.Input[1].Name = "Enable Live Trading?"; sc.Input[1].SetYesNo(false); sc.Input[2].Name = "Allow Reversals?"; sc.Input[2].SetYesNo(false); //location A sc.SendOrdersToTradeService = sc.Input[1].GetYesNo(); sc.SupportReversals = sc.Input[2].GetYesNo(); return; } // Section 2 - Do data processing here //location B sc.SendOrdersToTradeService = sc.Input[1].GetYesNo(); sc.SupportReversals = sc.Input[2].GetYesNo(); } Date Time Of Last Edit: 2015-10-19 18:05:03
|
[2015-10-19 18:07:17] |
Sierra Chart Engineering - Posts: 104368 |
All of the variables given in post #3 can be changed at any time outside of sc.SetDefaults
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, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2015-10-19 18:07:48
|
[2015-10-19 18:10:32] |
Sierra Chart Engineering - Posts: 104368 |
The answer to post #4 is location B.
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, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2015-10-19 18:10:54
|
[2015-10-19 18:29:03] |
User44052 - Posts: 34 |
Thanks. Location B does make sense, and I was wondering why they were set INSIDE sc.SetDefaults in the tradingsystem.cpp example.
|
[2015-10-19 18:54:06] |
Sierra Chart Engineering - Posts: 104368 |
They are set inside of sc.SetDefaults code block in the examples for organization purposes because they do not need to change.
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, *change* to 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: