How to backtest a currency strength meter ?

 

Hello everybody. I wanted to ask what I can do if I need to backtest an indicator based on the recent strength of other currencies. Here at this link there are few indicators I wanted to use in backtest but seems that is not possible.

https://www.mql5.com/en/articles/1464

Can somebody tell me what other solutions I have to run a backtest with MT4 ?


Thanks in advance.

 
zen4x:

Hello everybody. I wanted to ask what I can do if I need to backtest an indicator based on the recent strength of other currencies. Here at this link there are few indicators I wanted to use in backtest but seems that is not possible.

https://www.mql5.com/en/articles/1464

Can somebody tell me what other solutions I have to run a backtest with MT4 ?


The Strategy Tester is for testing Strategies . .  EAs,  you can us it with Indicators but some will work some won't . . . for example is your Indicator uses Bid it will get current price not price at the time you are testing in the ST.  You can recode to use Close[0] instead of Bid,  there are other workarounds you may need to do . . .  
 
Hello Raptor, thank you answering. Do you think that is tecnical wrong if I rewrite the indicator into an EA using the buffers like it was an indicator ?
 
zen4x:
Hello Raptor, thank you answering. Do you think that is tecnical wrong if I rewrite the indicator into an EA using the buffers like it was an indicator ?
You can't,  certain Indicator Functions only work in Indicators and will not work in an EA,  for example,  IndicatorCounted()   Indicator Functions  "These functions cannot be used in experts and scripts."
 

Raptor, if I use Arraycopyseries called from an EA during the backtest, can I use ASK and BID from other pairs ? Is that right.

I am trying to find all this information on mql4.com. I did not want to post basic questions, but I do not know much about what is possible and what is not in the testing environment.

Thank you.

 
You can get Bid/Ask of other pairs through market_info but not in the tester. ERR_FUNCTION_NOT_ALLOWED_IN_TESTING_MODE(4059) Testing Features and Limits in MetaTrader 4 - MQL4 Articles
 
zen4x:

Raptor, if I use Arraycopyseries called from an EA during the backtest, can I use ASK and BID from other pairs ? Is that right.

I am trying to find all this information on mql4.com. I did not want to post basic questions, but I do not know much about what is possible and what is not in the testing environment.

Thank you.

Where do you imagine Bid and Ask would be stored for the other pairs for the date you want to test in the Strategy Tester ?  in the .hst files ?  they hold datetime OHLC and tick count (volume) . . .  
Reason: