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
(879)
Projects
1392
67%
Arbitration
117
32% / 42%
Overdue
215
15%
Free
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
4
Developer 4
Rating
(1235)
Projects
2820
80%
Arbitration
156
22% / 43%
Overdue
488
17%
Free
5
Developer 5
Rating
(586)
Projects
1047
49%
Arbitration
39
28% / 41%
Overdue
49
5%
Free
6
Developer 6
Rating
(547)
Projects
757
46%
Arbitration
23
39% / 13%
Overdue
63
8%
Working
7
Developer 7
Rating
(1127)
Projects
1429
62%
Arbitration
21
57% / 10%
Overdue
43
3%
Free

Project information

Budget
50+ USD
For the developer
45 USD