What should I use instead of GetIntraDayBar( Bar, 15 ) function in WL 5?
Size:
Color:
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.
Size:
Color:
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;
SetScaleCompressed(15);
Bars TFBar = Bars;
RestoreScale();
TFBar = Synchronize( TFBar );
for(int bar = 20; bar < Bars.Count; bar++)
{
CurrentIntradayBar = TFBar.IntradayBarNumber(bar)
}
Is it correct?
Size:
Color:
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.
CODE:
Please log in to see this code.
(Updated method to initialize a DataSeries.)
Size:
Color:
Thank you, Cone. It's work.
Size:
Color: