Login Page - Create Account

Support Board


Date/Time: Wed, 17 Sep 2025 06:05:00 +0000



Post From: Getting data from other timeframe chart when Bar is Closed

[2022-11-10 19:45:41]
kam2001 - Posts: 87
Hi, I am using the the code below to get data from other chart (e.g 20 range bar chart), is it possible to get the last price data only when the bar is closed in other time frame chart ?

// The following code is for getting the High array
// and corresponding index from another chart.

// Define a graph data object to get all of the base graph data
SCGraphData BaseGraphData;

// Get the base graph data from the specified chart
sc.GetChartBaseData(ChartNumber.GetInt(), BaseGraphData);

// Define a reference to the High array
SCFloatArrayRef HighArray = BaseGraphData[SC_HIGH];

// Array is empty. Nothing to do.
if(HighArray.GetArraySize() == 0)

return;