Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1302
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
Forum on trading, automated trading systems & strategy testing
Any questions from newbies on MQL4 and MQL5, tips and discussion on algorithms and codes
Dmitry Custurov, 2020.08.27 13:10
Greetings.
I have the following thing in MT4:
This code sends a command to the terminal window to start a specific EA.
Is there similar functionality for MT5 ?
I tried it like this:
Doesn't work.
I tried scanning for spy++, but there are no messages in MT5 unlike in MT4.
I need exactly to open Expert Advisor settings window.
I need to be able to run the script through WinAPI. Is there a solution for 5?
//
Personally I have the following idea:
1. Fiya fills the array of losing orders with their closing values ( Mass[i] = OrderCloseTime();). That is, the array stores only the closing dates and times of the losing orders
2. We start comparing the element at position i and at position i-1 (2 adjacent ones)
2.1 we compare them by converting the cell data to the day of the year ( TimeDayOfYear(Mass[i]) and TimeDayOfYear(Mass[i-1])
2.(Suppose the first losing day = 178, and the previous one = 176 --> no series, because they are not consecutive, respectively if the first = 178, and the second 177 --> we have a series)
2.3 With the for loop we look through all cells of the array and compare its neighbours. If there is a series of losses on neighboringelements of the array--> let's start compressing until 1.we have not reached the minimum requirednumber of losing days to consider it as a series. 2. (if point 1 is fulfilled) BEFORE the series stops.
2.4 THE SERIES STOP --> remember the index of the array element where it ended and remember the number of elements in the series (the series can be == OR greater than the value entered from the keyboard)
3. ----here begins problem of realization---
3.1 We should "step back" somehow through series of losing days, knowing date of each element, translate date from datetime --> string,
3.11 fill string ( I don't know, maybe through StringAdd()?), and output it to LOG-file (not million times, just one)
Algorithm of advisor is not important, important is user function itself
For Christ sake, help!))
Hello.
Advice on an algorithm is required.
I am trying to form the following requirement before processing a block of open orders:
If there are already buy/sell orders and opening price of the last order is less by X points than current price, then ignore block/not open orders.
Please advise - what are the options for implementation in the code?
Has anyone measured for mt 5 from the moment an order is sent to open a position until it actually appears, how long can it take?
I'm more interested if an order is sent and a trade is advised, from the moment the order is sent until the trades appear, how long can it take ?
k = {1,2,4,8,16,......}
cn = k[c]
Funny solution))))
Is MQ planning to add custom indicators to the mobile platform?
Judging by the responses on the new mobile terminal, not in the near future. Only pens.
Fancy solution))))
Well, if the coefficients are known in advance, why calculate them? )))
Well, if the coefficients are known in advance, why calculate them? )))
It's more universal if you calculate them.
Colleagues, good day to all - intuitively I understand the solution, I would like to hear from you.
What is the best way, to allocate parts of the lot for their subsequent closing (partial closing of the Total lot - in parts - 5 unit parts).
In my understanding, for example, lot 2.58. I divide by 5, the result is 0.51 lot to close 4 parts and the fifth part is 0.54 lot.
What is the best way to represent this in the code? What math function takes the remainder of the division to take 0.54 to close?
Colleagues, good day to all - intuitively I understand the solution, I would like to hear from you.
What is the best way, to allocate parts of the lot for their subsequent closing (partial closing of the Total lot - in parts - 5 units of parts).
In my understanding, for example, lot 2.58. I divide by 5, the result is 0.51 lot to close 4 parts and the fifth part is 0.54 lot.
What is the best way to represent this in the code? What function takes the remainder of the division to take 0.54 to close?
Can I read the documentation?