Download MetaTrader 5

a little help with EA and indicator please

To add comments, please log in or register
Desmond Wright
720
Desmond Wright  

Hi there

So I have managed to get the buffer values from my indicator into my EA using iCustom() , no problems and all is workinf well.

Im struggling to pass inputs from the EA to the indicator , when the EA starts up.

can someone just point me in the right direction

thanks

whroeder1
15582
whroeder1  
Desmond Wright
720
Desmond Wright  

Thanks buddy

but Im asking about passing parameters to the indicator from the EA , when the EA starts up. iCustom() is working perfectly.

startup:    EA ->inputs -> indicator  . . .

whroeder1
15582
whroeder1  

What part after the symbol, period, indicator name, and before the buffer index and shift number was unclear?

Your iCustom is not "working perfectly" or you wouldn't be asking.

Desmond Wright
720
Desmond Wright  
WHRoeder:

What part after the symbol, period, indicator name, and before the buffer index and shift number was unclear?

Your iCustom is not "working perfectly" or you wouldn't be asking.

Hi there

 iCustom is getting the buffer values from the indicator correctly , so no problems there.

 here is part of the code for the indicator and EA , if I understand correctly , in the EA I define the parameters that get passed to the indicator on startup of the EA.

 I want to pass parameters from the EA to the indicator when the EA starts up.

EA

//+------------------------------------------------------------------+

//|                                                     Rapture3.mq4 |

//|                                                         D Wright |

//+------------------------------------------------------------------+

#property copyright "D Wright"

#property version   "3.00"

#property copyright "D Wright  2016,"

extern double Lotsi=0.01;

extern int delay = 0; 

extern int ChannelPeriod=0;

extern double Risk=0.0;

extern int Nbars=100;

extern int FontSize=20;

 . . . . .  

 double value0 = iCustom(NULL,0,"rap",0,0,0);

   double value1 = iCustom(NULL,0,"rap",0,1,0);

   double value2 = iCustom(NULL,0,"rap",0,2,0);

   double value3 = iCustom(NULL,0,"rap",0,3,0);

   double value4 = iCustom(NULL,0,"rap",0,4,0);

   double value5 = iCustom(NULL,0,"rap",0,5,0);

   double value6 = iCustom(NULL,0,"rap",0,6,0);

------------------------------------------------------------------------------------------------------- 

Indicator 

  //+------------------------------------------------------------------+

//|                                                        MT4 Indicator.mq4 |

//|                                                                                    |

//+------------------------------------------------------------------+

//---- input parameters

extern int ChannelPeriod=0;

extern double Risk=0.0;

int Signal=1;

int Line=1;

extern int Nbars=100;

extern int FontSize=20;

//---- indicator buffers

. . . . . . 

whroeder1
15582
whroeder1  
buju iCustom is getting the buffer values from the indicator correctly , so no problems there.
 double value0 = iCustom(NULL,0,"rap",0,0,0);
No you are not. You are only passing passing one parameter to the indicator and your posted code shows four.
extern int ChannelPeriod=0;
extern double Risk=0.0;
extern int Nbars=100;
extern int FontSize=20;
//---- indicator buffers
To add comments, please log in or register