Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 00:09:56 +0000



Call to sc.ApplyStudyCollection() always tries to add extension to provided filename

View Count: 445

[2019-11-27 20:57:34]
User972768 - Posts: 166
Hello,

I'm using sc.ApplyStudyCollection() in my study and it seems that there are 2 issues with this call:

1) regardless of provided file name, it always tries to add extension. Here is a snippet of sample code and record from the Message Log


study_collection = "MovingAverageCrossover.StdyCollct";
status = sc.ApplyStudyCollection(chart_id, study_collection, 1);


Error opening study collection file: C:\SierraChart_T0\Data\MovingAverageCrossover.StdyCollct.StdyCollct. Windows error code 2: The system cannot find the file specified. | 2019-11-27 15:18:49.533 *

This code works fine if I remove extension from the filename like:


study_collection = "MovingAverageCrossover";
status = sc.ApplyStudyCollection(chart_id, study_collection, 1);

2) It is just my assumption, that call to sc.ApplyStudyCollection() should return status if study collection has been applied successfully. Otherwise I would expect it to be void instead of int. If my assumption is correct, then there is a little issue of function always returning 1 regardless of actual result.

Because of the 1st issue, inputs calls like SetPathAndFileName() can't be used as expected.

Just for the reference, I'm on v2015.

Thanks and Best regards
Date Time Of Last Edit: 2019-11-27 21:00:48

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

Login

Login Page - Create Account