Starting Tester with an Intraday bar

 

Dear all,

I would like to test my EA using the Tester with intraday bars. Consequently, I need to start processing with an intraday bar. However, the Tester does not allow me to declare an intraday start bar: there is only the possibility of inserting a date without the time. Is there a solution for this need?

Many thanks in advance for your kind support.

 
giorgio123: I would like to test my EA using the Tester with intraday bars. Consequently, I need to start processing with an intraday bar. However, the Tester does not allow me to declare an intraday start bar: there is only the possibility of inserting a date without the time. Is there a solution for this need?
Add a condition in your EA code, for it to only to only trade after that specific time that you specify as a parameter.
 
giorgio123 :

Dear all,

I would like to test my EA using the Tester with intraday bars. Consequently, I need to start processing with an intraday bar. However, the Tester does not allow me to declare an intraday start bar: there is only the possibility of inserting a date without the time. Is there a solution for this need?

Many thanks in advance for your kind support.

Here's an example of an input parameter:

//+------------------------------------------------------------------+
//|                                                      Expert1.mq5 |
//|                                  Copyright 2021, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"
//--- input parameters
input datetime     InpDateTime   = D'2020.01.01 01:01';
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()

You can:

  • or use this date entirely
  • or select only hours:minutes:seconds
 
Fernando Carreiro:
Add a condition in your EA code, for it to only to only trade after that specific time that you specify as a parameter.

Many thanks Fernando. Have a nice day

 
Vladimir Karputov:

Here's an example of an input parameter:

You can:

  • or use this date entirely
  • or select only hours:minutes:seconds

Ok, Thanks for your support!

Reason: