Login Page - Create Account

Support Board


Date/Time: Tue, 24 Dec 2024 03:16:21 +0000



Post From: ACSIL documentation: the sc.Defaults code block

[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