[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 406
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
Hi all.
I need a function, or an operation, which would give the last x values from a number.
For example there is a number 123456789, variable x = 4. The result should be 6789, i.e. the last 4 characters of 123456789
Hi all.
I need a function, or an operation, which would give the last x values from a number.
For example there is a number 123456789, variable x = 4. The result should be 6789, i.e. the last 4 characters of 123456789
Source number is A. Result is integer variable result.
int x = 4;
int A = 123456789;
int divisor = MathPow( 10, x ); /// 10^4
int result = A % divisor; /// остаток от деления А на divisor
If you want to speed up calculations, instead of MathPow() just make a loop of multiplication of tens - it will still be faster, and much faster.
Dear Experts! Looking for a script that opens orders when the normal SMA crosses the horizontal line on the chart. If the SMA crosses the line from below - buy, opposite - sell. The trades are on the close of the candle. Can you give me a link where to find it, if it has been posted.
2. The easiest way is to find an EA that works on MA crossings and prescribe a horizontal line level instead of one of the MAs.
3. An example of search in the base of the Expert Advisor on MA crossings. http://www.google.ru/search?as_sitesearch=mql4.com&as_q=советник by MA crossings
Colleagues, please advise what and where to change in EA code to work in DC with five-digit quotes.
Dear colleagues, I don't have much programming experience yet, so I'm asking for advice. It is not always possible to get the value of a variable via some function, but it is possible to write out all the values in the required range in advance. You will get something like this
if (a==17) b=1329;
if (a==243) b=15;
And so on. But what to do if there are about a thousand of such strings? Shall I create a file? But how can we quickly find the value of "b" by the value of the "a" variable, especially since the "a" variable is not numbered consecutively? And so that there would be no lags ?
...But what if there are about a thousand such lines? Create a file? But how to quickly find the value of variable "a" and immediately find the value of "b", taking into account the fact that the numbering of "a" is not consecutive? And so that there would be no lags ?