Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1501
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
Sergey Voytsekhovsky #:
... I tried to write myself on the basis of Euclid's algorithm, but I got confused. In general, experience is lacking ...
... The algorithm itself is not complicated. It is simple to calculate on a sheet of paper or a calculator, but I can't translate it into MQL5 language!
Based on my practice of communication on the Forum, I can tell you that if you show the code you have already written, then you will be answered faster and they will tell you where the error is in the code.
Regards, Vladimir.
Based on my practice of communicating on the Forum, I can tell you that if you show the code you have already written at once, they will answer you faster and tell you where the error is in the code.
Regards, Vladimir.
Ok, thank you very much for your opinion. Let's try it. A brief background for understanding. I plan to use the function in an indicator based on Renko, superimposed on the main chart. There is a need to determine the current size of bricks. ZigZag is built on the basis of Renko chart, it has, among other things, two arrays - one with tops and one with bottoms. Now I need to determine the GreatestCommonDivider of the distances between them to adjust the size of the bricks automatically.
At the moment I've sketched out this kind of krakozabra and that's it, I'm stumped, I can't think of what to do next.
This is of course just a draft, do not judge strictly. I think I've gone somewhere wrong, it's all kind of messy, I need to find a simpler and clearer solution, but I can't think of it yet....
Sergey, form an array of numbers for which you want to find the NOD and pass it to the ArrayGcd() function from my previous post.
Thanks, I saw your message after I had sent my last one, now I'm trying to adapt it.
Thanks, I saw your message after I had sent my last one, now I'm trying to adapt it.
Sergey, form an array of numbers for which you want to find the NOD and pass it to the ArrayGcd() function from my previous post.
Perhaps you need to check, and that's only after coding the algorithm. Thanks for your feedback.
Hi all, can you tell me if it is possible to import a function from one EA to another?
For example, there is an EA that opens orders, and there is an EA that monitors the state of the account, where the parameters drawdown, etc. are specified,
I need that when the drawdown of the second EA is reached, the first EA does not open orders....
How to do it for example?
For example, there is an EA that opens orders, and there is an EA that monitors the state of the account, where the parameters drawdown, etc. are specified,
I need that when the drawdown of the second advisor is reached, the first advisor does not open orders....
How to do it for example?
If the first EA opens positions with a certain medzhik, then you can sort these positions in it or in another EA and calculate their total profit loss. And the second Expert Advisor you have counts this profit-loss, so it can not be a drawdown, it does not open positions, it monitors the state of positions with the desired medzhik. And in general, positions, after they are opened, are on their own, and among them you usually need to find the right ones)))))