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

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.

Dialog

Result Dialogue

The First Steps

Watch the video from Theo on how to use the Helper with the offline chart.

FXT Builder
Are you rather looking for the 99% (tick) modelling quality?
FXT Builder

What does the helper after dropping on a chart:

  1. Creates a virtual server folder. Absence of the on-line server will prevent the terminal from updating any chart.
  2. Copies essential Metatrader data to the new server folder (instrument list with latest quotes).
  3. Creates a copy of the current offline chart.
  4. Set its timeframe to M1.
  5. Removes zero-volume candles (they are not compatible with the tester).
  6. 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.

  1. The terminal would request to login into the virtual server. Change only server to value you filled in the input (“test” by default). Leave other fields unchanged. Confirm. (skipped in the latest version, using “test” hardcoded)
  2. The terminal shuts down, unbinding current server data.
  3. The terminal used to start up now. Unfortunately, this feature seems to be discontinued, so start the terminal using its alias as you would usually do. (fixed)
  4. Terminal starts with the virtual server “test”, the connection status remains “Disconnected”.
  5. Ignore whatever you see in the charts in front of you. Switch to Strategy Tester (ctrl+R) by hand.
  6. Pick symbol of your converted chart.
  7. Pick M1 timeframe (your offline chart is stored as M1).
  8. Pick your strategy.
  9. Test.
  10. If you finished testing, log-in back to your original account&server (double click your previous account in the Navigator).