Author: Alex_Analytic
Creation Date: 9/30/2008 4:50 PM
profile picture


What should I use instead of GetIntraDayBar( Bar, 15 ) function in WL 5?
profile picture


An equivalent function does not exist for that method (although you could create one if you like). In Version 5 simply RestoreScale and Synchronize, which equivalent to RestorePrimarySeries and IntradayFromCompressed. In this way you can reference the synchronized series on a bar-by-bar basis.

See the Time Frame category of functions in the QuickRef and their examples.
profile picture


Sorry, but not clear for me. Could you please provide an example how could I get number of bar in highest timeframe from intraday bar on arbitrary iteration of main cycle.

// Get daily bars
int CurrentIntradayBar = 0;

Bars TFBar = Bars;
TFBar = Synchronize( TFBar );
for(int bar = 20; bar < Bars.Count; bar++)
CurrentIntradayBar = TFBar.IntradayBarNumber(bar)

Is it correct?
profile picture


Good try, but no, the IntradayBarNumber method gives you the bar number from the start of each day.

I can't really think of a practical advantage of doing the following (maybe you can tell me what it is), but here it is - the example loads a series called GetIntradayBar with the compressed bar numbers, and these are annotated on each bar along with the value of a compressed series.

Please log in to see this code.

(Updated method to initialize a DataSeries.)
profile picture


Thank you, Cone. It's work.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).