Features of the mql5 language, subtleties and tricks - page 62
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
Do you have a picture of how it would look like? It's not quite clear, I haven't usedOBJ_CHART yet
There is no picture. But you can build it by hand. Select Insert -> Objects -> Graphic Objects -> Graphic and after inserting OBJ_CHART like this, select "Draw object as background" in object properties, disabling scales.
There is no picture. But you can build it by hand. Choose Insert -> Objects -> Graphic Objects -> Graphic and after inserting OBJ_CHART like this, select "Draw object as background" in the object properties, disabling scales.
Thanks, looks cool
In debug mode, you cannot know the value returned by a function or expression.
For example
For example, what the selected functions returned.
I use (not only in debug mode) this way
Result
Structure of Trade Request Check Result (MqlTradeCheckResult)
Fields description
Field
Description
balance
Balance value that will be after the trade operation execution
equity
Value of equity, which will be after the trade operation
margin
Margin required for the required trade operation
margin_free
The amount of equity that will remain after the required trade operation is executed
margin_level
The margin level that will be set after the execution of the required trade operation
These fields correspond to the line in the Trade tab
These fields correspond to the line in the Trade tab
The same values show the current state, and isn't the structure returning the calculated values that will be after the trade is executed?
The same values show the current state, but isn't the structure returning the calculated values that will be there after the trade is executed?
Shows the calculated values that would be in this line if the trade order were executed.
Forum on trading, automated trading systems and trading strategies testing
Generic classes library - errors, description, questions, peculiarities of use and suggestions
Renat Fatkhullin, 2017.12.08 23:34
We have no MqlDeal structure, as trade record formats are floating and periodically expanding. Without this, it is impossible to expand the functionality of the platform.
Therefore, the only option is to access them through the Get function. And access to other fields of the previously affected record is many times faster than the first access, because the record is cached.
In the test above, the trade numbers are new every time, which constantly throws off the cache of the previously selected trade.
Forum on trading, automated trading systems and trading strategies testing
MT5 vs MT4. The speed of filling the arrays.
Renat Fatkhullin, 2017.12.12 12:19
1) The idea is wrong, local arrays do not fill faster (roughly, without dropping to the micro level)
2) Arrays should be filled quickly via regular initialization functions
3) To maximize speed, it's better to keep the array as a vector (one-dimensional), so that you have more chances to optimize access. Because multidimensionality strictly limits you to mandatory frames and forces the compiler to do extra constant calculations of multidimensional indices.
4) Arrays for quick access should be kept static, which dramatically reduces the amount of checks for out-of-boundsForum on trading, automated trading systems and testing trading strategies
Opening sell position in mql5
fxsaber, 2017.12.12 21:56
Result
Allows you to quickly figure out why markets are not opening in the tester. Maybe it's the tester's wrong behavior when market orders are banned like this and pending orders are not.
I suggest that if SYMBOL_FILLING_MODE is zero, the tester should replace this value with(SYMBOL_FILLING_IOC | SYMBOL_FILLING_FOK). I.e., it allowed full trade at invalid setting of the corresponding symbol field by the broker.