Login Page - Create Account

Support Board


Date/Time: Sat, 11 Jan 2025 04:51:34 +0000



Post From: ASCIL: Reference the last closed bar from other timeframe chart

[2016-10-28 13:50:12]
User129630 - Posts: 22
I am working on a trading system which takes action after a bar is closed from the main chart. I have other timeframe charts which I'd like to reference their last closed bar (for data such as Open, High, Low, Last, Volume, # of Trades, OHLC Avg, HLC Avg, etc ... ). That is, I'd like to work with the closed bar values only from all charts. Currently, I can get the last closed bar data from my main chart, but not the other timeframe charts.

I can get the closest reference index from the other timeframe chart using function like sc.GetNearestMatchForSCDateTime. However, this reference index is not the last closed bar index but the current active index.

Upon closing bar of my main chart, is there a way to get the last closed bar of the other timeframe chart(s)?