Questions from Beginners MQL5 MT5 MetaTrader 5 - page 597

 
-Aleks-:
Write it down on a piece of paper - it's safer to put it in a file.
I can even draw it. I need an answer on the work of the EA. is it possible or not to implement a function in the bot that after clearing it would not take a new level as an average price and continued to trade from the one it had before clearing. now if the average price changes significantly after clearing, you have to shut down the bot and cover the position with your hands.
 
vovka40:
i can even draw it. i need an answer on how the EA works. is it possible or not to implement the function in the bot, so it would not take a new level as an average price after clearing, but continue trading from the one it had before clearing. now if the average price strongly changes after clearing, i have to shut the bot down and cover the position with my hands.

When clearing (not trading on the exchange) there is an over-opening of positions, which means there are three ways to go:

1. Calculate average price from history - finding originally open orders - mark when open in comments.

2. Write the information on the open order into the file, MT can do that, and respectively read the information on the average price from the file.

3. Write the average price down on a piece of paper before clearing and set it as an external variable for the Expert Advisor after the clearing.

I cannot think of any other options.

 
Thank you for your reply.
 

Re-installed version 1340 and again the terminal does not unload by itself - when the terminal is switched off...

I'm unloading manually by terminating the process in task manager...


I have tried it and it seems that MT5 core is loaded 100% like before, so my testing is even longer than MT4 core.

Previous versions were happier...


Please clarify if there is a solution for these and other problems with MT5, in the meantime I have to go to MT4 archives...


THANK YOU.

 
akarustam:

Re-installed version 1340 and again the terminal does not unload by itself - when the terminal is switched off...

I unload manually, by terminating the process in Task Manager...


And MT5 loads the CPU "a hundred percent", as before, and therefore the testing takes even longer than in MT4.

Previous versions were happier...


Please clarify if there is a solution for these and other problems with MT5, in the meantime I have to go to MT4 archives...


THANK YOU.

Thank you. Can you explain in more detail?

What is the case when the terminal does not unload: are there custom indicators and EAs on charts? In the Task Manager - is MetaEditor process (or several processes) with high load of CPU hanging around?

 
Karputov Vladimir:

Can you be more specific?

In which case the terminal does not unload: are there any custom indicators and EAs on the charts? In the task manager - is MetaEditor process (or even several processes) with high CPU load hanging around?

Here, just to check your question - I downloaded Roboforex's MT5 terminal and task manager showed 100% performance and it keeps on, there are custom indicators for four currency pairs, no Expert Advisors, MetaEditor has not loaded yet, I am waiting in hope to reduce this memory grip.

Did not wait, I turned off the terminal, but in the speed of the Task Manager news, i.e., although the terminal has not unloaded, but the speed has decreased to 52% and then, after some time, went down on its own)

I restarted the terminal and the performance "jumped" up to 100% again, I am waiting in hope the performance will slow down after I pump the quotes but it is not pumping because of the terminal overload... I'm not thinking about trading at the moment because it will be like with the quotes, it will take too long to open the positions - obviously. Quotes are pumping slowly. Turned off terminal, waiting for performance decrease (i.e. memory grabbing) in task manager. In a minute and a half it has decreased to 54-55% and in half a minute it has dropped completely.

Well of course Google Chrome is in memory with the writing of this reply.

In earlier versions of MT5 it was all enthusiastic, I've hidden all MT4 tools in archives and "decisively parted"...

THANKS FOR YOUR PARTICIPATION !

 
akarustam:

Here, just to check on your questions - I have downloaded Roboforex MT5 terminal and Task Manager showed 100% performance and keeps it that way, there are custom indicators on four currency pairs, no Expert Advisors, MetaEditors have not loaded yet, I am waiting further in the hope of reducing such a RAM hijacking.

Didn't wait, I switched off the terminal, but in Task Manager's performance the news, i.e. although the terminal was not unloaded, but the performance showed a decrease to 52% and then, after some time, went down on its own)

I restarted the terminal and the performance "jumped" up to 100% again, I am waiting in hope the performance will slow down after I pump the quotes, but it is not pumping because of the overload of the terminal... I'm not thinking about trading at the moment, because it will be like with the quotes, it will take too long to open the positions. Quotes are pumping slowly. Turned off terminal, waiting for performance decrease (i.e. memory grabbing) in task manager. In a minute and a half it has decreased to 54-55% and in half a minute it has dropped completely.

Well of course Google Chrome is in memory with the writing of this reply.

In earlier versions of MT5 it was all enthusiastic, I've hidden all MT4 tools in archives and "decisively parted"...

THANKS FOR YOUR PARTICIPATION !

Remove ALL custom indicators. At the same time in task manager check MetaEditora presence - whether it loads the processor.
 
Karputov Vladimir:
Remove ALL custom indicators. At the same time in task manager check the presence of MetaEditora - whether it loads the processor.

Removed all indicators, however no activity 100%, switched off the terminal, then after a minute 55% and almost immediately the rest of the terminal unloaded. Switched the terminal back on and here's luck at last) but how without indicators... Or should I search for indicators from the set of custom indicators ? Is it right ? I want to add more indicators, like in MT4. There are problems with indicators in the tester, but we will work separately.

MetaEditor is not in memory yet.

THANKS FOR THE DIRECTION OF SEARCHING FOR THE REASON !

Well, found the user that "loaded", everything has worked so far as before, at a joyful pace, I continue to master MT5) - very inspired. Installed MT5 of the second broker and so far also successful. With the opening of the trading week I will be testing the Expert Advisors.

THANKS FOR THE GIFT, CHEERS !

 

Hello.

Please help to take it to the external settings.

I commented out what I was trying to do because the compiler is swearing

extern string InPairs = "EURUSD, USDJPY"; // 

//===
 string symbols[] = {"EURUSD","USDJPY"};  //это во внешние
//string symbols[] = {InPairs};
 
mila.com:

Hello.

Please help to bring it to the external settings.

I commented out what I tried to do, because the compiler is swearing.

extern string Symbol_1 = "EURUSD"; // Symbol 1
extern string Symbol_2 = "USDJPY"; // Symbol 2
extern string Symbol_3 = "GBPUSD"; // Symbol 3
extern string Symbol_4 = "USDCAD"; // Symbol 4
extern string Symbol_5 = "USDSEK"; // Symbol 5
extern string Symbol_6 = "USDCHF"; // Symbol 6
extern double Weight_1 = -0.576;   // Weight 1
extern double Weight_2 = -0.136;   // Weight 2
extern double Weight_3 = -0.119;   // Weight 3
extern double Weight_4 = -0.091;   // Weight 4
extern double Weight_5 = -0.042;   // Weight 5
extern double Weight_6 = -0.036;   // Weight 6
And then use the values to form arrays.
Reason: