Login Page - Create Account

Support Board


Date/Time: Wed, 17 Oct 2018 15:16:52 +0000



Is There A Faster Way to Enter Custom Study Data Inputs

Support Request:
[2017-11-26 18:56:39]
lhealey - Posts: 3
I need a faster way to enter data inputs into the Study data window.

Every trading day, I crunch over 100 symbols worth of chart data and I use a custom ACSIL study that requires 7-10 unique and custom data inputs.

In addition, most of these symbols change monthly.

So I have an enormous amount of data input that I have to manually enter.

Question 1:   Ca you provide a tab control, for the Study Settings Input Value Window?
Currently, I have to manually move the cursor (by mouse) from one data input to the next, 10 times per chart. This is exceedingly time consuming. It would be so much quicker to just tab from input to input. I would pay for this feature to be developed.

Question 2:  Even better!!! Is there any way to load symbols and inputs from a spreadsheet or text file and allow SC to build the chart utilizing the symbols and data from each line in the file?

Question 3:  Is there any way to have a Chart Update Interval that is longer 90,000 milliseconds or a minute and a half?  
I really need an update in the vicinity of 5 - 10 minutes.

SC is a fantastic value and very powerful and flexible. I've been using it for almost a year now and have found it to be an excellent tool for my trading style. Thanks for developing such a loaded program at such a great price!
imagestudy_data_inputs_window.PNG / V - Attached On 2017-11-26 18:56:12 UTC - Size: 40.36 KB - 79 views
[2017-11-27 15:21:04]
ertrader - Posts: 160
For question 2 above, I've had the requirement too so I coded it using std::ifstream reading a text file. This is documented in C++ http://www.cplusplus.com/reference/fstream/ifstream/open/

There may be a better way but using global variables (variables before the SCDLLName call) worked. Then, within your normal code, setting your study variable equal the global variables. Worked like a charm for me!

float ReadTradeSignalParams(SCStudyInterfaceRef sc)
{
  std::ifstream input("tradesignalparameters11.txt");
  int LineNum, p, q, r, s, t, u;
  while (!input.eof())
  {
    input >> LineNum >> p >> q >> r >> s >> t >> u;
    if (LineNum == g_ControlLine) break;
  }

// set the global variables to local variable values that come from the text file
// Then, in your main code, reference the global variables for study inputs
// In your main code, you will need to have some type of counter or trigger so that you do not
// continually call this file read function.
// the variables below with a g_ are my global variables
// the g_ControlLine above was just a parameter value I look for in the input file to
// stop reading values in the text file. I have several hundred and sometimes thousands of rows to read in depending on the tests I am running

  g_Input1 = p;
  g_Input2 = q;  
  g_Input3 = r;  
  g_Input4 = s;
  g_Input5 = t;  
  g_Input6 = u;  
  
  return(0);    
}
Date Time Of Last Edit: 2017-11-27 15:44:20
[2017-11-27 15:39:56]
ertrader - Posts: 160
Below are other function calls I had to create to ensure I had control over when processing began and ended. I used text files and the values within them.

int ControlFile(SCStudyInterfaceRef sc)
{
  std::ifstream input("controlfile.txt");
  // set the global variable control line to indicate when to stop reading  
  input >> g_ControlLine;
  return(0);    
}
float WriteFile(SCStudyInterfaceRef sc)
{
  std::ofstream output;
  output.open ("writefile.txt", std::ofstream::out | std::ofstream::app);

  // insert into the file and add spaces between variables
  output << g_ControlLine << " " << g_ProfitFactor << " " << g_TotalPercentProfitable << " " << g_MaximumDrawdown << " " << g_MaximumTradeRunup <<" " << g_TotalTrades << " " << g_TotalLongTrades << " " << g_TotalShortTrades << "\n";
  output.close();
  return(0);    
}
int ProcessingFile(SCStudyInterfaceRef sc)
{
  std::ofstream output;
  output.open ("processing.txt", std::ofstream::out | std::ofstream::ate);

  // insert into the file and add spaces between variables
  output << g_Processing;
  output.close();
  return(0);  
}

int StartProcessing(SCStudyInterfaceRef sc)
{
  // enable or disable processing. 0 = disable, 1 = enable. Used to control when initially loading the study
  std::ifstream input("startprocessing.txt");
  input >> g_StartProcessing;
  return(0);  
}
[2017-11-27 20:23:51]
Sierra Chart Engineering - Posts: 64895
1. Refer to this section here for alternative:
https://www.sierrachart.com/index.php?page=doc/ChartStudies.html#ChangingStudyInputsDirectlyFromChart

2. This is something you can do just with ACSIL. Just read the Inputs from your own text file.

3. Up to 10 minutes will be supported in the next release.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-11-27 23:38:02]
lhealey - Posts: 3
Wow! What a great community SC has. Thanks for the rapid response from erTrader and SC engineering.

As we used to say, "You guys Rock"!

One last question...

How do I change the Chart Symbol from the same file as the inputs.

I've looked at sc.DataFile but can't figure out where/how to use it or even if this is the best approach.
[2017-11-28 03:10:36]
Sierra Chart Engineering - Posts: 64895
You can change the symbol programmatically using this ACSIL variable:
https://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Variables_And_Arrays.html#scDataFile

This is the same one you mentioned. This is the proper way.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.

To post a message in this thread, you need to login with your Sierra Chart account:

Login


Login Page - Create Account