Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1591

 
Alexey Viktorov #:

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.

 
_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.


 
Good afternoon. Could you please advise, MT is not connecting to the network, what could be the problem?
 
Игорь Любченко #:
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

 
Aleksandr Slavskii #:

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.

 
Putnik #:

Look in the log file: C:\Program Files\MetaTrader 5\logs

I have no such thing!
Files:
 
Игорь Любченко #I have no such thing!

Go to the place shown in the image or press Ctrl+Shift+D.


 
Miguel Angel Vico Alba #:

Navigate to the location shown in the picture, or press Ctrl+Shift+D.


What do I need to do there?
 
Игорь Любченко #What do I need to do there?

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.