Feature Request for Strategy Tester

 

Dear MT5 Team,

I use an EA I designed myself for allowing me to enter trades per hotkey and with mouse clicks. 

If the Strategy Tester would listen to mouse events and key events I could trade with hotkeys in the Strategy Tester any time I want. This feature is missing though and I regret this. This would also help me with backtesting manual strategies.

Could you please be so kind to make the Strategy Tester listen to mouse and key events?

Furthermore, I just like to say that I love MT5!

Warm regards,

Ruud op het Veld

 
Ruud Op: I use an EA I designed myself for allowing me to enter trades per hotkey and with mouse clicks. If the Strategy Tester would listen to mouse events and key events I could trade with hotkeys in the Strategy Tester any time I want. This feature is missing though and I regret this. This would also help me with backtesting manual strategies. Could you please be so kind to make the Strategy Tester listen to mouse and key events?

You can detect button states in the Strategy Tester as a work-around for mouse clicks chart events.

Forum on trading, automated trading systems and testing trading strategies

Chart Event For MT4 Backtester

Fernando Carreiro, 2016.04.03 15:40

I know this is a an old thread, but I recently needed to debug some of my code that implements "buttons" to control certain aspects of an EA I was coding and had need for it to work in the Strategy Tester.

The solution I came up with was to check the button states on every incoming tick when the EA was in Visual Mode.

In other words, something like this:

void CheckResetButton()
{
   if( bool( ObjectGetInteger( 0, idResetButtonObject, OBJPROP_STATE ) ) )
   {
      Print( "Reset Button Clicked" );
      ObjectSetInteger( 0, idResetButtonObject, OBJPROP_STATE, false );
   }
}

void OnTick()
{
   // Only needed in Visual Testing Mode
   if( IsVisualMode() )
   {
      // Check Chart Buttons in Visual Mode
      CheckResetButton();
   }

   return;
}
 
Fernando Carreiro #:

You can detect button states in the Strategy Tester as a work-around for mouse clicks chart events.

Thank you Fernando, I will try it out!

Kind regards,

Ruud

 
Ruud Op #: Thank you Fernando, I will try it out!
You are welcome!