Help I Can retrieve ADX Main value but cannot get to the Di+ & DI -

 

I am able to get to ADX main value ie

double ADXDefinition[]

int ADXDefinition= iADX(_Symbol, _Period, 14);

works perfectly..


But cannot seam to find the syntax to access the Di+ and Di- values have tried this

double DiPDefinition[]

int DiPDefinition = iADX(_Symbol,_Period,14,PRICE_CLOSE,MODE_PLUSDI,0);

and get two  errors :-

1iADX wrong Parameter count and ?

MODE_PLUSDI undeclared identifier ?

 

Solved the problem !!

it had to do with the copy Buffer 0, Main, 1 +di, and 2 -Di

 CopyBuffer (DiPDefinition,1,0,3,myMAArray1);

 
As the example shows
// The buffer numbers are the following: 0 - MAIN_LINE, 1 - PLUSDI_LINE, 2 - MINUSDI_LINE

  if(CopyBuffer(ind_handle,0,0,amount,adx_values)<0) ...
  if(CopyBuffer(ind_handle,1,0,amount,DIplus_values)<0) ...
  if(CopyBuffer(ind_handle,2,0,amount,DIminus_values)<0) ...
Technical Indicators / iADX - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: