Support Board
Date/Time: Wed, 22 Jan 2025 00:11:56 +0000
Post From: study parameter control
[2018-06-27 23:46:06] |
dtl-saw - Posts: 79 |
Just tried the new int and float getter functions for VbP study out in SC version 1771 and it's not working. The function call returns a zero and the resulting reference assignments are zero. In the chart I have a VbP study with ID:1 I'm trying to get the input values in the VbP study ID:1 for start_time=(IN:37) and Number of Bars=(IN:36) I've tried using both 0 and 1 for study ID:1 in case you're using zero base for function calls. I've tried using both 35 and 36 for (IN:36) and both 36 and 37 for (IN:37) again in case you're using zero base for function calls. All combinations print zeros in the message log -> see code included below This seems straight forward so can you verify on your end and see if the functions work for you? Thanks function test code: int vbp_return = 0; double& r_vbp_start_datatime = sc.PersistVars->Doubles[0]; int& r_vbp_numbars = sc.PersistVars->Integers[0]; int study_ID = 1; int numbars_inputIndex = 36; int start_time_inputIndex = 37; // chartnum, studyID, InputIndex, &double vbp_return = sc.GetChartStudyInputFloat(sc.ChartNumber, study_ID, start_time_inputIndex, r_vbp_start_datatime); SCString Buffer; Buffer.Format("VbP start datetime: %6.4f, ret val = %i", r_vbp_start_datatime, vbp_return); sc.AddMessageToLog(Buffer, 0); vbp_return = sc.GetChartStudyInputInt(sc.ChartNumber, study_ID, numbars_inputIndex, r_vbp_numbars); Buffer.Format("VbP num_bars: %6.4f, ret val = %i", r_vbp_numbars, vbp_return); sc.AddMessageToLog(Buffer, 0); Message Log Output: Software version: 1771 64-bit | 2018-06-27 18:39:09 Usage end date: 2018-07-08 | 2018-06-27 18:39:09 Enabled for: Advanced Features. | 2018-06-27 18:39:09 Enabled for: Advanced Features 2. | 2018-06-27 18:39:09 Enabled for: Sierra Chart Historical Data Service. | 2018-06-27 18:39:09 Enabled for: Sierra Chart Real-Time Exchange Data Feed. | 2018-06-27 18:39:09 Enabled for: INDEXES_DATA_BARCHART | 2018-06-27 18:39:09 Enabled for: CME with Market Depth for nonprofessional Trading accounts | 2018-06-27 18:39:09 Enabled for: U.S. Equities (NYSE, NASDAQ, AMEX, BATS) | 2018-06-27 18:39:09 Enabled for: BATS (NYSE, NASDAQ) | 2018-06-27 18:39:09 Received 1 data feed usernames. | 2018-06-27 18:39:09 Allow Support for Sierra Chart Data Feeds is enabled. | 2018-06-27 18:39:09 Current selected Data/Trading service: SC Data - All Services | 2018-06-27 18:39:09 Chart Update Interval: 500 | 2018-06-27 18:39:09 Time Zone: -05:00:00 (CST-06CDT+01,M3.2.0/02:00,M11.1.0/02:00) | 2018-06-27 18:39:09 2018-06-27 18:39:08 Local computer time | 2018-06-27 18:39:09 2018-06-27 23:39:08 Local computer time in UTC | 2018-06-27 18:39:09 2018-06-27 18:39:08 Local computer time in SC Time Zone | 2018-06-27 18:39:09 2018-06-27 23:20:46 Server time in UTC | 2018-06-27 18:39:09 Local computer UTC time and Server UTC time difference: 1 seconds. | 2018-06-27 18:39:09 OS Version Number: 6.1 | 2018-06-27 18:39:09 Locale Setting: C | 2018-06-27 18:39:09 ESU18 [C] 15 Min #2 | Reloading chart. | 2018-06-27 18:39:22 Chart: ESU18 [C] 15 Min #2 | Study: Trade Plan2 | VbP start datetime: 0.0000, ret val = 0 | 2018-06-27 18:39:24 Chart: ESU18 [C] 15 Min #2 | Study: Trade Plan2 | VbP num_bars: 0.0000, ret val = 0 | 2018-06-27 18:39:24 Chart: ESU18 [C] 15 Min #2 | Study: Trade Plan2 | VbP start datetime: 0.0000, ret val = 0 | 2018-06-27 18:39:24 Chart: ESU18 [C] 15 Min #2 | Study: Trade Plan2 | VbP num_bars: 0.0000, ret val = 0 | 2018-06-27 18:39:24 |