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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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