Hellow folk(s)
i have this function
that return the high stock price for a certain period of hours ...It works well but i get an error while passing the EA to the market Array out of range on its return array 167,25 ...What might be the problem..Also if the method is wrong i need help on getting the high price value after certain hours
What is x_hours and what code is on line 167?
I know that it is not obvious, but topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I will move your topic to the MQL4 and Metatrader 4 section.
-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum?
Next time post in the correct place. The moderators will likely move this thread there soon. -
highSto_price = iHighest(Symbol(), PERIOD_H1, MODE_HIGH, x_hours, 0); return (High[highSto_price]);
Unless you are running on the H1 chart, You are mixing apples and oranges. -
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 2019.05.20
What is x_hours and what code is on line 167?
I know that it is not obvious, but topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I will move your topic to the MQL4 and Metatrader 4 section.
x_hours is 172
line 167 isreturn (High[highSto_price]);
x_hours is 172
line 167 isThen it is probably as William has pointed out.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hellow folk(s)
i have this function
that return the high stock price for a certain period of hours ...It works well but i get an error while passing the EA to the market Array out of range on its return array 167,25 ...What might be the problem..Also if the method is wrong i need help on getting the high price value after certain hours