Support Board
Date/Time: Sat, 21 Dec 2024 14:43:27 +0000
Post From: sc.GetStudyArrayUsingID question
[2014-11-15 22:17:23] |
test99 - Posts: 26 |
I have overlayed a study from another chart with different time frame using Study/Price Overlay unsynchronized. Overlayed study data displayed correctly. Then I was pulling data from overlayed study using sc.GetStudyArrayUsingID function with low_prec_level set using sc.Index. When transitioning from prev to new bar on main chart (sc.Index) I noticed that during the time of the transition I pull one bar prior data from ovelayed chart. It happens once on every main chart new bar. It seems sc.Index loses indexing of overlayed chart data momentarily. sc.GetStudyArrayUsingID(BidvsAskChartStudyInput49mins.GetStudyID(),BidvsAskChartStudyInput49minsSubgraph.GetSubgraphIndex(),BidvsAskArray49mins); SCString Buffer99; Buffer99.Format("PrevBar = %4.4f and ThisBar = %4.4f", BidvsAskArray49mins[sc.Index-1], BidvsAskArray49mins[sc.Index]); sc.AddMessageToLog(Buffer99, 1); Please advise if that is a bug or I have to use other methods of pulling data from other time frames and not loosing correct indexing. Thank you |