hi guys,
this function return the number of modes that sum of all variables(currencyinerest[1]+currencyinerest[2]+...+curencyinerest[n]) are equal to 100;this code perfectly work when you assign number 3 to to variable "currencynumber"
when you assign number 4 to "currencynumber" the code works with some delay, but if you assign a number greater than 4 to "currencynumber" meta trader will crashed.
i really need to run it on 20 currency , and i know it will takes several minutes to calculate;so what's your offer?
any suggestion will much appreciated.
Of course it "crashed". For currencynumber=3 the while loop is executed ~100^3.
So for 5 it's 100^5 = 10,000,000,000, for 20 it will be 10,000,000,000,000,000,000,000,000,000,000,000,000,000...that's insane :-D
Your "bruteforce" algorithm is not usable. You need to find an other one. And the worst is it's not even correct for 3 (you need currencyinerest[x] to be >0, right ?).
Of course it "crashed". For currencynumber=3 the while loop is executed ~100^3.
So for 5 it's 100^5 = 10,000,000,000, for 20 it will be 10,000,000,000,000,000,000,000,000,000,000,000,000,000...that's insane :-D
Your "bruteforce" algorithm is not usable. You need to find an other one. And the worst is it's not even correct for 3 (you need currencyinerest[x] to be >0, right ?).
dear Alain
thanks for reply.As you said, i know exactly, how similar the code of function is to the code of insanity. :-)))))
but i really need to calculate it , and i'm pretty sure there is solution for it; because solver software's can solve this problem in few moments.so do you have any idea how to do it in Mql?
thanks in advance.
Please use the </> button to insert your above code.
Dear Eleni
it was really useful.thank you.:)
dear Alain
thanks for reply.As you said, i know exactly, how similar the code of function is to the code of insanity. :-)))))
but i really need to calculate it , and i'm pretty sure there is solution for it; because solver software's can solve this problem in few moments.so do you have any idea how to do it in Mql?
thanks in advance.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi guys,
may you help me on this code please :
this function return the number of modes that sum of all variables(currencyinerest[1]+currencyinerest[2]+...+curencyinerest[n]) are equal to 100;
this code perfectly work when you assign number 3 to to variable "currencynumber"
when you assign number 4 to "currencynumber" the code works with some delay, but if you assign a number greater than 4 to "currencynumber" meta trader will crashed.
i really need to run it on 20 currency , and i know it will takes several minutes to calculate;so what's your offer?
any suggestion will much appreciated.