ANY HELP ME WITH MY EA - PROBLEM WITH THE HANDLE

 

Please can some people help me.


I have created an EA, but I have problem with follow:

My EA occuppies two indicator (MA and CCI)

CCi_Period = 14

MA_Period = 50

In Orther parameters I have created it (handle)

int  cciHandle;

int  maHandle;


After in:

int OnInit()

//--- Get handle for CCI indicator

cciHandle=iCCI(NULL,0,CCi_Period,PRICE_CLOSE);


But When I compile, send me as following problem

'cciHandle' - some operator is expected    estrategia_ma_cci.mq5    36    4


'=' - semicolon is expected    estrategia_ma_cci.mq5    36    13


'=' - unexpected token    estrategia_ma_cci.mq5    36    13



PLEASE NEED HELP WITH MY EA


Marcos / Santiago/Chile

 
tebrich1:

Please can some people help me.

I have created an EA, but I have problem with follow:

My EA occuppies two indicator (MA and CCI)

CCi_Period = 14

MA_Period = 50

In Orther parameters I have created it (handle)

int  cciHandle;

int  maHandle;

After in:

int OnInit()

//--- Get handle for CCI indicator

cciHandle=iCCI(NULL,0,CCi_Period,PRICE_CLOSE);

But When I compile, send me as following problem

'cciHandle' - some operator is expected    estrategia_ma_cci.mq5    36    4


'=' - semicolon is expected    estrategia_ma_cci.mq5    36    13


'=' - unexpected token    estrategia_ma_cci.mq5    36    13

PLEASE NEED HELP WITH MY EA

Marcos / Santiago/Chile

 

It would help a lot if you use the SRC button in the editor like I did below.  Your code is missing a {  ....  } code block

int OnInit()
{
//--- Get handle for CCI indicator
cciHandle=iCCI(NULL,0,CCi_Period,PRICE_CLOSE);

// etc ....

}

 

 

 

Reason: