Gerardo Bustos:
Hello forum, good day.
How could I know in MQL4 if a bar closes on the top or bottom 25% of its range? Your help will be much appreciated.
Best regards and thank you in advance,
Gerardo
I will try to use the following and see if it works:
Top 25%
double BarRange = High[shift] - Low[shift]; if ( Close[shift] >= High[shift] - ( BarRange * 0.25 ) ) return( true );
Bottom 25%
double BarRange = High[shift] - Low[shift]; if ( Close[shift] <= Low[shift] + ( BarRange * 0.25 ) ) return( true );
Best regards and thank you,
Gerardo

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
Hello forum, good day.
How could I know in MQL4 if a bar closes on the top or bottom 25% of its range? Your help will be much appreciated.
Best regards and thank you in advance,
Gerardo