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
Hi there,
I am new to mql4 and to this forum.
I try to get the most recent High and Low. What I don't want is the highest or lowest price in a certain period of time. I really just want the most recent High or Low Price of the candle as in this picture:
So I cant use iHigh or iLow because I just want the most recent High / Low and not in a period. I tried to calculate the last High within the window of the last 30 candles. Starting by the most recent candle, counting backwards in the chart. To Identify the High I thought I can compare the Price or High of the current Candle with the High of the Last candle. If the current price is bigger we will be in an uptrend or at least in buidling a new High. But if the current Price is below I can count backwards and compare the High of the Candle with the High of Candle+1 (the next candle backwards in time) until the Candle+1 High is smaller than the Candle High.
Long story short:
But that is not working.
Looking for your advice or an example function for identifying most recent High and Low. I'm sure there is a simple solution and I am overthinking as usual.
Thank you!
Best regards,
HansTheTrader