Problem with custom indicators in an EA

 

Hi all,

I got a problem using one of my custom indicator in an EA. The EA is working in real time but not in strategy tester. I assume there are some functions I use in the indicator used in my EA that are not taken in strategy tester history but in real time values. Do you think this can be possible?

Here is a list of the functions, indicators and variables I use in my indicator (this custom indicator being used into the EA):

- iMAOnArray()

- High[]

- Low[]

- Close[]

- Time[]

- Bars

Do you know if all these functions are working well in strategy testers? Especially because I use them in an custom indicator itself being used in my EA.

The problem I got is in my start function I got something like this:

int start()
{
  value = iCustom(all the parameters I need, 0);
  value2 = iCustom(all the parameters I need, 1);
  
  Alert(value," ",value2);
}

And in the journal of the expert during the strategy tester, I've got something like:

2011.04.15 09:54:23 2009.04.07 08:15 ADXR Expert v2 EURUSD,M15: Alert: 100 110

2011.04.15 09:54:23 2009.04.07 08:15 ADX Eole Trading v1 EURUSD,M15: 137 100

2011.04.15 09:54:23 2009.04.07 08:00 ADX Eole Trading v1 EURUSD,M15: 136 110

2011.04.15 09:54:23 2009.04.07 07:45 ADXR Expert v2 EURUSD,M15: Alert: 120 130

2011.04.15 09:54:23 2009.04.07 08:00 ADX Eole Trading v1 EURUSD,M15: 136 120

2011.04.15 09:54:23 2009.04.07 08:00 ADX Eole Trading v1 EURUSD,M15: 135 130

So it calculate the step 136 two times but with different values... Once again, it is working well in real time trading...

Please help :)

Thanks,

Cam'