Constructing M5 History-Data Out of M1 History-Data

 

B"H


Hello there,


Assume I have reliable M1 history bar-data.

Is it possible to generate reliable M5 bar-data out of it?

For example, by applying the following conversion scheme:


Observe 5 consecutive M1 bars on each iteration.

On every iteration determine the attributes of a single M5 bar (Open, Close, High, Low, Volume), as follows:

1. Set its Open attribute to 1st M1 bar's Open value.

2. Set its Close attribute to 5th M1 bar's Close value.

3. Set its High attribute to MAX{ High of all observed M1 bars }

4. Set its Low attribute to MIN{ Low of all observed M1 bars }

5. Set its Volume attribute to SUM{ Volume of all observed M1 bars }


Would the produced M5 data be considered reliable?


Thanks,

Simha

 
Simha:

Assume I have reliable M1 history bar-data.

Is it possible to generate reliable M5 bar-data out of it?

Period Converter
 

B"H


Thanks WHRoeder.

BUT, I didn't manage to operate it offline, i.e. using MT4's Strategy-Tester.


Could you assist?

{ I'm referring to the Period Converter on https://www.mql5.com/en/code/7673 }


Thanks again,

Simha

 
plain & simple disconnect from the internet
 
qjol:
plain & simple disconnect from the internet

Thanks.

Should I compile it as an EA and run it in the Strategy-Tester?

 
Simha:

Thanks.

Should I compile it as an EA and run it in the Strategy-Tester?

Its a script, set your chart to M1, drag the script onto it . . . set the parameter to 5
Reason: