Errors, bugs, questions - page 1813

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
You need to clear cookies for www.mql5.com.
On chrome 56.0.2924.87 the flight is fine, both with and without manual refresh of the review page.
Can you tell me how?
But in Chrome you can do it like this:
Press F12 on www.mql5.com => in dashboard go to Application => Cookies => click on cookies => Clear all from...
Google will help.
But in Chrome you can do it like this:
Press F12 while browsing www.mql5.com => in dashboard go to Application => Cookies => click on cookies => Clear all from...
There isn't one.
It's playing. Wrote your code into script, it gave correct value (1001199) when run in debug mode, but if I compile release and run it from tree in MT5, it gave 11199 stably. Was able to localize.
This is really a compiler bug, write to servicedesk.
There isn't one.
Please advise
MT4 started to weigh 1.8 Gbytes (RAM). It ate all the UPU, the second terminal can't be switched on properly. Any suggestions on how to "clean" the RAM from MT?
Please advise
MT4 started to weigh 1.8 Gbytes (RAM). It ate all the UPU, the second terminal can't be switched on properly. Any suggestions on how to "clean" the RAM from MT?
Have you tried restarting the terminal?
The memory is released if I reduce the number of bars on the chart, but I need to reboot afterwards.
Have you tried restarting the terminal?
The memory is freed up if you reduce the number of bars on the chart, but you need to restart then.
Error in determining indicator parameter type ENUM_DATATYPE.
I am running a test indicator. In the input parameters each parameter has a unique type:
#property indicator_plots 0
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
input bool inpBool = false; //1
input char inpChar = 0; //2
input uchar inpUChar = 0; //3
input short inpShort = 0; //4
input ushort inpUShort=0; //5
input color inpColor=clrWhite; //6
input int inpInt=0; //7
input uint inpUInt=0; //8
input datetime inpDatetime=0; //9
input long inpLong=0; //10
input ulong inpULong = 0; //11
input float inpFloat = 0.0; //12
input double inpDouble = 0.0; //13
input string inpString = ""; //14
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
IndicatorSetString(INDICATOR_SHORTNAME,"DATATYPE");
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
return(rates_total);
}
//+------------------------------------------------------------------+
Next, I search it through the script and do the unsetting of its parameters type:
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//--- Проверяем количество аналогичных индикаторов на всех открытых окнах
long id=ChartFirst();
int indicatorsTotal=0;
int windowsTotal=0;
//---
int ctr=0;
//---
do
{
windowsTotal=(int)ChartGetInteger(id,CHART_WINDOWS_TOTAL);
for(int i=0; i<windowsTotal; i++)
{
indicatorsTotal=ChartIndicatorsTotal(id,i);
for(int j=0; j<indicatorsTotal; j++)
{
//Print( __FUNCTION__,": Имя индикатора: "+ChartIndicatorName( id, i, j ) );
//---
string shortName=ChartIndicatorName(id,i,j);
if(StringFind(shortName,"DATATYPE")<0)
continue;
else
{
//--- получим хэндл индикатора
int handle=ChartIndicatorGet(id,i,shortName);
//---
if(handle==INVALID_HANDLE) // Если хэндл не получен
{
Print(__FUNCTION__,": ОШИБКА #",GetLastError(),": хэндл индикатора "+shortName+" не получен!");
return; // Ошибка! Переходим к следующему индикатору
}
//--- Получаем параметры индикатора
MqlParam parameters[]; // Массив-приемник параметров
ENUM_INDICATOR indicator_type; // Тип индикатора
//--- Получение..
int params=IndicatorParameters(handle,indicator_type,parameters);
//---
for(int p=1; p<params; p++)
Print(__FUNCTION__,": p#",p,": type = ",EnumToString(parameters[p].type));
}
}
}
}
while(( id=ChartNext(id))>=0);
}
In the output I get:
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#2: type = TYPE_CHAR
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#3: type = TYPE_UCHAR
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#4: type = TYPE_SHORT
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#5: type = TYPE_USHORT
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#6: type = TYPE_UINT
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#7: type = TYPE_INT
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#8: type = TYPE_UINT
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#9: type = TYPE_LONG
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#10: type = TYPE_LONG
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#11: type = TYPE_ULONG
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#12: type = TYPE_DOUBLE
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#13: type = TYPE_DOUBLE
2017.02.20 09:08:58.147 test_DATATYPE (BR-3.17,M1) OnStart: p#14: type = TYPE_STRING
I can see that instead of TYPE_COLOR(#6) type it shows TYPE_UINT type, instead of TYPE_DATETIME type (#9) it shows TYPE_LONG type, instead of TYPE_FLOAT type (#12) it shows TYPE_DOUBLE type. Although TYPE_COLOR, TYPE_DATETIME and TYPE_FLOAT types are described in the enumeration and should have their own values!
Servicedesk#1677120