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
ArrayPrint - similar.
Here is an example https://www.mql5.com/ru/forum/160673/page2#comment_3827986
This is no different from what you yourself wrote above.
ArrayPrint has many more input parameters, though. The last parameter flags is of interest.
Generally speaking, as far as the tester hangs up. I have been able to identify several functions that cause it. The most common is Comment.
Here try to run such an indicator in the tester:
int OnCalculate(const int rates_total, const int prev_calculated, const int begin, const double &price[])
{
Comment("OnCalculate");
return rates_total;
}
Speed just not the maximum, so that the test takes some time, in the process of which hangs. True, not always - I do not understand what it depends on, whether it's mouse movements or something else. In general, you can test a few times, it should hang.
Generally speaking, as far as the tester hangs up. I have been able to identify several functions that cause it. The most common is Comment.
Here try to run such an indicator in the tester:
int OnCalculate(const int rates_total, const int prev_calculated, const int begin, const double &price[])
{
Comment("OnCalculate");
return rates_total;
}
Speed just not the maximum, so that the test takes some time, in the process of which hangs. True, not always - I do not understand what it depends on, whether it's mouse movements or something else. In general you can test it several times, it should hang.
With three test speeds:
In general, more precisely provide evidence of what is your "tester freeze".
Added: and more precisely describe the situation: version, build, server, symbol, timeframe, test mode...
Added: shit, my editor and tester got hung up. Tick generation mode was "All ticks".
Generally speaking, as far as the tester hangs up. I have been able to identify several functions that cause it. The most common is Comment.
Here try to run such an indicator in the tester:
int OnCalculate(const int rates_total, const int prev_calculated, const int begin, const double &price[])
{
Comment("OnCalculate");
return rates_total;
}
Speed just not the maximum, so that the test takes some time, in the process of which hangs. True, not always - I do not understand what it depends on, whether it's mouse movements or something else. In general you can test it several times, it should hang.
What's up here:
?
Indeed:
//| Indicator_Test.mq5 |
//| Copyright 2012, CompanyName |
//| http://www.companyname.net |
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_plots 0
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int OnCalculate (const int rates_total, // размер массива price[]
const int prev_calculated, // обработано баров на предыдущем вызове
const int begin, // откуда начинаются значимые данные
const double& price[] // массив для расчета
)
{
Comment("OnCalculate");
return (rates_total);
}
Testing at maximum speed, "All ticks" tick generation mode - the tester hangs up. Hanging means the following:
If you comment out the comment line, everything is tested.
Testing at maximum speed, "All ticks" tick generation mode - the tester hangs up.
It does not depend on speed, mode or timeframe. It may freeze in any case.
By the way, some other functions, e.g. ChartGetInteger(0, CHART_WIDTH_IN_BARS) lead also to hangs in my program. But I can't reproduce an isolated example with them. However, I think Comment will suffice.
What is this?
HistoryCenter delete old files from C:\Program Files\BCS Broker MetaTrader 5 Terminal\bases\FxPro-ECN\history\GBPUSD, last access time 2016.04.12 10:37
HistoryCenter delete old files from C:\Program Files\BCS Broker MetaTrader 5 Terminal\bases\FxPro-ECN\history\USDCHF, last access time 2016.04.12 10:37
HistoryCenter delete old files from C:\Program Files\BCS Broker MetaTrader 5 Terminal\bases\FxPro-ECN\history\USDJPY, last access time 2016.04.12 10:37
Please change MqlTick to
{
datetime time; // Время последнего обновления цен
double bid; // Текущая цена Bid
double ask; // Текущая цена Ask
double last; // Текущая цена последней сделки (Last)
ulong volume; // Объем для текущей цены Last
datetime_msc time_msc; // Время последнего обновления цен в миллисекундах
uint flags // Флаги тиков
};