Nauris Zukas: Good afternoon! One broker is constantly (once or twice a day) MarketInfo() flies off, gets value 0 ( specifically MODE_MARGINREQUIRED). It's kind of normal, but at the same time there is no attempt to reach the iCustom() indicator (connected through a resource). Even after MarketInfo() receives data, iCustom() remains silent. Only restarting the terminal helps. How to access the indicator without restarting the terminal, any ideas? Can the indicator disappear from a resource somewhere?
After a month of all sorts of tests I can already say quite confidently that there is a problem, only I can't tell if the resource is missing or if iCustom() is broken. The problem is detected only at one broker, which is very unpleasant for real trading. Before you throw around words like MT4 or MQL it's a bug, I will give you the latest and simplest code and test execution. I will also post the results. Maybe there is a bug in my code, that I don't know about. Once again I remind you that the problem is only detected with one broker (you will see in the logbook).
007:13:36.398'21035322': login datacenter on RoboForex-Pro through DataCenter Europe #3 (ping: 53.56 ms)
007:13:36.802'21035322': previous successful authorization performed from87.110.24.238109:12:42.982'21035322': ping failed
009:12:43.690'21035322': login on RoboForex-Pro through DataCenter Europe #3 (ping: 53.56 ms)
009:12:44.907'21035322': login datacenter on RoboForex-Pro through DataCenter Europe #3 (ping: 53.56 ms)
009:12:45.317'21035322': previous successful authorization performed from87.110.24.238109:12:58.925'21035322': datacenter connecting failed [6]
009:12:59.475'21035322': login on RoboForex-Pro through DataCenter Europe #3 (ping: 53.56 ms)
009:13:02.919'21035322': ping to current access point DataCenter Europe #3is48.62 ms
009:13:59.826'21035322': login datacenter on RoboForex-Pro
009:14:05.639'21035322': login on RoboForex-Pro through DataCenter Europe #5 (ping: 68.86 ms)
009:14:06.482'21035322': login datacenter on RoboForex-Pro through DataCenter Europe #5 (ping: 68.86 ms)
009:14:07.048'21035322': previous successful authorization performed from87.110.24.238009:14:17.958'21035322': ping to current access point DataCenter Europe #5is89.81 ms
111:12:31.864'21035322': ping failed
111:12:31.864'21035322': datacenter connecting failed [6]
After a month of all sorts of tests I can already say quite confidently that there is a problem, only I can't tell if the resource is missing or if iCustom() is broken. The problem is detected only at one broker, which is very unpleasant for real trading. Before you throw around words like MT4 or MQL it's a bug, I will give you the latest and easiest code and test execution. I will also post the results. Maybe there is an error in my code, that I don't know about. Once again I remind you that the problem is only detected with one broker (you will see in the logbook).
Indicator:
Expert:
Receives the latest data from the indicator. The indicator does not respond any more. Expert log:
MT4 log at this time:
TimeCurrent() in the indicator called by iCustom stops working when re-logging?
Does TimeCurrent() in an indicator called by iCustom stop working when re-logging?
What isTimeCurrent() forin the indicator?
Are the timeseries (time[], open[], etc.) updated?
Everything stops working, as if there is no indicator anymore. TimeCurrent() just to check, last time to see. Nothing (not time[], open[], etc.) works because indicator just doesn't respond anymore. This is the last print from indicator, there is no more:
Religion is certainly a good thing (I mean explicitly this.*), but it is better to leave it to the church.
class A
{
protected:
template <typename T>
void f( const T* ) {Print(typename(T));}
};
class B : public A
{
public:
void f( const B* b )
{
A::f(b);
}
};
voidOnStart()
{
B b;
b.f(&b);
}
Religion is certainly a good thing (I mean explicitly this.*), but it is better to leave it to the church.
I think it would be more succinct.
class A
{
protected:
staticvoid f( const A* ) { Print(__FUNCSIG__); }
template <typename T>
void f( const T* ) {Print(typename(T));} // Почему B?
};
class B : public A
{
public:
void f( const A* a )
{
A::f(a); // как вызвать static-метод?
}
};
voidOnStart()
{
B b;
b.f(&b); // deprecated behavior, hidden method calling will be disabled in a future MQL compiler version
}
Good afternoon!
One broker is constantly (once or twice a day) MarketInfo() flies off, gets value 0 ( specifically MODE_MARGINREQUIRED). It's kind of normal, but at the same time there is no attempt to reach the iCustom() indicator (connected through a resource). Even after MarketInfo() receives data, iCustom() remains silent. Only restarting the terminal helps. How to access the indicator without restarting the terminal, any ideas? Can the indicator disappear from a resource somewhere?
After a month of all sorts of tests I can already say quite confidently that there is a problem, only I can't tell if the resource is missing or if iCustom() is broken. The problem is detected only at one broker, which is very unpleasant for real trading. Before you throw around words like MT4 or MQL it's a bug, I will give you the latest and simplest code and test execution. I will also post the results. Maybe there is a bug in my code, that I don't know about. Once again I remind you that the problem is only detected with one broker (you will see in the logbook).
Indicator:
Expert:
Receives the latest data from the indicator.
The indicator does not respond any more.
Expert log:
MT4 log at this time:
After a month of all sorts of tests I can already say quite confidently that there is a problem, only I can't tell if the resource is missing or if iCustom() is broken. The problem is detected only at one broker, which is very unpleasant for real trading. Before you throw around words like MT4 or MQL it's a bug, I will give you the latest and easiest code and test execution. I will also post the results. Maybe there is an error in my code, that I don't know about. Once again I remind you that the problem is only detected with one broker (you will see in the logbook).
Indicator:
Expert:
Receives the latest data from the indicator.
The indicator does not respond any more.
Expert log:
MT4 log at this time:
TimeCurrent() in the indicator called by iCustom stops working when re-logging?
Why do you needTimeCurrent() in the indicator?
Are timeseries (time[], open[], etc.) updated?
Does TimeCurrent() in an indicator called by iCustom stop working when re-logging?
What isTimeCurrent() forin the indicator?
Are the timeseries (time[], open[], etc.) updated?
Everything stops working, as if there is no indicator anymore. TimeCurrent() just to check, last time to see. Nothing (not time[], open[], etc.) works because indicator just doesn't respond anymore. This is the last print from indicator, there is no more:
To get around the MQL4 limitation, I have to write it this way.
Religion is certainly a good thing (I mean explicitly this.*), but it is better to leave it to the church.
I think it would be more succinct.
Religion is certainly a good thing (I mean explicitly this.*), but it is better to leave it to the church.
I think it would be more succinct.
This is under 5.
Ask the developers: why is the template method from the protected zone called?
UPD: it's the one the compiler substitutes in the call, not B::f(const A*)
Help bypass an MQL4 compiler bug that is no longer being developed.
Search string: Oshibka 021.
Help get around an MQL4 compiler bug that is no longer being developed.
this is how MQL4 compiles :
UPD:
Basically compiles without typename T2 too
This is how it compiles in MQL4 :
UPD:
Basically compiles without typename T2 too
Thank you!