Errors, bugs, questions - page 1809
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Didn't check.
{
static ulong PrevStartTime = GetMicrosecondCount();
static datetime PrevTimeCurrent = TimeCurrent(); // TimeTradeServer()
const datetime NewTimeCurrent = TimeCurrent(); // TimeTradeServer()
const ulong NowTime = GetMicrosecondCount();
if (PrevTimeCurrent < NewTimeCurrent)
{
PrevTimeCurrent = NewTimeCurrent;
PrevStartTime = NowTime;
}
return(PrevTimeCurrent + (datetime)((NowTime - PrevStartTime) / 1000000));
}
You could be more exact. For example, you could run through all the symbols by querying SymbolInfoTick (+ CopyTicks). From there, scratch out the time in milliseconds. I just don't understand what practical use it could be.
It's simple - the timing! It's all about it! There's a lot of data available now: ticks, sentiment, glass. Millisecond time is ONLY available for ticks! But what about the arrival time of the rest of the data? Glass doesn't have it. The sentiment doesn't have it either! Accordingly, if we collect all the data together - we won't be able to synchronize them! It's not possible to do a complex analysis! I don't understand why the developers don't pay proper attention to it. They have the data, but it's impossible to work with them properly! So we have to make something, but even "crutches", as it turned out, don't always work correctly.
A millisecond analogue of TimeCurrent is long overdue, with its reflection in the GUI.
The TimeCurrent() bug has been fixed, they said it would be on MQ-Demo today.
Forum on trading, automated trading systems and trading strategy testing
New version of MetaTrader 5 platform build 1545: Fast switching between windows and price changes with mouse
fxsaber, 2017.02.16 10:16
Could you in future announcements provide more SR numbers for which fixes have been made?It would be good to make it a rule
Compilation error: no function can be defined later, even if declared before
static int i1 = f(); //Error: 'f' - function must have a body
int g()
{
static int i2 = f(); //нормально //даже если нет объявления
return i2;
}
void OnStart()
{
g();
}
int f() { return 0; }
Compilation error: You cannot define a function later, even if there is a declaration before
static int i1 = f(); //Error: 'f' - function must have a body
int g()
{
static int i2 = f(); //нормально //даже если нет объявления
return i2;
}
void OnStart()
{
g();
}
int f() { return 0; }
Makes sense to me.
But why there is no error here is unclear.
static int i1 = f(); //Error: 'f' - function must have a body
int g()
{
static int i2 = f(); //нормально //даже если нет объявления
return i2;
}
class A
{
public:
A() { f(); }
};
A a;
void OnStart()
{
g();
}
int f() { return 0; }
Seems logical to me.
But why there is no error here is not clear.
An error is only logical if there is some sort of collision. If everything is done correctly - unnecessary errors take away flexibility
Compiled in version 1531. On startup I got:
2017.02.16 18:55:19.101 MQL5 'TradePanel.ex5' has newer unsupported version, please update your client terminal
Good thing it's not on a live account.