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
First of all i would never use && like that.
{
if(flma < flpma)
{
// Here you go...
}
}
Second, YES you always need to verify your data.
Data Availability
Presence of data on HCC format or even in the prepared for using HC format does not always denote the absolute availability if these data to be shown in a chart or used in mql4 programs.
When accessing to price data or indicator values from a mql4 program it should be remembered that their availability in a certain moment of time or starting from a certain moment of time is not guaranteed.
If the data is not available, what is the output of your indicatior call?
Assuming that everyhing is ok at all times can be a very bad idea.I appreciate the clear response!!! Thank you! I found the article you quoted and it helped further explain the background of whats going on.
https://docs.mql4.com/series/timeseries_access
{
if(flma < flpma)
{
// Here you go...
}
}
I have read stories of Million Dollar mistakes happening due to && and &.
{
// Here you go...
}
{
// Here you go...
}
I never said that they were different.
First of all i would never use && like that.
{
if(flma < flpma)
{
// Here you go...
}
}
I disagree with this. I like nesting, but this is over the top. If you wanted to write a comparison method for an object with 20 instance variables your code would look weird.
Now if you are mixing multiple && with multiple || then I would have some sympathy, but not just a few && which work well together without ambiguity.
All compilers, including the MQL4 one, will warn you if you mistakenly use & instead of &&.
I would have a much bigger problem with a coder that doesn't check their compiler warnings than one that uses a standard "and" logic operator
Marco vd Heijden: I never said that they were different.
I never said that they were different.
Go read it again.I disagree with this. I like nesting, but this is over the top. If you wanted to write a comparison method for an object with 20 instance variables your code would look weird.
Now if you are mixing multiple && with multiple || then I would have some sympathy, but not just a few && which work well together without ambiguity.
All compilers, including the MQL4 one, will warn you if you mistakenly use & instead of &&.
I would have a much bigger problem with a coder that doesn't check their compiler warnings than one that uses a standard "and" logic operator
It just comes down to personal coding style.
I do like to take one step at a time.
It just comes down to personal coding style.
I do like to take one step at a time.
Go on, take a big leap, you can do it ;)