[DELETED]
Idi: How do I find the lowest/highest fractal in the past X candles in mql4?
When in doubt, think!
Not compiled, not tested, just typed.
double highest=DBL_MIN, lowest=DBL_MAX; for(int iBar=3, iBar <= X, ++iBar){ double t=iFractals(_Symbol, timeframe, MODE_UPPER, iBar); if(t!=0 && highest < t) highest=t; t=iFractals(_Symbol, timeframe, MODE_LOWER, iBar); if(t!=0 && lowest > t) lowest =t; }
Not compiled, not tested, just typed.
Was that so hard you couldn't even attempt it?
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