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
Let's go to servicedesk.
Please clarify how exactly were the services disconnected? Have you deleted (frozen) the services? Please attach logs of the problem agents.
The proxy settings in your logs are somewhat strange. Did you write the proxy settings in your agent configs? Please attach the common.ini of your manager.
It turns out I looked at the logs for yesterday...
Everything is fine.
Next code:
Outputs:
2011.12.05 22:01:28 RectLabel (EURUSD,H1) pos = {12, 176314750}
2011.12.05 22:01:28 RectLabel (EURUSD,H1) other = {123, 456}
So, initialization list didn't work, there is rubbish in the structure. Is this a bug or not?
//| testDeinit.mq5 |
//| Copyright 2011, MetaQuotes Software Corp. |
//| http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2011, MetaQuotes Software Corp."
#property link "http://www.mql5.com"
#property version "1.00"
//+------------------------------------------------------------------+
class CTest_Expert
{
public:
CTest_Expert();
~CTest_Expert() { Deinit(); }
void Processing();
void Deinit();
bool StartTimer(int nCounSeconds);
void StopTimer();
string Exp_Symbol;
};
CTest_Expert arSymbols[];
//+------------------------------------------------------------------+
//| Конструктор |
//+------------------------------------------------------------------+
CTest_Expert::CTest_Expert()
{
}
//+------------------------------------------------------------------+
//| Функция удаления динамических объектов |
//+------------------------------------------------------------------+
void CTest_Expert::Deinit()
{
Print("Эксперт выгружен с пары "+Exp_Symbol);
Comment("");
}
//+------------------------------------------------------------------+
//|Инициализация таймера |
//+------------------------------------------------------------------+
bool CTest_Expert::StartTimer(int nCountSeconds)
{
return(EventSetTimer(nCountSeconds));
}
//+------------------------------------------------------------------+
//|Уничтожение таймера |
//+------------------------------------------------------------------+
void CTest_Expert::StopTimer()
{
EventKillTimer();
}
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
ArrayResize(arSymbols, 5);
arSymbols[0].Exp_Symbol="0";
arSymbols[1].Exp_Symbol="1";
arSymbols[2].Exp_Symbol="2";
arSymbols[3].Exp_Symbol="3";
arSymbols[4].Exp_Symbol="4";
return(0);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
int nSize=ArraySize(arSymbols);
Print("nSize = " + IntegerToString(nSize));
for(int i=0;i<nSize;i++)
{
Print("-------"+IntegerToString(i)+"--------");
arSymbols[i].Deinit();
Print("---------------");
}
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//---
}
//+------------------------------------------------------------------+
Result
2011.12.06 16:59:52 testDeinit (EURUSD,M5) 14:00:00 PM The Expert Advisor has been unloaded from pair 4
2011.12.06 16:59:52 testDeinit (EURUSD,M5) 14:02:00 PM testDeinit (EURUSD,M5) E.T.A. has been unloaded from pair 3
2011.12.06 16:59:52 testDeinit (EURUSD,M5) Downloaded from pair 2
2011.12.06 16:59:52 testDeinit (EURUSD,M5) Downloaded from pair 1
2011.12.06 16:59:52 testDeinit (EURUSD,M5) Ekspert unloaded from pair 0
2011.12.06 16:59:52 testDeinit (EURUSD,M5) ---------------
2011.12.06 16:59:52 testDeinit (EURUSD,M5) 14
2011.12.06 16:59:52 testDeinit (EURUSD,M5) -------4--------
2011.12.06 16:59:52 testDeinit (EURUSD,M5) ---------------
2011.12.06 16:59:51 testDeinit (EURUSD,M5) The expert is unloaded from pair 3
2011.12.06 16:59:51 testDeinit (EURUSD,M5) -------3--------
2011.12.06 16:59:51 testDeinit (EURUSD,M5) ---------------
2011.12.06 16:59:51 testDeinit (EURUSD,M5) The expert has been unloaded from pair 2
2011.12.06 16:59:51 testDeinit (EURUSD,M5) -------2--------
2011.12.06 16:59:51 testDeinit (EURUSD,M5) ---------------
2011.12.06 16:59:51 testDeinit (EURUSD,M5) The expert is unloaded from pair 1
2011.12.06 16:59:51 testDeinit (EURUSD,M5) -------1--------
2011.12.06 16:59:51 testDeinit (EURUSD,M5) ---------------
2011.12.06 16:59:51 testDeinit (EURUSD,M5) The expert is unloaded from pair 0
2011.12.06 16:59:51 testDeinit (EURUSD,M5) -------0--------
2011.12.06 16:59:51 testDeinit (EURUSD,M5) nSize = 5
I can't understand the deinitialisation. Why does the message "Expert unloaded from pair ..." happen twice?
CTest_Expert arSymbols[];
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
int nSize=ArraySize(arSymbols);
Print("nSize = " + IntegerToString(nSize));
for(int i=0;i<nSize;i++)
{
Print("-------"+IntegerToString(i)+"--------");
arSymbols[i].Deinit();
Print("---------------");
}
}
This is a bug in the compiler - it didn't generate an error saying that a structure cannot be initialized this way (without copy constructor). Fixed. Thanks for the post.
Uh, no. More details came up here.
In Help it says that simple structures may be copied as variables of simple types:
Then why can't it be done in the initialization list? I don't want to explicitly define constructors, so as not to lose the initialization method used above.
Not critical in principle, just want to hear the final comment.
I run the terminal with 12 windows open, it eats 325 MB of RAM.
Running the multi-currency Expert Advisor, terminal eats 990 Mb of memory. The Expert Advisor views 5-minute bars for the last 48 hours + uses "fractal" indicator. If I run only to trade on one symbol, it takes 400 Mb. Is this memory consumption normal when working with 12 symbols?
I am running a multi-currency Expert Advisor, the terminal eats 990 Mb of RAM. The expert looks through 5-minute bars for the last 48 hours + uses "fractal" indicator. If I run only to trade on one symbol, it takes 400 Mb. Is this memory consumption normal when working with 12 symbols?
Check out the article Principles of Economical Recalculation of Indicators
I forgot to mention the fractal is a standard indicator + all calculations take place every five minutes
How do developers know what you are doing and how you are doing it?
Try to clearly formulate and explain the root of the problem in your code.
Describe the problem in a technical way.
How can developers know what you are doing and how you are doing it?
Try to clearly formulate and highlight the essence of the problem in your code. at what conditions consumption starts to grow, make and show the log printout.
Describe the problem in a technical way.