Vladimir, in case of restarting the Expert Advisor in OnInit() we go through all open positions...
And then the OnTradeTransaction function works, in which the price is compared and if it is the next position, the variable takes this value.
You can insert the symbol and magik checks yourself.
Hi Alexey, thank you for your assistance! I thought about MathMax and MathMin too, but I haven't had time to implement it yet. Tomorrow after work I will definitely do the code. )
_amba #: That's the thing, I wrote a simple Expert Advisor, and the font under the tick does not become bold. But there is someone else's Expert Advisor (I downloaded the demo version) and there I just saw how the font becomes bold. I have build 5260 too, on Windows 10.
I found out why the parameters that need to be optimised are not switched to bold under the checkbox. I use the inputgroup variable. If I remove it, then switching to bold font works fine.
_amba #: I found out why the parameters that need to be optimised are not switched to bold under the checkbox. I use the input group variable. If I remove it, then switching to bold font works fine.
I can confirm! I tested with an EA with "input group" and had the same issue. I think it is because the "group" names are already in bold.
Hello Alexander, I liked your code variant. I improved it for hedge account, added some more functions and checks. To be honest, I learnt about DBL_MAX only from you. At first I didn't understand why you declared variables Up and Dn in such a way, but then I figured it out. ) Thanks for the hint! I added your code variant to my library.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Vladimir, in case of restarting the Expert Advisor in OnInit() we go through all open positions...
And then the OnTradeTransaction function works, in which the price is compared and if it is the next position, the variable takes this value.
You can insert the symbol and magik checks yourself.
Hi Alexey, thank you for your assistance! I thought about MathMax and MathMin too, but I haven't had time to implement it yet. Tomorrow after work I will definitely do the code. )
Regards, Vladimir.
That's the thing, I wrote a simple Expert Advisor, and the font under the tick does not become bold. But there is someone else's Expert Advisor (I downloaded the demo version) and there I just saw how the font becomes bold. I have build 5260 too, on Windows 10.
I can confirm! I tested with an EA with "input group" and had the same issue. I think it is because the "group" names are already in bold.
Good afternoon. Can you please advise me, MT is not connecting to the network, what could be the problem?
Look in the log file: C:\Program Files\MetaTrader 5\logs
Maybe so.
Hello Alexander, I liked your code variant. I improved it for hedge account, added some more functions and checks. To be honest, I learnt about DBL_MAX only from you. At first I didn't understand why you declared variables Up and Dn in such a way, but then I figured it out. ) Thanks for the hint! I added your code variant to my library.
Regards, Vladimir.
Look in the log file: C:\Program Files\MetaTrader 5\logs
Go to the place shown in the image or press Ctrl+Shift+D.
Navigate to the location shown in the picture, or press Ctrl+Shift+D.
From what I see, your main problem was that MT is not connecting to the internet, correct?
You don't need to check the log (I only provided it based on your last post).
To see what the problem might be, go to the "Journal" tab in the terminal. There you will see what is happening (some error message).
Usually, it's related to the antivirus, firewall, etc. Check all of that.