Vector and Matix are for use only in Python? or can be used in MQL Programs too?

 

I am trying to use vectors in strategy class. However in one code it works without any error while in other it gives error.

Any clues what is wrong?


vector vctHigh;         vctHigh.CopyRates(mSymbol,PERIOD_M1,COPY_RATES_HIGH,begin,end);
vector vctLow;          vctLow.CopyRates(mSymbol,PERIOD_M1,COPY_RATES_LOW,begin,end);

get Highest and Lowest price values for the [i][j]th session
mVPSession[0][LON].ohlc.high = vctHigh.Max();
mVPSession[0][LON].ohlc.low  = vctLow.Min();

No errors or no warning messages 
vector   vctHigh;
vctHigh.CopyRates(mSymbol,mTFM15,COPY_RATES_HIGH,CPRFloorNYC[j].tBegin,CPRFloorNYC[j].tEnd);

HighestM15 = vctHigh.Max();
if(cRevBarsM15.WickRevSHORT(k) && HighestM15 > RatesM15[k].high) {
...
}

Errors

'Max' - parameter passed as reference, variable expected        BreakOut.mqh    416     24
   void SExtremum::operator=(const SExtremum&)  		EnumStructure.mqh       305     10
'operator=' - object required   				BreakOut.mqh    416     14
'HighestM15' - objects are passed by reference only     	BreakOut.mqh    420     113
'>' - illegal operation use     				BreakOut.mqh    421     48
4 errors, 0 warnings            5       1
 

Please stop posting coding topic on this section which is about Trading Systems (not coding).

I will move the topic. Thanks.