Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 279

 
You can do it, the men don't mind.)
 
oDin48:
Can you guys tell me a tip? I have a rather complicated indicator, for example, can I use a global variable from the indicator to send a signal to the Expert Advisor to make a deal? Or should I disassemble the indicator by bones and paste it into the Expert Advisor's code?
And the guys may advise to use iCustom() to receive data from indicator buffers (if it draws through them).
 
Barbarian:
I asked a specific question, not a way out :) I know the way out of my situation, I am interested - is it the same for me alone or not. If I'm the only one, then look for the problem in the browser, if I'm not the only one, then I do not need to look for a problem - everything works as it did before.

The browser has nothing to do with it. The browser only affects how the resource will look like. The way it searches is irrelevant to the browser.
 
Barbarian:
Am I the only one who has stopped searching for mql4.com or everyone? For example, I type in a search function from Documentation, but the answer is that nothing was found, although it worked before.


Yes the search is not working, people have asked. I did it again. There are no results. Browser has nothing to do with it. It's just something that got knocked out.
 
Zhunko:

Try calling the function from the one that is not loaded. It will load right away.

The mechanism is described here.


Regarding this topic, it only says that when executing an mq4 program, late binding is used to import functions. It is explained that until the appropriate function is called from the appropriate library, this library will not be loaded . Everything is clear here.

But, again, why would I call a function at the beginning of the EA? What is the point? I've never call any functions from libraries, but 2 libraries somehow miraculously get loaded.

Here's the beginning of the owl:

#property copyright "hoz"
#property link      ""

#include <hoz_Base@Include.mqh>
#include <hoz_Base@ListOfFunc.mqh>
#include <hoz_MakeListOfInstruments@Include.mqh>
#include <hoz_MakeListOfInstruments@ListOfFunc.mqh>

Each library I have:

1. the Includnik, which has a list of variables used

2. the Includnik, where the imported functions are listed.

3. The library itself with the functions.

Let me explain how I have it with an example, libraries for working with traded instruments.

1. Includnik with declared variables:

//+---------------------------------------------------------------------------------------------------------------------------------------+
//|                                                                                                 hoz_MakeListOfInstruments@Include.mqh |
//|                                                                                                                                   hoz |
//|                                                                                                                                       |
//+---------------------------------------------------------------------------------------------------------------------------------------+

#property copyright "hoz"
#property link      ""

//+---------------------------------------------------------------------------------------------------------------------------------------+
//|                                       ЗАГОЛОВОЧНЫЙ ФАЙЛ ДЛЯ БИБЛИОТЕКИ hoz_MakeListOfInstruments@library.                             |
//+---------------------------------------------------------------------------------------------------------------------------------------+

// =====================================================  Внешние параметры библиотеки  ==================================================+
extern string Make_List_Of_Symbols = " ______ Make List Of Symbols ______ ";
extern string i_ListOfWorkingSymbol = "";           // Список рабочих инструментов
extern string i_BASECurrencyList = "USD,EUR,JPY,CHF,GBP,CAD,AUD";
extern string i_BADCurrencyList = "NZD";
extern int    i_MAXSpread = 50;                     // MAX spread
//+=======================================================================================================================================+
//                                                          ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ                                                         |
//+=======================================================================================================================================+
string bs_LibName = "hoz_MakeListOfInstruments@Library";
int    bi_CntOfSMB;                  // Количество рабочих инструментов
string bsa_WorkingSMB[];             // Массив рабочих инструментов

2. The library itself:

//+---------------------------------------------------------------------------------------------------------------------------------------+
//|                                                                                                 hoz_MakeListOfInstruments@Library.mq4 |
//|                                                                                                                                   hoz |
//|                                                                                                                                       |
//+---------------------------------------------------------------------------------------------------------------------------------------+

#property copyright "hoz"
#property link      ""
#property library

//+=======================================================================================================================================+
//|                                           БИБЛИОТЕКА СОЗДАНИЯ СПИСКА ТОРГУЕМЫХ ИНСТРУМЕНТОВ                                           |
//+=======================================================================================================================================+
// ================================================== Включения и импорт внешних модулей =================================================+
#include <hoz_Base@Include.mqh>
#include <hoz_MakeListOfInstruments@Include.mqh>
#import "hoz_Base@Library@ex4"
    string fCreat_StrFromArray (string fsa_Array[], string fs_Delimiter = ",");
    int fGet_StrArrayFromLine (string fs_List, string& fsa_OUT[], string fs_Delimiter = ",");
    void fInitializeArray_STR (string& fsa_Array[], string fs_Value = "");
#import
//+---
#import "hoz_LoggingToAnyWere@library.ex4"
    void fPrint (string fs_Text);
#import
//+---
#import "hoz_HandlingWithErrorS@library.ex4"
    string fErrorToString (int fi_Error);
#import
//+=======================================================================================================================================+
//===================================================   Перечень функций библиотеки   ====================================================|
//+=======================================================================================================================================+
//+---------------------------------------------------------------------------------------------------------------------------------------+
//| 0.0 Инициализация модуля.                                                                                                             |
//+---  Функции модуля. ------------------------------------------------------------------------------------------------------------------+
//| 1.1 Создаём список рабочих инструментов и заносим их в массив.                                                                        |
//| 1.2 Функция возвращает список доступных символов.                                                                                     |
//| 1.3 Проверяем на котируемость у ДЦ введённых символов.                                                                                      |
//| 1.4 Проверка переданных в функцию внешних параметров.                                                                                 |
//+---------------------------------------------------------------------------------------------------------------------------------------+

//+=======================================================================================================================================+
//|                                                      ИНИЦИАЛИЗАЦИЯ МОДУЛЯ.                                                            |
//+=======================================================================================================================================+
void fInitListOfInstrumentsMaking()
{
    //---- Создаём список рабочих инструментов и заносим их в массив
    bi_CntOfSMB = fCreat_WorkingSymbolsArray (bsa_WorkingSMB, i_ListOfWorkingSymbol, i_BASECurrencyList, i_BADCurrencyList, i_MAXSpread);
    //---- Заново создаём список рабочих инструментов
    bs_SymbolList = fCreat_StrFromArray (bsa_WorkingSMB, ",");
    Print (bi_CntOfSMB, " : ", bs_SymbolList);
    //---- Производим проверку передаваемых в библиотеку значений
    if (!fCheck_ExternParameters())
    {
        Alert ("Проверьте параметры библиотеки hoz_MakeListOfInstruments !!!");
        return;
    }
    //---- Контролируем возможные ошибки
         fPrint (StringConcatenate ("fCheck_ExternParameters => ", fErrorToString (bi_Err)));
//----
}
/*
           ДРУГИЕ ФУНКЦИИ...
*/
// 1.4 Проверка переданных в функцию внешних параметров. ==================================================================================
bool fCheck_ExternParameters()
{
    bi_Err = -1;
//----
    if (i_MAXSpread < 0)
    {
        Print ("Поставьте MAX_Spread >= 0 !!!");
        return (false);
    }
    //---- Контролируем возможные ошибки
         fPrint (StringConcatenate ("fCheck_ExternParameters => ", fErrorToString (bi_Err)));
//----
     return (true);
}

3. The list of functions to be imported:

//+---------------------------------------------------------------------------------------------------------------------------------------+
//|                                                                                              hoz_MakeListOfInstruments@ListOfFunc.mqh |
//|                                                                                                                                   hoz |
//|                                                                                                                                       |
//+---------------------------------------------------------------------------------------------------------------------------------------+

#property copyright "hoz"
#property link      ""

//+---------------------------------------------------------------------------------------------------------------------------------------+
//| Список функций библиотеки hoz_MakeListOfInstruments@Library.ex4                                                                       |
//+---------------------------------------------------------------------------------------------------------------------------------------+
#import "hoz_MakeListOfInstruments@Library.ex4"
    void fInitListOfInstrumentsMaking();
    int  fCreat_WorkingSymbolsArray (string& fsa_SMB[], string fs_ListOfWorkingSymbol, string fs_BaseCurrency, string fs_BadCurrency, int fi_MAXspread = 0, string fs_Delimiter = ",");
    int  fListOfSymbols (string& fs_Symbols[], bool fb_Looking);
    int  fCheck_PresenceSMBInMarket (string& fsa_WorkingSMB[]);
    bool fCheck_ExternParameters();
#import

It turns out that when importing libraries:

#include <hoz_MakeListOfInstruments@ListOfFunc.mqh>

The functions must be loaded and the library itself must be called, right?

I've structured it right, haven't I?

 
Zhunko:

Of course you are! Thought I'd put it all out there? Like I'm just trying to impress you :-)

Then, why neutered? Everything will work. Even the class to control MT4. There just won't be any classes.

Library (DLL) is a wrapper for class methods. You don't need it to use the class.

====================

Fantasies again... The position of an abused child. You didn't give me a toy. Now I'm the bad guy. I told you, I'm not pushing it. It's easier for me not to give than to give. It's more comfortable. Less responsibility. Take it for what it is.

All the more reason:

Why this dialogue of ours?


Oh, I'm so turned on. And you got turned on after you openly declared that I don't need these sources. I don't need them, I don't see any value in them, they are a matter of great pride for you, Vadimi, and that's all. I remind you again - it's just funny how you're clinging to them... and carrying them high above your head like a banner.
 
Zhunko:

Why this dialogue of ours?


What an interesting question. And you think I need your sources?

 
Zhunko:

I'm not offended by anyone. It's okay.

Dima keeps bringing me out in the open... :-))

Repeatedly stated - I agree with all his fantasies about me. But he won't stop.

Everyone is entitled to every fantasy.


This is the most shocking thing - Vadim Junko will accuse others of fantasies. It's actually worthy of the annals, but not everyone is on the subject and not everyone will understand the joke. Not only worthy of the annals, worthy of being chiseled in granite.

 
Good evening, is it possible to use more than one Medgie in one EA?
 
novator:
Good evening, is it possible to use more than one Medgie in one EA?

Good evening.

Yes, it is.