Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 05:18:32 +0000



Is There A Faster Way to Enter Custom Study Data Inputs

View Count: 2699

[2017-11-26 18:56:39]
lhealey - Posts: 5
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 - 464 views
[2017-11-27 15:21:04]
ertrader - Posts: 644
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: 644
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: 104368
1. Refer to this section here for alternative:
Chart Studies: Changing Study Inputs Directly from Chart

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. 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
[2017-11-27 23:38:02]
lhealey - Posts: 5
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: 104368
You can change the symbol programmatically using this ACSIL variable:
ACSIL Interface Members - Variables and Arrays: sc.DataFile

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. 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
[2021-08-02 12:19:38]
User275592 - Posts: 97
hi,

thank you for posting question and answers ! I was looking for something like this

you mentionned in Chart Studies: Changing Study Inputs Directly from Chart that This feature is primarily meant as an interface for an external program to modify study Inputs.

could you tell me how an external program can modify study inputs using this way ?

thank you for your help
[2021-08-02 15:50:45]
John - SC Support - Posts: 31098
You would create a program that you run that simulates the key presses as if you actually typed them on the keyboard.

As an example for C++ on Windows refer to the following:
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput?redirectedfrom=MSDN
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-08-02 16:40:55]
User275592 - Posts: 97
SierraChart = Great platform + Great Community + Great support !
[2021-08-03 09:16:37]
User275592 - Posts: 97
hi, is it possible to generate the string as a typed one when pressing a combination of keyboard keys via sierrachart parameter (like shortcut or something else ?)

thank you for your help
[2021-08-03 14:45:55]
John - SC Support - Posts: 31098
No, this is not built into Sierra Chart.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2021-08-06 08:15:09]
User275592 - Posts: 97
Hi,

i am testing the great functionality of typing directly an input value for a study (espacially Market Depth Historical)
I works great for changing values including Percent Color Thresholds, which is one of my goals
I can change the "use percent or actual values" input, but only from "Actual Values" to "Percent"
It seems that the problem is the space in a string for an input : no space = ok space=ko

is it possible to change the list of values for this study (via acsil) ? if not, can you support strings with space or add "ActualValues" to the list or make possible to type rank of item in the list (like @1 for first value (Percent) and @2 for Actual Value ?

thank you very much
[2021-08-06 08:28:21]
User907968 - Posts: 802
Values in dropdown are zero indexed, so to in the case of MDHG input "use percent or actual values", use:
- Percent: IN33=0
- Actual Values: IN33=1
[2021-08-06 08:33:56]
User275592 - Posts: 97
thank you very much user907968 ! it works great ! are you using an external program to send input values to a study ?

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

Login

Login Page - Create Account