Create Function To Find Candle Index Based Off Datetime (on higher tf)

MQL4 Libraries Integration

Job finished

Execution time 3 hours
Feedback from employee
Thank you, good luck

Specification

Hi guys, 

I need a function that returns the index of the candle when passed a datetime value.

Similar to iBarShift(), but I need this function to handle different time frames.

Example.

I pass the datetime of a daily candle, I need it to return the weekly candle's index in which the daily candle is contained within.

Same with say a 1 hour candle timestamp, this function should be able to return the index of the relevant 4 hour candle and so on.

So the function will accept a datetime, and a timeframe to search on.


function(datetime timeStamp, int timeFrameToSearch)


Thanks

Responded

1
Developer 1
Rating
(885)
Projects
1410
67%
Arbitration
123
32% / 41%
Overdue
218
15%
Free
Published: 1 code
2
Developer 2
Rating
(253)
Projects
358
49%
Arbitration
24
25% / 50%
Overdue
80
22%
Free
3
Developer 3
Rating
(590)
Projects
789
71%
Arbitration
9
33% / 33%
Overdue
22
3%
Free
Published: 8 codes
4
Developer 4
Rating
(1235)
Projects
2820
80%
Arbitration
156
22% / 43%
Overdue
487
17%
Free
5
Developer 5
Rating
(589)
Projects
1066
50%
Arbitration
39
28% / 41%
Overdue
49
5%
Working
Published: 1 article, 8 codes
6
Developer 6
Rating
(639)
Projects
862
48%
Arbitration
29
38% / 17%
Overdue
63
7%
Working
7
Developer 7
Rating
(1156)
Projects
1462
63%
Arbitration
21
57% / 10%
Overdue
43
3%
Free

Project information

Budget
50+ USD