Is there a vector can be set AsSeries? Seems vectors dont follow timeseries settings.
Can vector/matrix be used to get Highest/Lowest bar which matches with the chart bars sequence or I am trying to achieve something which is not possible?
Regards.
1. First of all, you code is buggy and could lead to different max (HH) for both method. Why are you subtracting 1 to iBegin ?
Should be :
int iBegin = iBarShift(_Symbol,_Period,tBegin); int iMax = iHighest(_Symbol,_Period,MODE_HIGH,iBegin+1,0);
2. Even if you could set a vector "AsSeries", it would not necessarily give you the same index ("chart bar sequence" as you said), because it depends of the starting index. (in your use case it would work because you used data from current candle, indexed AS 0, see point 3).
3. Provided the starting AS index of your data is 0, it's trivial to get the AS index from a vector index.
int vIndexHH = high.ArgMax(); int vASIndexHH = high.Size()-vIndexHH-1;
First of all, you code is buggy and could lead to different max (HH) for both method. Why are you subtracting 1 to iBegin ?
Hi Alain
I need to have adjustment for XAUUSD Symbol which opens at 01:01 hrs instead of normal 00:00 hrs for Forex. If not subtract than it calculate 23:00 Hrs bar (H1) of previous day as Begin bar. Your suggestion (iBegin+1) makes sense ... thanks for it.
Point 2: my objective is to get idx of highest bar from previous completed bar[1] to first bar of the day. Current bar[0] I dont want to include.
Point 3: I will test it
any comments which method is better in terms of CPU performance?
THANKS A LOT and regards.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Is there a vector can be set AsSeries? Seems vectors dont follow timeseries settings.
Can vector/matrix be used to get Highest/Lowest bar which matches with the chart bars sequence or I am trying to achieve something which is not possible?
Regards.