Accessing different buffers for same custom indicator - page 2

 
Marco Strazzeri:

Hmm i have wide experience in MT4, like on MT4 i can see in the navigator window the various buffers of both indicators. Plus this, the problem is seen in both indicators, murrey and atr channel

Not having any issue at all

Code used for test :

input int murray_period   = 64;
input int murray_stepback =  0;

int _mmHandle=INVALID_HANDLE;
int OnInit()
{
   _mmHandle=iCustom(_Symbol,_Period,"murrey_math_mt5",murray_period,murray_stepback);
   return(INIT_SUCCEEDED);
} 
void OnTick()
{
   for (int i=0; i<13; i++) atrAt(i);
}

double atrAt(int index)
{
   double vals[];
      int valsCopied =CopyBuffer(_mmHandle,index,0,10,vals);
      if (valsCopied==10)
      {
         for(int i=0;i<10;i++) Print((string)index+" vals "+(string)i+": "+(string)vals[i]);
      }         
      return vals[0]; 
}
 
Thank you Maiden, i've tried your code and got the solution
 
Marco Strazzeri:

Hmm i have wide experience in MT4, like on MT4 i can see in the navigator window the various buffers of both indicators. Plus this, the problem is seen in both indicators, murrey and atr channel

pls am a fresher, hw do I start
 
temidayo123:
pls am a fresher, hw do I start

1. Suggestions on learning MQL
https://www.mql5.com/en/forum/224425

2. MQL5.community - User Memo 

3. Where Do I start from?
https://www.mql5.com/en/forum/212020 
MetaTrader 4 Help - Client Terminal – User Guide  
MetaTrader 5 Help - Trading Platform — User Manual

4. How to make a search on the forum
https://www.mql5.com/en/forum/193510

Suggestions on learning MQL
Suggestions on learning MQL
  • 2018.01.11
  • www.mql5.com
Hello fellow coders/traders...