Sending Offline Chart to Strategy Tester (25% model)
OfflineTestHelper is a simple script that helps with a simple testing strategies, nested in offline charts. The testing quality is displayed as 25%, though it highly depends on the original chart fidelity.
The Strategy Tester included in the Terminal only allows picking testing timeframes from a drop-down menu, which contains standard values M1, M5 etc. On the contrary, the offline charts never can have such timeframe value in a live terminal.
The script replaces one of the standard timeframes by the offline chart. It works with an artificial broker to prevent the refresh of such chart with on-line data.

Input Dialogue
Input lets you decide for alternative server name. It is useful, when you prepare multiple offline charts for testing, preserving all of them for later use. Otherwise keep the default.
The second option would systematically overwrite the candle open value by a close value of the preceding candle. Use this settings for offline charts with displacement of the open price, like a reversal candle on Renko charts has.

Result Dialogue
The First Steps
Watch the video from Theo on how to use the Helper with the offline chart.
What does the helper after dropping on a chart:
- Creates a virtual server folder. Absence of the on-line server will prevent the terminal from updating any chart.
- Copies essential Metatrader data to the new server folder (instrument list with latest quotes).
- Creates a copy of the current offline chart.
- Set its timeframe to M1.
- Removes zero-volume candles (they are not compatible with the tester).
- Stores the new chart into the virtual server folder.
Then it displays a result dialogue. You have a chance to stop the script now.
When you decide to stop, your data is prepared for use with any MT4 terminal instance. You may copy/move your virtual server folder to another terminal for testing, login into the virtual server in the other terminal.
When you decide to continue with the Restart, your current terminal instance will be used for testing. It will force the entire MT4 terminal restart.
- The terminal shuts down, unbinding current server data.
- Terminal starts with the virtual server “test”, the connection status remains “Disconnected”.
- Ignore whatever you see in the charts in front of you. Switch to Strategy Tester (ctrl+R) by hand.
- Pick symbol of your converted chart.
- Pick M1 timeframe (your offline chart is stored as M1).
- Pick your strategy.
- Test.
- If you finished testing, log-in back to your original account&server (double click your previous account in the Navigator).
Hi OVO,
When I dropped the script onto the renko chart like in your video, I got this error: unsupported legacy hst version. Use b509-compatible script. My MT4 is build 765. please advise. Thank you
Hello Dylan, since build 524, the Terminal data file structure changed. Though later the MQ added ability to read the legacy structure as well, all scripts in this site (and this script) were already designed to work with the native file structure only. If you intend to use this script with a third-party generator, ensure it uses the 600-like structure or ask the authors for a fix.
Cool, I got them working now. Charts look clean and beautiful. Back-test is smooth. Thanks man.
I did every you did in your video when I dropped my template nothing happened thank you
Yes, unfortunately this particular functionality has been killed in MT4 since build 825.Currently you have to start the terminal by yourself. I will try some workaround when I have free time.
is there a place that you know of were you can down load an order mt4 that will work with this back tester thanks
Hi.
Does this script replaces fxt files too? Or just Offline chart with M1 chart in which case Strategy tester generates fake ticks inside the offline chart.
Hello ivolux, as the banner reads, it does nothing more than converts the particular chart into the M1. FXT file is generated by the Strategy tester as usually.
I got this error: unsupported legacy hst version. Use b509-compatible script. what i do ?
Hello Kaushik, as the banner on the top reads, it does not support file formats used prior the build 600.
ok sir i will trey
how can i use prior the build 600, please tell me sir
hello sir please reply me , how to back test with renko ?
I do not know. If you like to use this helper script, find a generator, which creates file in proper format, like any in this site. The terminal has been using the new format for more than two years.
Hey
So I drop the script onto the custom timeframe chart, login “test” for server. Go to restart, not connected to a server, run “strategy tester”, test on 1 minute chart visual chart pops up
“Waiting for update” …………..any suggestions ? No getting an data for some reason.
I downloaded the data for history center also,
Any help would be great.
Thanks
Will this offline test helper work for all offline charts such Renko, Mean Renko, Range bar, Tick chart and Flexibar charts for back testing manually?
Not sure what you meant by manual testing. The script transfers the single (preferably offline) chart into virtual broker environment to appear as M1 chart. You may test EAs on this single chart like it were M1 chart.
Hi Sir,
Thank you for your great script. I can run with the test server as you suggest. But I got the error “OrderSend Error 131″ and ” Error opening BUY order : 131″
, even with MACD and Moving average sample EAs from MetaQuotes.
Please help.
Thanks!
Hello Benny,
please read this blog entry: http://ovo.cz/metatrader-4-build-880-error-131-invalid-volume-workarround/
Hi Sir,
It works. Thank you for your great work.
Hi, I have been using your excellent Range bars and have started using the back testing tool (thanks for link above, very useful). When I back test I am only achieving about 25% tick accuracy. I am thinking of using TickStory, is your Offline Test Helper compatible with TickStory and would this increase accuracy? If not do you have any other ideas to increase accuracy?
Ahhh…just spotted banner that says no tick by tick compatibility, guess that answers my question.
Yes, the 25% is a standard accuracy for M1 chart testing.
hy
everything works just fine till the moment I klick “start”. Just the peep tone comes but the test it self does not run. what can i do ?
Hello Manuel, difficult to advice, I would start with adding some diagnostic outputs to the EA first. but actually the reason may be whatever.
HELPPPPPP ……………receiving error: you are in the test account login to another one. Using build 670
Hello annoyed, try to do what the message says, i.e. log in to a valid account before using the script.
I keep getting unsupported legacy error have no idea what im doing wrong ive been using your offline tester for months now and never had any issues… please skype me @ vip.signals or respond to this so you can help thanks !
Hello Tyrell, you probably changed the way you create the offline chart (the generator). The helper won’t help with the offline chart which has pre-600 format. Though this format can be displayed in the terminal again, it is not applicable in the tester.
Hi there,
I am trying to use your script to backtest my EA on an H8 time frame. For this, I need to use imported m1 data, which means I don’t log into any server (so the data doesn’t update over my imported data.) But when I attempt this, and drag the script onto the H8 offline chart, it tells me I’m already logged into a test account. From your instructions, it appears that I need to be logged in to a live/demo account before I drag the “offline test helper” script onto the offline chart. However if do that, wouldn’t my imported m1 data be overwrtten by live data at some point? Thanks for your help.
Hello Beau, I updated the script, now it should run also on the disconnected account. Please download version 2.05.
Hi Milan, thank you for the response. I downloaded and ran the updated script. Now when I put the script on my offline chart I’m getting the message “something went wrong”.
Some of the files symbols.raw, ticks.raw, symbols.sel and symgroups.raw is missing in the source history folder.