Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 972

 
Alexey Viktorov:

Alexander, it's been discussed a hundred times that the EA should not be unloaded under any pretext.

Sorry, I didn't know.

 

I can't take a screenshot with the function

ChartScreenShot(ChartID(),"photo",1500,1000,ALIGN_RIGHT);

... in none of the formats listed in the help (GIF, PNG or BMP)



... and for this reason I cannot open it in Adobe

 

Greetings all. I want to solve the problem - to write an indicator that is based on two MA, for example, MA 10 and MA 15, by these MA take the RSI also with different periods, such as RSI 30 and RSI 50, and displays the result in the chart as two lines of RSI. The file indicator is attached, it does not give errors and warnings when compiled, but the schedule does not show anything. Please advise what is the error(s). Thank you in advance for your help.

Files:
 
Alexandr Sokolov:

I can't take a screenshot with the function

... in none of the formats listed in the help (GIF, PNG or BMP)



... and for this reason I cannot open it in Adobe

Add an extension to the file name, separated by a dot

 
Artyom Trishkin:

Add an extension to the file name, separated by a dot

How easy it is!) Thank you very much!

 
petya:

Greetings all. I want to solve the problem - to write an indicator that is based on two MA, for example, MA 10 and MA 15, by these MA take the RSI also with different periods, such as RSI 30 and RSI 50, and displays the result in the chart as two lines of RSI. The file indicator is attached, it does not give errors and warnings when compiled, but the schedule does not show anything. Please advise what is the error(s). Thanks in advance for the help.

Why do you use return without getting to the end? If there is a condition then yes, e.g.

if(...) return(...);
 
Alexandr Sokolov:

Why do you use return before you get to the end? If there is a condition then yes, for example

do you mean this?

I left it at the end.

but nothing has changed, alas.

 

Hello!

Made a function (attached in txt).
This function returns 0-trend down 1-trend up based on Japanese Heiken Ashi candles etc.
(depending on selected mode). So, the function works as it should, except for the section if(filtr_==full_color). i.e.
, when it is necessary to "cross" both Japanese candlesticks and Heiken Ashi for a signal. The function "sees" as if only Japanese candles.

Please HELP me if someone can, please tell me the secret here. Is the function written correctly?

Files:
iqvi6.txt  3 kb
 

How to create a pointer to an object inside an element of a class, which is also a class


class a{
        a*pointA = a; 
        int a;
};

class b{
public:
        class a;
};


b*pointB = b; //на класс а указатель
a*pointA = b.a;  // указатель на класс а внутри b   // !!! не работает


Is this possible?

 
Sergey Likho:

How to create a pointer to an object inside an element of a class, which is also a class



Is this possible?

I guess so:

class A
{
public:
   A                 *a;
                     A() { a = GetPointer(this); }

};

class B
{
public:
   A                 a;

}
Reason: