Errors, bugs, questions - page 1658
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
Regardless of the question, calling any function is always slower than accessing a variable on the stack, in this case nType.
Regardless of this obviousness, the question was about inline functions. I.e. is OrderType() not replaced at compile time by something like order.type.
Personally I always cache such MQLfunction calls, as in your second case.
As measurements have shown, it's unnecessary.
Regardless of this obviousness, the question was about inline functions. I.e. is OrderType() not replaced by something like order.type when compiling.
As measurements have shown, this is unnecessary.
Judging by internal implementation of arrays, the same ArraySize must be inline. But I always use it this way (I haven't measured it)
Instead of
I use
In terms of performance, I was recently surprised by this factForum on trading, automated trading systems & strategy testing
How do I go through an enumeration consistently?
fxsaber, 2016.08.22 09:13
Regardless of this obviousness, the question was about inline functions. I.e. is OrderType() not replaced by something like order.type when compiling.
As the measurements showed, it's unnecessary.
You wrote it yourself:
Checked it myself. The second code runs 4 times faster. It's all clear, the question is off the table.
Tested it myself. The second code runs four times faster. All is clear, the question is removed.
Good afternoon!
Gentlemen officers, can you tell me where to start catching a bug?
Multicurrency Expert Advisor. After the first trade the tester stops.
Gives out an error, the code of which I can't find.
Yes, tester works fine from start date 2016.05.01. If I change this date - tester stops and error, log below.
Help please!
Reply to myself:
This is a bug in the tester. For now you need to add the handle of any technical indicator in OnInit to all symbols, on which the Expert Advisor works.
You wrote it yourself:
Checked it myself. The second code runs 4 times faster. It's all clear, the question is off the table.
In build 1398 the error 'EX5 loading failed' is still there (apparently not related to that example).
In fixed build 1400 error in similar case is now reproduced as 'pure virtual function call'. And without a comment it's fine
Cannot be applied :: to resolve ambiguity
Answer to myself:
This is a bug in the tester. For now you need to add a handle of any technical indicator in OnInit to all symbols, on which the Expert Advisor works.
And it seems that the problem occurs when getting only the first tick on a new bar, the tester seems to "get stuck" and lags 1 bar behind, that is, the EA thinks that the bar does not exist and in visualization it really does not, but after a couple of seconds the bar appears, in the case of testing on M1 the correct value comes on the second tick (if I understand correctly), I hope the developers will fix this annoying moment as soon as possible ...
addition:
it turns out that to circumvent this moment now you have to artificially skip the first tick of a new bar...