Errors, bugs, questions - page 627

 
Druide:

Downloading 2 dlls is kernel32.dll and user32.dll by importing

OS windows 7 home basic, about terminal Version: 5.00 Build 574. From another EA loaded exactly the same functions from the same libraries, the same way and everything works fine as expected.

Probably easier to send an application to the SD + EA code.
 

When trying to set a pending order in OHLC mode on M1 and Opening price only, very often error 4501 - ERR_GLOBALVARIABLE_NOT_FOUND - Client terminal global variable not found. In All ticks mode the error doesn't occur. The ResetLastError() function is used before the operation and no other operations are performed. The function from the OrderOpen() standard library is used.

bool CTrade::OrderOpen(const string symbol,ENUM_ORDER_TYPE order_type,double volume,double limit_price,
                       double price,double sl,double tp,
                       ENUM_ORDER_TYPE_TIME type_time,datetime expiration,const string comment)
  {
   ...
  }
Has anyone encountered something like this? What may be the reason?

 
tol64:

...

Has anyone experienced anything like this? What could be the cause?
Hasty question. Problem found. The issue is resolved.
 
How to find the desired element of a Mqlrates array with only the desired time. What function can I use to do the search?
Документация по MQL5: Основы языка / Переменные
Документация по MQL5: Основы языка / Переменные
  • www.mql5.com
Основы языка / Переменные - Документация по MQL5
 

Hello, trying to create a custom indicator using class CiCustom: NumParams gives 0, and ParamDouble gives DBL_MAX

#include <Indicators\Custom.mqh>        
CiCustom ASI;                           //Класс - Accumulation Swing Index
MqlParam mparam[];                      //Структура входных параметров индикатора
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
  string Megasymbol=Symbol();
//---
  int hASI=-1;
  ArrayResize(mparam,2);
  mparam[0].type=TYPE_STRING;
  mparam[0].string_value="Examples\\ASI";
  mparam[1].type=TYPE_DOUBLE;
  mparam[1].double_value=300.0;
  ASI.Create(Megasymbol,PERIOD_D1,IND_CUSTOM,2,mparam);
  hASI=ASI.Handle();
  if(hASI<0)
    {
    Alert("Ошибка при создании индикатора iASI",GetLastError());
    }
  else
    {
    ASI.Refresh();
    Alert(ASI.NumParams());
    Alert(ASI.ParamDouble(1));
    }
  ASI.FullRelease(hASI);
  }
 
kirill190982:

Hello, trying to create a custom indicator with class CiCustom: NumParams gives 0, and ParamDouble gives DBL_MAX

Sorry. A mistake in the library. I'll fix it on Monday. Will be available in the next build.

Thanks for the message.

 

The array in the file is not being read correctly

double mas[100][4];
int handle=FileOpen("data4.csv",FILE_READ|FILE_CSV,';');
int numb=FileReadArray(handle,mas); 
FileClose(handle);

file of the following form

1.3219;1.3219;1.3219;1.3219
1.3219; 1.3219;1.3219;1.3219


This is nonsense instead of the correct values

 
openlive:

It's just nonsense instead of the right values

Which one?
 
alexvd:
Which one?
0;0;0;0
0;1.379623203893203 e-306;4.450635783687821 e-308;2.225128183749455 e-307
7.56598449186023 e-307;5.632348362590211 e-322;0;0
0;0;0;0
0;0;0;0
0;0;0;0
0;0;0;0
0;0;0;0
0;0;0;0
0;0;0;0
0;0;0;0
0;0;0;0
0;0;0;0
0;1.424204808815986 e-306;2.047131780433999 e-306;1.02356521192437 e-306
1.246111302895426 e-306;1.379613017577759 e-306;1.112606191683217 e-306;8.456027614896427 e-307
1.613274462443446 e-307;4.672933513116508 e-307;2.201818866726536 e-317;0
0;0;0;0
вот такое вот 
FileReadArray(handle,mas);returns 0
 
openlive:

The array in the file is not being read correctly

file of the following form


This is nonsense instead of the right values

Is the file Unicode or ANSI? If the latter, you must explicitly set the FILE_ANSI flag when opening the file
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы ввода/вывода / Флаги открытия файлов - Документация по MQL5
Reason: