// Code removed due to my mistake of having confused "iLow" with "iLowest"
- You have unbalanced parenthesis which will cause a compile error.
- I am assuming that EURUSD is a variable name and not just text otherwise it should be "EURUSD" and not EURUSD.
- Consider using _Symbol, instead of EURUSD if you are calculating against the current chart data.
- Use PERIOD_CURRENT instead of "0" for better readability.
- Use "100.0" instead of "100" to guarantee floating point arithmetic instead of integer arithmetic. In this case, since it is multiplication, it is not a problem. But in other cases, such as division, it could be a problem, so get into the habit of using the correct format.
- EDIT: removed due to my mistake of having confused "iLow" with "iLowest"
- EDIT: removed due to my mistake of having confused "iLow" with "iLowest"
- EDIT: removed due to my mistake of having confused "iLow" with "iLowest"
- In your code, you calculate "variable1" but are returning the variable "vol". Is that correct? Without more code, we cannot say if it is correct or not.
Other than that we cannot really help you much, if you don't explain what the problem is. We cannot read you mind and cannot guess what is meant by "running into obstacles"!
PS! Always use the SRC button to add code to your post. Don't simply add it as normal text.forexmangumopus: I have been trying to calculate a variable which takes iLow data from EURUSD
variable1 = -100 *(highClose*highClose - (Low[iLow(EURUSD, 0, shift)]) ;
-
Play videoPlease edit your post.
For large amounts of code, attach it.
- The Predefined Variables - MQL4 Reference are the current chart only.
- iLow - Timeseries and Indicators Access - MQL4 Reference returns a price
- What do you think Low[1.23456] returns?
- Do not assume the shift on the current chart matches the shift on another. iBarShift - Timeseries and Indicators Access - MQL4 Reference
- Are you sure you want it from EURUSD even if you are on another chart?
WHRoeder:
Thanks for pointing out the "iLow" thing. In my haste to help, I confused "iLow" with "iLowest". I will amend my post to correct the issue!
-
Play videoPlease edit your post.
For large amounts of code, attach it.
- The Predefined Variables - MQL4 Reference are the current chart only.
- iLow - Timeseries and Indicators Access - MQL4 Reference returns a price
- What do you think Low[1.23456] returns?
- Do not assume the shift on the current chart matches the shift on another. iBarShift - Timeseries and Indicators Access - MQL4 Reference
- Are you sure you want it from EURUSD even if you are on another chart?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I have been trying to calculate a variable which takes iLow data from EURUSD but running into obstacles. Anybody have an idea how I could properly do this?
I'm not an expert programmer, so constructive criticism please, no disparaging comments.