Features of the mql5 language, subtleties and tricks - page 190
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
Is it possible to distinguish a manually created graphical object from an object created by an indicator or EA?
In the function
OBJPROP_HIDDEN
Barring the name of a graphical object from the terminal menu "Charts" - "Objects" - "List of Objects". The value true allows to hide an unnecessary object from the list. By default true is set for objects that display calendar events, trading history, as well asthose created from MQL5 program. To see suchgraphical objects and access their properties, click "All" in the "List of Objects" window.
bool
Forum on trading, automated trading systems and testing trading strategies
Libraries: Expert
fxsaber, 2020.10.09 04:55
I have highlighted an important place in the code. Without it there is no application of the pattern until the end of the script.
Forum on trading, automated trading systems and trading strategy testing
MT5 and Speed in Action
Anton, 2020.10.08 11:00
Different meaning and different execution mechanism. 0 - event in queue of "own" chart. -1 - event in its own queue.
At the end of the week my head is already not good.
I have a ticket of an open position on a hedge in mt5 e.g. 123456
I want to calculate a profit after the position is closed, and I cannot do it.
I do so, but I get only commission...
How do I get the profit of a closed position with a ticket?
Try to better select trades using HistorySelectByPosition().
It was necessary to find out inside one mqh whether something was called before from another mqh. The mqh is not aware of each other's presence. One of them may be in and one of them may not.
All in all, the problem is unusual (for me). Solved it in a rather crutchy way.
I think it's very bad practice, but it works.
It was necessary to find out inside one mqh whether something was called before from another mqh. The mqh is not aware of each other's presence. One of them may be in and one of them may not.
All in all, the problem is unusual (for me). Solved it in a rather crutchy way.
I think it's very bad practice, but it works.
Forum on trading, automated trading systems and trading strategy testing
MT5 and Speed in Action
fxsaber, 2020.10.20 12:28
Intermediate summary for a fast unloaded machine.
The relevance of price data is very ambiguous for those who trade using bars and indicators.
Ticks and tumblers are hard to be in real time.
Forum on trading, automated trading systems and trading strategies testing
Peculiarities of mql5, tips and tricks
Slava, 2018.09.20 15:40
PS. The Sleep() function in MQL5 is not a redirect to win api function ::Sleep(). To be more exact, if the value is less than 100, it is a redirect. But above 100 it is a loop with win api slip inside it so that it can be interrupted by IsStopped.
There is one more subtle point. If milliseconds <=0, we prepend 1. That is, we never call ::Sleep(0).
It has been forgotten already. True only for MT5. In MT4 Sleep(0) can suspend the terminal.
But I decided to compare performance first, using a simple example.
The result.
The typedef variant loses by a factor of three. I refused to use it where it is crucial. For example, for TC the same OrdersTotal is called at least once at every tick of optimizer pass.
In debug mode the situation is reversed. So, it makes sense to use typedef in MT4 for acceleration.