IDENTIFYING NEAREST SIGNAL TO 8 AM

 

Friends,

I am a newbie to mql4. But I know little programming in mql4. I need help in writing a code for the condition below.

I want to identify the latest two consecutive bullish bars or bearish bars formation between 00.00 hrs to 08.00 hrs. Such bull/bear bar must be the one which is formed nearest to 8 AM time. Also the return value is to be chosen as 1 for bull bar and -1 for bear bar. Any indicator/Ea in internet which contains such code? Otherwise please guide me to write a code for this condition.

sunil

 

This sort of code from WHR should get you started ...

https://www.mql5.com/en/forum/139794/page2#641655

Reason: