Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1708

 
Andrey I.R.O.V #:
Please advise if anyone knows how to connect MT4 or MT5 with PHP ? I want my trading robot to work on server, request quotes from broker and create/cancel/monitor orders. The broker only has MT4 and MT5 terminals, it doesn't have API :) Or am I stupid and it doesn't happen at all?
What does this have to do with RNR?
 
Alexey Viktorov #:

What will it do?

For example, there is no EA in the template... Everything is clear... the EA does not work...

The template has an EA: The EA is initialised... The template is applied, a new copy of the EA is loaded, the EA is initialised and the template ......... is applied again

It goes on and on ... Or am I missing something?

You're right, you need to check ChartWindowFind();


if(WindowsTotal()<2)

 
MakarFX #:
You got it wrong. A template with an empty subwindow and EA is created

What does an empty subwindow have to do with anything? I mean the initialization of the EA, which was loaded by applying the template. When the template was applied, a new copy of the EA is loaded and, consequently, this copy of the EA is initialised, which in turn applies the template and a new copy of the EA is loaded again.

 
Alexey Viktorov #:

What does an empty subwindow have to do with anything? I mean the initialization of the EA, which was loaded by applying the template. When the template was applied, a new copy of the EA is loaded and, consequently, this copy of the EA is initialised, which in turn applies the template and a new copy of the EA is loaded again.

I am corrected. I was wrong)
 
MakarFX #:
What does RNR have to do with it?

I know it and I have written bots for cryptocurrency exchanges using it. I would like to do the same for forex.

 
MakarFX #:
The code, please.
The code is immensely large. Is it possible to have a function to close the same order by parameters (open price, open time, lot) - the last two to close or one of them. It would be easier. The code is really huge. I am waiting for it very much.
 
Andrey I.R.O.V #:
Can someone please tell me how can MT4 or MT5 connect to PHP ? I want my trading robot to work on server, request quotes from broker and create/cancel/monitor orders. The broker only has MT4 and MT5 terminals, it doesn't have API :) Or am I stupid and it doesn't happen at all?

You can use standard means to send/receive data from/to EA that runs in the terminal.
or WebSocket, there's a topic/article here somewhere.

and there is a library for Jason in the codebase

 
Порт-моне тв #:
The code is immensely large. Is it possible to close the same order by parameters (open price, open time, lot) - to close the last two or one of them. It would be easier. The code is really huge. I am waiting for it very much.

It is easier to insert a Print with the conditions for opening an order yourself. Most likely, the order opening conditions are saved after the first order is opened. For example, the number of open orders == 0 and after opening the first order, this value has not changed...

 
Andrey I.R.O.V #:

I know it and I have written bots for cryptocurrency exchanges using it. I would like to do the same for forex.

I misunderstood what you said, "I want the trading robot to work on the server."

Here, normally, the trading robot is an Expert Advisor

worked on a server - VPS

 
Порт-моне тв #:
The code is immensely large. Is it possible to close the same order by parameters (open price, open time, lot) - the last two to close or one of them. It would be easier. The code is really huge. I am waiting for it very much.

don't need all the code, just OrderSend

does the compiler give warnings?