![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
It's not supposed to be a class, but just a function behind the program code (by the way, I use it instead of OOP, I find it more convenient).
How to find a graphical event that is in the future, but closer to the current time
I have a number of news items and need to find the one that comes first (search through the event graphical object)
I'm getting the latest news instead of the nearest
1. is fabs() faster than MathAbs()?
2. If fabs() is faster (and better) than MathAbs(), then why they did not describe fabs() in mathematical functions in reverse, i.e. they did not write fabs() and in the note "Instead of function fabs() function MathAbs() can be used".
3. maybe someone knows in which situation it is better to use fabs()?
In the MathAbs description there is a note "Instead of MathAbs() you can use fabs()".
1. is fabs() faster than MathAbs()?
2. If fabs() is faster (and better) than MathAbs(), then why they did not describe fabs() in mathematical functions in reverse, i.e. they did not write fabs() and in the note "Instead of function fabs() function MathAbs() can be used".
3. Does anyone know in which situation it is better to use fabs()?
Most likely it's for compatibility with C++ code, there's fabs() for floating point numbers and abs() for integers. Perhaps someday abs() will be introduced as well.
I would like to program the keys for certain actions: -Stop loss to parity or set it if it is not there.
-Add another 1000 units ofthe base currency to the transaction (in the market, press the button and there was a deal plus 1000 more to the position, once again pressed plus 2000, respectively)
Close trades: loss-making, profitable, all.
-To delete orders: below the real price, above the real price, all.
To set some orders with pre-established parameters.
All operations would be conveniently carried out with the help of the F-key.
Please advise who I should contact to do that.
When a certain condition triggers, I need to block further code execution for 24 hours. I have done the following in MQL4:
I cannot figure out how toadd 24 hours to current timein MQL5 .
Please advise.
Can you tell me who knows...
I have a target like this:
I need to place a pending order if an order opens on another pending order...
any tips on how to do this? I do not know how to pick out a certain position so that after it opens another position is placed, but only one position should open...
I also wonder how I can change the function of opening just one order, I have a "signal" and if I put an order on it, it opens the whole deposit at once ...
Can you tell me who knows...
I have a target like this:
I need to place a pending order if an order opens on another pending order...
any tips on how to do this? I do not know how to pick out a certain position so that after it opens another position is placed, but only one position should open...
I also want to ask how I can change the option to open just one order, i.e. i have a "signal" and if I put an order on it, it opens the whole deposit at once.
1) I place the first order with comment (x) (1 order - 0 positions)
2) opens a position when (x) triggers (0 orders - 1 position with the comment (x)
3) if the condition 0 orders - 1 position with the comment (x) is true - open a pending position and we get 1 order and 1 position and no more orders will be opened
p.s. If we have only 1 trading strategy and work with 1 currency pair, then this elementary scenario is enough, if not, we need to complicate it, control the number of orders by symbols and comments and store this information in an array or in a set of variables
If you reply to the last line, add to the condition of placing an order (to the signal) that OrdersTotal()==0, then it will be placed only once
How to get the exact time of the ZigZagColor extremum with the younger TF?
Running the other day, getting all extrema at 00.00. I need to specify the time to at least 15minutes.
I can think of storing minutes of that day in the array and searching for max/min, but it looks a bit confusing.