Errors, bugs, questions - page 1383

 
Tatiana Zyrianova:
Hello. According to the rules of this site, can I make EAs and other experts not through the freelance section, but directly, communicating with the customer, and pay directly from the customer's account, to the account of the performer?
No.
 

Calling a method with a null pointer

class A {
public:
        virtual void f() const { Print(__FUNCSIG__); }
        virtual void g()       { f(); }
	static  void h()       { Print(__FUNCSIG__); }
};
void OnStart()
{
        A *a = NULL;
        a.f(); //нет ошибки при выполнении (!)
        a.g(); //invalid pointer access
        a.h(); //нормально
}
In fact, A::f() in this particular case behaves like a static
 
A100:

Calling a method with a null pointer

Actually A::f() in this particular case behaves as static
Thanks, we'll see.
 

The example of publishing a news on my wall using webrequest given in the doc does not work. 10 days ago the same example worked.

authorisation was successful, it sends the file (picture), but when I try to send the text the site returns a 403 error (banned).

maybe something has been changed with the headers ?

I'm writing an article on this topic - would like an answer as soon as possible.

WebRequest - Документация на MQL4
  • docs.mql4.com
WebRequest - Документация на MQL4
 

The WindowExpertName() function now returns the full EA name along with the extension, previously only the name !!!!!!!!!!

 

Hello,

Can you tell me what the code error is, the compiler prints: 'Cl' - the declaration is not allowed for the current scope test.mq4 25 8

class Cl

{

public:

int x;

int y;

int func();

};

int Cl::func()

{

return(x+y);

}

Cl z;

z.x=1;

z.y=2;

int y=0;

y=z.func();

Print(y);

 
Vasua:

Hello,

Could you tell me what the code error is, the compiler prints: 'Cl' - the declaration is not allowed for the current scope test.mq4 25 8

The code fragment you've shown compiles without any problems as long as the main part (after the class declaration) exists in some function.

You can't just type executable commands "in the air" in MQL.

Read more about it here:

https://www.mql5.com/ru/docs/runtime/running

Документация по MQL5: Программы MQL5 / Выполнение программ
Документация по MQL5: Программы MQL5 / Выполнение программ
  • www.mql5.com
Программы MQL5 / Выполнение программ - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Hello! advise how to make the opening of an order in the ADVISOR by time not 08:00 etc, but at 08:30, I have tried everything, I have a timer input TimeFr=240; which when changed in the test does not open the order
 
Romal001:
Hello! Please advise how to make the opening of an order in the TEST not at 08:00, etc., but at 08:30. I have tried everything. I have a timer input TimeFr=240; which, when changed on the test does not open the order

The timer, in this case, is a bad solution. In the tester, the timers are a real bummer.

If I understand correctly, it comes down to the simplest thing.

At every tick in the EA, using TimeCurrent(), we need to get an answer to the question "Is now the time to place the order?" and...

 
Romal001:
Hello, Could you advise me how to open an order in the ADVISOR by time not 08:00, etc., but at 08:30? I tried everything. I have a timer input int TimeFr=240; that does not open an order when changed in the test

the event = open time is done, this event is analysed as finding this event in the time fork and plus, after opening an order, the open flag has to be set and added to further analysis to exclude reopening of the order...

For example, the model of events can be done on the <queue> container...

Reason: