MTF Visual Backtest

 

In watching some MT4 related videos online it seems that there is a way to visually see MTFs while backtesting. The approach explained is to:

1. make sure offline data is available for both timeframes

2. start the backtest (M5) and press pause

3. File-open offline - select larget timeframe data (M15) to be opened

4. By finishing above 3 steps the M5 chart currently being backtested should be attached to M15 and if we are to tile windown vertically we should be able to observe changes in both screens as the test progresses.

No I did follow these steps and do know that I have the data for both M5 and M15 but as I press F12 for several times to make another candle apear in the M5 chart nothing is happening on M15 chart.

Any guidance how to attache M5 and M15 charts or pointing to where I can find explanation is appreciated.

Thanks a lot....

 
Zoran:

In watching some MT4 related videos online it seems that there is a way to visually see MTFs while backtesting. The approach explained is to:

1. make sure offline data is available for both timeframes

2. start the backtest (M5) and press pause

3. File-open offline - select larget timeframe data (M15) to be opened

4. By finishing above 3 steps the M5 chart currently being backtested should be attached to M15 and if we are to tile windown vertically we should be able to observe changes in both screens as the test progresses.

No I did follow these steps and do know that I have the data for both M5 and M15 but as I press F12 for several times to make another candle apear in the M5 chart nothing is happening on M15 chart.

Any guidance how to attache M5 and M15 charts or pointing to where I can find explanation is appreciated.

Thanks a lot....

Your code has to create the offline charts from the Strategy Tester produced data . . . if you don't know what that means do some research just like I did.
 

Thanks Raptor UK.

I looked all around forum and on the net but could not get to the answer... possibly I do not even know what to serach for....

I guess difference between hst and fxt file formats have to do something with how to run EA backtest visually on multiple timeframe charts o(i.e. M5 and M15) but I could not find any explanation how to have "code create the offline charts from the Strategy Tester produced data".

I would really appreciate if you could direct me to where I can get this info or provide just a bit more details that could help me figure this out.

THANKS....

 
Zoran:

Thanks Raptor UK.

I looked all around forum and on the net but could not get to the answer... possibly I do not even know what to serach for....

I guess difference between hst and fxt file formats have to do something with how to run EA backtest visually on multiple timeframe charts o(i.e. M5 and M15) but I could not find any explanation how to have "code create the offline charts from the Strategy Tester produced data".

I would really appreciate if you could direct me to where I can get this info or provide just a bit more details that could help me figure this out.

THANKS....

Read this thread: http://www.forexfactory.com/showthread.php?t=206301 you will see my comments on page 8
 

Thanks a lot!!!

Yes the link actually explained what needs to be done and your hint on Pg7 mentioning script you had to create to properly refresh the offline chart in combination with https://www.mql5.com/en/forum/139419 helped me put it all together and set-up the offline chart as well as refresh script.

I tested the script at speed of 20+ and have no issues with tester freezing.....

In any case, to compile answer if someone else is to look for it in the future, here is my script code (please let me know if it should be done differently):

//+------------------------------------------------------------------+
//|                                                      Refresh.mq4 |
//|                                                      Zoran Bozic |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Zoran"
#property link      ""
#include <WinUser32.mqh>
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
   int    hwnd=0;
   int    i_period=Period();
   int cur_time=LocalTime();
   int last_time=LocalTime()-5;
   
   while(true)
      {
      Print("Looking for window");
      //----
      if(hwnd==0)
        {
         Print("hwnd==0");
         hwnd=WindowHandle(Symbol(),i_period);
         Print("hwnd="+hwnd);
         if(hwnd!=0) Print("Chart window detected");
        }
      //---- refresh window -----
      if(hwnd!=0)
        {
         PostMessageA(hwnd,WM_COMMAND,33324,0);
         Print("hwnd UPDATED "+hwnd);
        }
        Sleep(2000);//----- 2 secs between refresh ----
      }

//----
   return(0);
  }
//+------------------------------------------------------------------+

Also here is the screen capture of everything working"

However the main info to set it up is at the link RaptorUK provided in the previos post - http://www.forexfactory.com/showthread.php?t=206301