iCustom 1st time error

 

Hi there !

I am trying to add iCustom to my EA @ OnInit() part.

I have realized that he problem is @ the iCustom definition.

Here is the code ...

   if(tipo_de_indicador==YTRD_INDITYPE_JMA)
     {
      iJMA_fast_handle=iCustom(my_symbol,my_timeframe,"JMA",7,100,PRICE_CLOSE,0,0);
      iJMA_slow_handle=iCustom(my_symbol,my_timeframe,"JMA",9,100,PRICE_CLOSE,0,0);

      if(iJMA_fast_handle==INVALID_HANDLE)
        {
         Print("Failed to get the indicator iJMA_fast_handle");
         return(-1);
        }

      if(iJMA_slow_handle==INVALID_HANDLE)
        {
         Print("Failed to get the indicator iJMA_slow_handle");
         return(-1);
        }

      ChartIndicatorAdd(ChartID(),0,iJMA_fast_handle);
      ChartIndicatorAdd(ChartID(),0,iJMA_slow_handle);

      ArraySetAsSeries(iJMA_buf_fast,true);
      ArraySetAsSeries(iJMA_buf_slow,true);
     }
   else
     {
      return(INIT_PARAMETERS_INCORRECT);
     }

 Here us the JMA definition ...

enum Applied_price_      //Type of constant
  {
   PRICE_CLOSE_ = 1,     //PRICE_CLOSE
   PRICE_OPEN_,          //PRICE_OPEN
   PRICE_HIGH_,          //PRICE_HIGH
   PRICE_LOW_,           //PRICE_LOW
   PRICE_MEDIAN_,        //PRICE_MEDIAN
   PRICE_TYPICAL_,       //PRICE_TYPICAL
   PRICE_WEIGHTED_,      //PRICE_WEIGHTED
   PRICE_SIMPL_,         //PRICE_SIMPL_
   PRICE_QUARTER_,       //PRICE_QUARTER_
   PRICE_TRENDFOLLOW0_,  //PRICE_TRENDFOLLOW0_
   PRICE_TRENDFOLLOW1_   //PRICE_TRENDFOLLOW1_
  };
input int JMALength_=7;  //Depth of smoothing                   
input int JMAPhase_=100; //Smoothing parameter
                         //that changes within the range -100 ... +100,
                         //impacts the transitional process quality;
input Applied_price_ IPC=PRICE_CLOSE_;//Price constant
/* used for calculation of the indicator (1-CLOSE, 2-OPEN, 3-HIGH, 4-LOW, 
  5-MEDIAN, 6-TYPICAL, 7-WEIGHTED, 8-SIMPLE, 9-QUARTER, 10-TRENDFOLLOW, 11-0.5 * TRENDFOLLOW.) */
input int JMAShift=0;      //Horizontal shift of the indicator in bars
input int JMAPriceShift=0; //Vertical shift of the indicator in points

 Please accept my apologies but I really cannot find the issue.

Regards,

MRC 

 
YouTrade:

Hi there !

I am trying to add iCustom to my EA @ OnInit() part.

I have realized that he problem is @ the iCustom definition.

Here is the code ...

 Here us the JMA definition ...

 Please accept my apologies but I really cannot find the issue.

Regards,

MRC 

Which error did you get ? Printing a message like "Failed...." is not enough, you need to print the error code.
 
angevoyageur:
Which error did you get ? Printing a message like "Failed...." is not enough, you need to print the error code.

There is no error code. Just the Initialization failed I posted before that y said to check the On Init() :)

It does not say where and that was the reason I posted this one more specific. 

 
YouTrade:

There is no error code. Just the Initialization failed I posted before that y said to check the On Init() :)

It does not say where and that was the reason I posted this one more specific. 

It doesn't print this message ?

Print("Failed to get the indicator iJMA_fast_handle");

If not you have to post all you OnInit() otherwise I can't help.

 
angevoyageur:

It doesn't print this message ?

If not you have to post all you OnInit() otherwise I can't help.

No ... it does not ... It fails during compilation.

I will get my OnInit() and posi it fo you.

Tks 

 
YouTrade :

No ... it does not ... It fails during compilation.

I will get my OnInit() and posi it fo you.

Tks 

What is the error message in the compiler?
 
Iwori_Fx:
What is the error message in the compiler?

Initialization Failed ... just that ! 

Anyway ... I I have found the problem because the code itseft was easy.

Question Please: Is there any more detailed log in MT5 Client to get more information of just the one @ Journal Tab ? 

 
YouTrade:

Initialization Failed ... just that ! 

Anyway ... I I have found the problem because the code itseft was easy.

Question Please: Is there any more detailed log in MT5 Client to get more information of just the one @ Journal Tab ? 

What was the problem ?
 
angevoyageur:
What was the problem ?
The syntax of iCustom was wrong. I am still working on to figure out how to place an external indicator.
Reason: