History for backtest

 

yone:

does MQ4 BACKTESTING give you OHLC history for all pairs, or only for the Pair selected on the Settings? I know you cannot backtest multitrading, but my question regards access to prices of other instruments. This is related to a version of xMeter that I have developed which produces a history of the scores for each currency. On real time,it works fine, but I want to see if I can generate the scores by using the backtester. It has 2 problems, 1: no spread in history, 2: changed the calculation to use 1 minute close prices. the Meters move on every minute change whereas before they would move when the hour changed xMeter on the Left which uses Ask/Bid). I have compared the results with the real time history and they do not match at all. I suspect that I am not getting the correct readings from the other instruments. I am enclosing a snapshot of what the Meter looks like. I am trying to see if this works entirely in MQL4 before I try migrating it to MQL5, where I should get access for all instruments in the Testing SandBox

The Window on the bottom left belongs to the xMeter Indicator on real time(It moves during open sessions). The Window on the right belongs to the BackTest window(Visual) It moves every minute.

Thanks...

gjrexach aka KomodoDragon

Hi ever

 

This might help.

I didn't think getting other symbols OHLC was possible because of all the posts about Mt4 not being Multi-Currency capable. One day by accident, I had "EURJPY" in Code and was testing on "EURUSD" and it started giving me "EURJPY" prices. With that said, that's about all I know on the subject. As you're aware, one cannot use any Market_Info proprieties for other symbols while in the tester. OrderSend() for symbols other than the Testing Symbol will not work. And beware of Bar[0] information. As with Everything around here, you'll have to conduct the experiment yourself to know for sure.

 
gjrexach:
does MQ4 BACKTESTING give you OHLC history for all pairs,
Tester limitation: You can not get bar 0 data for other pairs or timeframes. I.E. iOpen(...,0), marketInfo(...,"MODE_BID"), iMA(...,0), iCustom(...,0), etc.
 
ubzen:

This might help.

I didn't think getting other symbols OHLC was possible because of all the posts about Mt4 not being Multi-Currency capable. One day by accident, I had "EURJPY" in Code and was testing on "EURUSD" and it started giving me "EURJPY" prices. With that said, that's about all I know on the subject. As you're aware, one cannot use any Market_Info proprieties for other symbols while in the tester. OrderSend() for symbols other than the Testing Symbol will not work. And beware of Bar[0] information. As with Everything around here, you'll have to conduct the experiment yourself to know for sure.


MANY THANKS for your response!!!! YES!!!! YOU CAN GET OTHER PAIR OHLCs while testing!!!! Acting on your fortunate accident, I put a comment in the indicator to list the Close value(iClose) of each Pair at calculation time and VOILA!!!

They match exactly with the minute close bar in the history..(See attached picture)

Again... many thanks, and hope this can be of use to you..

gjrexach aka KomodoDragon

 

... Again... many thanks, and hope this can be of use to you ...

Yep, I got it. I can already see the light at the end of the tunnel. Once I get done programming my rock solid EA environment it'll be time to graduate fx-high-school. And moving on to college level Multi-Currencies.

Reason: