strategy tester mt4, is a automatic paus function possible?

 

i have question on the strategy tester

i need to run the tester tick by tick

but is it possible to paus the strategy tester at the first tick of each new candle automaticaly till i press the paus buttom again to go on tick by tick further?

i know the option open price where it shows me the open price at the new candle

actualy i need it like this, but paused and than follow the candle tick by tick further till new candle arrive and paus again on the first tick of this candle

i think you know what i mean

i searched and read through the searched articels and so on, but didnt find any till now, whats nearly fit my question on this!

if there is something i feel sorry that i didnt found this !!

if its new please give me tip where to find or even a way how to make this

thanks a lot

 
I don't think there's a auto pause function for every tick. I'll recommend slowing the back-tester down. When in very slow mode, it almost doesn't move. You can then pause it manually if you want it to wait there. Then when done with your analysis you can un-pause it or move the speed bar forward to speed it up again.
 

Just to add to ubzen you can't run and then auto pause to a specific bar.... but you can use skip to to take you to the start of a specific day.... you can run to close to the specific bar, manually pause it and then if you press F12, it will advance 1 tick... (I wish you could go back a tick too but unfortunately not).

V

 
#include <WinUser32.mqh>
#import "user32.dll"
  int GetForegroundWindow();
#import

void doPauseTest(){
   int hmain;
   if (IsTesting() && IsVisualMode()){
      hmain = GetForegroundWindow();
      PostMessageA(hmain, WM_COMMAND, 0x57a, 0);
   }
}

Works only in visual mode. The other mode does not have the ability to be paused, the button is grayed.
 
 
7bit:
Works only in visual mode. The other mode does not have the ability to be paused, the button is grayed.
( I'd also assume from the GetForegroundWindow() call that it only works if you leave MT4 as the active window. If, for example, you minimise MT4 in the expectation that it will pause itself, and switch to another app while MT4 is running the test, then I don't think that this will work. )
 
jjc:
( I'd also assume from the GetForegroundWindow() call that it only works if you leave MT4 as the active window. If, for example, you minimise MT4 in the expectation that it will pause itself, and switch to another app while MT4 is running the test, then I don't think that this will work. )
...Sure enough, it doesn't work if you try to do something else while MT4 is running the test.

Therefore, it's preferable to use the following:

#include <WinUser32.mqh>
#import "user32.dll"
  int GetAncestor(int, int);
#import

void doPauseTest(){
   int hmain;
   if (IsTesting() && IsVisualMode()){
      hmain = GetAncestor(WindowHandle(Symbol(), Period()), 2 /* GA_ROOT */);
      PostMessageA(hmain, WM_COMMAND, 0x57a, 0);
   }
}
There don't seem to be any issues in using WindowHandle() from a visual-mode backtest...
Reason: