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
And I'd appreciate a clear statement when double normalize is needed.
The calculated StopLoss and TakeProfit values, as well as open price of pending orders must be normalized with a precision the value of which is stored in the pre-defined variable of Digits.
This double conversion was very confusing to me the first time I saw it. In fact, when outputting it into the Expert Advisor's log, the
Perhaps the example with some trade function would be much more informative, i.e. it is there where normalization is really needed. The example with CompareDoubles() function from stdlib.mq4 would be very informative too (this is the place where beginners step on it almost invariably):
Renat, isn't that an option?
What is the fundamental difference between the first return(0) and the second return(-1)?
How does it affect the execution of an indicator (or Expert Advisor)?
What happens when a negative value is returned?
And can I write something like:
And can I write something like:
From documentation (Data types): Integer constants can assume values from -2147483648 to 2147483647. July 2002, EURUSD: maximum number of ticks per month in history, 670000. It would take 3000 months, i.e. 250 years, to get an overflow even with this maximum tick volume. On the other hand, the volumes may grow further, so the figure is not so unattainable theoretically...
From documentation (Data types): Integer constants can assume values from -2147483648 to 2147483647. July 2002, EURUSD: maximum number of ticks per month in history, 670000. It would take 3000 months, i.e. 250 years, to get an overflow even with this maximum tick volume. On the other hand, the volumes may grow further, so the figure is not so unattainable theoretically...
I asked that question myself and got exactly that answer. Even though it's hard to believe. But if you put quotes from the stock market into MT4 ...
Rosh, if I understand your silence correctly, there is no clear statement for which cases and for which expressions/variables normalisation is needed. If this is the case, maybe a simpler question can be answered: is normalisation of calculated values of the form
int StLs=25;
double prc = Ask + StLs*Point;
Or should I find this out on my own, in an experiment ?