Therefore I would expext to access data of the ExtMacdBuffer und ExtSignalBuffer as follows.
double MACDLine(constint index) const { return(m_MACD.GetData(0, index)); }
double MACDSignal(constint index) const { return(m_MACD.GetData(1,index)); }
...
//--- For operation with ticks idx=0, for operation with formed bars idx=1int idx=StartIndex();
//--- Values of MAs at the last formed bardouble last_MACD_value=MACDLine(idx);
double last_MACDSignal_value=MACDSignal(idx);
But access works only for the first Buffer (ExtMacdBuffer) while any attempt to access the second Buffer (ExtSignalBuffer) throws a "CIndicator::GetData: invalid buffer" error.
Hi,
Im working on my frist Expert , based in the CExpertSignal.
Im trying to access data from the MACD Indocator, that is located in "Examples\\MACD.ex5".
The OnInit() method of MACD.mq5 in "Indicators\\Examples" says:
Therefore I would expext to access data of the ExtMacdBuffer und ExtSignalBuffer as follows.
But access works only for the first Buffer (ExtMacdBuffer) while any attempt to access the second Buffer (ExtSignalBuffer) throws a "CIndicator::GetData: invalid buffer" error.
Any suggestions?
Thanks, Peter