Dislikeda) Re-code the main EA (Phantom EA, by instance), in the way that every call to the function MarketInfo(...), changing as another function that reads the file wrote previously.
b) The more elegant. Create an indicator the reads the files and serves the data to the main EA. We can, too, show the data in a beautiful way, as bars or candles.Ignored
Probably off topic for this non-technical thread, but...
Kind of a combination of a) and b) works in MT4.
- Get tick data for the symbols you want to test (there are multiple ways of doing this - obviously, using MT5 tick data is one way).
- Create a library/server of proxy functions for all of the standard MT4 functions (MarketInfo, OrderTotal, OrderSend, etc). One boolean switch is used to determine if we are in test or live mode - use the Account/Order library functions in test mode or the standard MT4 functions in live mode.
- Create a library/server for the Account/Quote functions (Balance, Equity, Lot Size, Leverage, Ask, Bid, Tick Value, etc).
- Create a library/server for the Order functions. We need to simulate and track all order functions of MT4. This is actually easier than it sounds.
- In the EAs, use the proxy function names instead of the standard MT4 function names.
- Use a script to read the tick data to update our Account "server" with all tick data. If needed, you can have the script create off-line charts as the tick data is processed.
At this point you have two options and, for me, it depends on the EA:
1) Have the script call the start() function of your EA for every tick, or
2) Just attach your EA to the offline charts as normal.
Obviously, this is a high-level overview of the process. It sounds like you are well on your way to getting it done! It's great for quickly testing different variations of systems like this one and, in my opinion, very much worth it.