Preparing scalping - page 16

 

And a comment about constructor inheritance. When an object of a derived class is created, all constructors of parent classes, starting from the earliest one, are consistently called. And if constructor without parameters, you don't need to make any gestures, they will be called automatically. A constructor with parameters is another case, in the example below there are two such constructors.

class CBaseScalper// : public CObject
{
protected:
    int     m_magic;
    string  m_symbol;
public:
    CBaseScalper() {}     
    CBaseScalper(int magic) //конструктор с одним параметром
    { 
        m_symbol = Symbol();
        m_magic = magic; 
    }
    CBaseScalper(int magic, string symbol) //конструктор с двумя параметрами
    { 
        m_symbol = symbol;
        m_magic = magic; 
    }
};

When we inherit from such class, if we write constructor in this form, default constructor CBaseScalper() will be called in the base class.

class CM1PivotLevels : public CBaseScalper
{
public:
    CM1PivotLevels(int magic) // 
    {
        
    }
};

But if we need to call the constructor with parameters in a base class, we need to specify it explicitly

class CM1PivotLevels : public CBaseScalper
{
protected:
    SPivotPoint m_pointMin;
    SPivotPoint m_pointMax;
public:
    CM1PivotLevels() {}
    CM1PivotLevels(int magic) : CBaseScalper(magic) //указали конструктор базового класса явно
    {
        
    }
    CM1PivotLevels(int magic, string symbol) : CBaseScalper(magic, symbol)  //указали конструктор базового класса явно
    { 
        Print("fff");
    }
    void GetPivotLines(double lmin, double lmax)        
    {
        
    }
};
 
Yury Kirillov:

Prepared frogs and scalping don't last long.

- from the notes of a pathologist I know.

Open the dictionary of the great and powerfulhttps://www.multitran.ru/c/m.exe?l1=1&l2=2&s=prepare

In particular,

IT terms containing prepare: all forms of the word (1)

prepare for callback - prepare for callback

 
Alexey Volchanskiy:

I've hunted elephants badly.

As your fan, I demand an answer

 
Fast528:

As your fan, I demand an answer

i need groupies ))
i think he got banned from the english part, there's no reason for that.

 
Alexey Volchanskiy:

Open the dictionary of the great and powerfulhttps://www.multitran.ru/c/m.exe?l1=1&l2=2&s=prepare

In particular,

Information technology terms containing prepare: all forms of the word (1)

prepare for callback - prepare for callback

Prepare for callback from a dissected frog is fantastically cool! :-)

Dissecting

Material from Wikipedia, the free encyclopedia.

Dissection is the process of making a specimen for scientific (mainly: anatomy and biology) research, as well as dissecting material(a corpse) to study the structure of the material under study, as well as separation of the dissected organ from the surrounding tissue, separation of the organ or part of the organ from its accompanying anatomical structures.

The method allows using simple anatomical tools(scalpel, tweezers, saw, etc.) to examine the structure and relative position (topography) of organs. First used by Herophilus and Erasistratus, the method was perfected by Vesalius.

The method of dissection is used in the study of the external structure and topography of large formations. Objects seen under magnification up to 20-30 times can be described after their macro- and microscopic dissection. This method has a number of variations: dissection under a falling drop, under a layer of water. It can be supplemented by loosening connective tissue with various acids, staining the structures under study (nerves, glands), and filling tubular systems with stained oils.

https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%B5%D0%BF%D0%B0%D1%80%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5

 
Petros Shatakhtsyan:

This is what it's all about: Increasing the object (in our case the deposit) by up to 20-30 times, with the help of a scalper.

What's not to understand here.

P.S. And after that a horror film will be shown, where all this dissected object(deposit) will go to hell.

You have an optimistic scenario, I am a pessimist and see the following course of events: after dissection we get an increase of 20 times! ))))

But for the point:
Alexey Volchanskiy:

And a comment on constructor inheritance. When you create a derived class object, all constructors of parent classes, starting from the earliest one, are consistently called. And if it's a constructor without parameters, you don't have to make any gestures, they will be called automatically. A constructor with parameters is another case, in the example below there are two such constructors.

When we inherit from such class, if we write constructor in this form, default constructor CBaseScalper() will be called in the base class.

But if we need to call the constructor with parameters in a base class, we should specify it explicitly

this is all clear, let's say these questions arise only to those who have read OOP for the first time, if now we are talking about the basic principles of OOP, I am interested in the following questions

- how to inherit more than one parent class

- how to inherit from CObject the principles of linked lists, for example I want to learn how to "cross" CLabel with CObject , as a result I want to get CLabel .Prev , CLabel .Next and similar methods

 
Igor Makanu:

You have an optimistic scenario, I am a pessimist and see the following course of events: after dissection we get a 20-fold increase in the kukish! ))))

Good for you on the quick response. Barely had time to delete your post and you already have an answer :)

 
Igor Makanu:


But the point is:

If we are talking about the basic principles of OOP, then we are interested in the following questions:

- how to inherit more than one parent class

- how to inherit the principles of linked lists from CObject, for example I want to learn how to "cross" CLabel with CObject , as a result I want to get CLabel .Prev , CLabel .Next and similar methods

To develop a profitable Expert Advisor, it's not necessary to use classes, especially because many programmers don't understand them.

After all, the main goal of any developer is to create a profitable Expert Advisor, not to write beautiful programs.

This can be done later.

 
Petros Shatakhtsyan:

To develop a profitable EA, you don't have to use classes at all, especially since many programmers don't understand it.

Well, there's the question, the classes simplify the time of development of software - say, if you write software on a flow (as on the assembly line - in fact, the assembly of software)

but alas, miracles do not happen - to use the classes you need time to study them

but in terms of the standard classes from the delivery of MT, they can be used - there is a help, the classes are written in a good programming style, and quite easy to read

 
Igor Makanu:

Well, that's the question, classes simplify software development time - let's say, if you write software on a flow (like on an assembly line - essentially assembling software)

but alas, miracles do not happen - to use the classes you need time to study them

but in terms of the standard classes from mt supply, they can be used - there is a help, the classes are written in a good programming style, and are quite easy to read

I'm not talking about the standard MQL classes, they simplify the code a lot. And you don't need to know OOP at all to use them.

Reason: