iCustom Indicator Problem.

 

I am currently trying to pull into an EA the values from a custom indicator. The values that I am pulling into the EA are different than the numbers that are shown on the chart window of the indicator. To make the exercise easier, I decided to resolve the issue with testing my parameters on the indicator momentum. I am getting the same results for one minute time parameter as well as the 60 minute time parameter. I do not understand why the 60 minute parameter is not different and why the indicator is not giving me the same numbers as the chart. Are my iCustom parameters incorrect?

double Accum_0 = iCustom("EURUSD_fx",0,"Momentum",14,0,0);
Files:
 
You can not get bar zero data for other timeframes/pairs in the tester.
 
WHRoeder:
You can not get bar zero data for other timeframes/pairs in the tester.


WHRoeder,

Thank you for your response. After working through the parameters for iCustom, I was able to identify the proper syntax. But after identifying the proper parameters and locations within iCustom, I am having problems with the time period. After compiling the EA multiple times, and saving the EA, I noted that MetaTrader is not using the improper time period. Do you know what is causing this? This is the format of the iCustom I was using. See attached.

iCustom("EURUSD_fx",PERIOD_M30,"Momentum",14,0,0)
 

My file did not get added. Here is the file.

 

WhRoeder,

I am not able to add the bmp file as it is not uploading.

 
WHRoeder:
You can not get bar zero data for other timeframes/pairs in the tester.


Testing Features and Limits in MetaTrader 4

Zero bar of another timeframe for the same symbol under test is modeled approximately

Open = correct Open, Close = correct Close, Low = min (Open,Close), High = max (Open,Close), Volume = final Volume (false)

Does that mean you can use zero bar for other timeframes accurately as long as it is either the Open or Close price ?

If it is neccessary to use High and Low of other timeframes you could always work them out from the bar history within the timeframe you are using.