Support Board
Date/Time: Wed, 25 Jun 2025 22:26:04 +0000
Post From: can't get data using sc.GetStudyProfileInformation,sc.GetNumStudyProfiles,need help
[2021-12-15 15:03:52] |
User978306 - Posts: 4 |
sample code #include "C:\SierraChart\ACS_Source\sierrachart.h"
SCDLLName("VbP DLL") SCSFExport scsf_trying_to_get_multiple_profiles(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { sc.GraphName = "multiple profiles getting attempt"; sc.GraphRegion = 0; sc.AutoLoop = 0; sc.MaintainVolumeAtPriceData = 1; return; } //Tried to get VbP study ID by full name('VbP - 1Days') failed, so short name // assigned, this works.. std::int32_t vbp_study_id = sc.GetStudyIDByName(sc.ChartNumber, "vbp", 1); //returns correct StudyID, ok. std::int32_t vbp_count = sc.GetNumStudyProfiles(vbp_study_id); //sc.GetNumStudyProfiles always returns zero.. std::int32_t profile_index = 0; //Getting the latest profile attemption n_ACSIL::s_StudyProfileInformation profile_info; std::int32_t result = sc.GetStudyProfileInformation(vbp_study_id, profile_index, profile_info); //Have an empty profile_info struct instance, nothing filled. //Return value of sc.GetStudyProfileInformation calls is always zero. } On my chart everything looks as as expected, what I have missed, help please. |