Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I hope you enjoyed the “SYNTAX” lesson, which tried to give you the answers for: • What format you can use to write MQL4 code? • How to make the world better by commenting your code? • What the Identifiers are, and what are the rules of choosing them? • What are the MQL4 Reserved words?
An other question.
double should be between 2.2e-308 to 1.8e308.
What is e?
Is it in hexadecimal format?
And an other question.
I know that somebody uses the letters before name of variables, for example:
int nSomeNumber = 12345;
bool bIsRightPlace = true;
double fCurrentPrice = 1.2344;
datetime tCurrentDate = D'2005.02.02. 8;00';
color cChartColor = Olive;
string sMyName = "Joel"
I mean n for int, b for bool, f for double, t for datatime, c for color and s for string. Is it still usable?
An other question.
double should be between 2.2e-308 to 1.8e308.
What is e?
Is it in hexadecimal format?
And an other question.
I know that somebody uses the letters before name of variables, for example:
int nSomeNumber = 12345;
bool bIsRightPlace = true;
double fCurrentPrice = 1.2344;
datetime tCurrentDate = D'2005.02.02. 8;00';
color cChartColor = Olive;
string sMyName = "Joel"
I mean n for int, b for bool, f for double, t for datatime, c for color and s for string. Is it still usable?
Thank you newdigital for your intelligent questions.
Question 1:
2.2e-308 and1.8e308 are numbers wrote in exponential notation.
Exponential notation is a way of writing large numbers without having to write out a lot of zeros, for example, 1,000,000,000 can be written as 1.0E9.
The number followed the E is called the exponent and it indicates how many places the decimal point must be moved to change the number to the normal decimal notation.
The exponent can be positive or negative; the exponential number 6.35E-5 is equivalent to 0.0000635 in decimal notation.
Question 2:
Yes, this is very a good programming practice, and it called Hungarian notation.
Hungarian notation is a naming convention in programming, in which the name of a variable (or function) indicates its type or intended use.
You prefixed every variable name with the first letter of the variable type, and that's what Hungarian notation mean.
I've used the exponential notation in my lesson to tell you what the range of float data type is (2.2e-308 to 1.8e308), because I can't write these numbers in decimal notation.
Do you imagine 307 zeros in the right of the number 18 to present the number 1.8e308.
In MQL4, you can't use the exponential notation.
To present the number 2.5E-4 in MQL4 you have to write it in decimal notation like this: double fCoefficient = 0.00025;
2.2e-308 and1.8e308 are numbers wrote in exponential notation.
Exponential notation is a way of writing large numbers without having to write out a lot of zeros, for example, 1,000,000,000 can be written as 1.0E9.
The number followed the E is called the exponent and it indicates how many places the decimal point must be moved to change the number to the normal decimal notation.
The exponent can be positive or negative; the exponential number 6.35E-5 is equivalent to 0.0000635 in decimal notation....
Hmmm, so I think 2.2e-308 = 2.2 x 10 to the power of -308, and 1.8e308 = 1.8 x 10 to the power of 308.