Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1709
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
Please tell me if anyone knows how to connect MT4 or MT5 with PHP ? The trading robot should work on the server, request quotes from a 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?
can be done. Anything can be done.
But it is guaranteed to slow down in php, it is not designed for such purposes.
And then the MQL syntax is almost the same, knowing php you can master mql in a week.
you don't need all code, only OrderSend
so it's pretty simple
ticket = OrderSend(Symbol(),OP_BUY, Lot*3, Ask, Slippage, SLbuy, 0, "open buy order", Magic, 0, Blue);
or
ticket = OrderSend(Symbol(),OP_SELL, Lot*3, Bid, Slippage, SLsell, 0, "open Sell order", Magic, 0, Red);
The situation is that I still connect those or those operations through bool. And there are a lot of them. I told you, it's easier for me to remove unnecessary.
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 the first order was opened, this value has not changed...
The meaning of your guess is understood, probably this is how it happens but practically how to find this "saving". The code is huge.
so it's pretty simple
ticket = OrderSend(Symbol(),OP_BUY, Lot*3, Ask, Slippage, SLbuy, 0, "open buy order", Magic, 0, Blue);
or
ticket = OrderSend(Symbol(),OP_SELL, Lot*3, Bid, Slippage, SLsell, 0, "open Sell order", Magic, 0, Red);
The situation is that I still connect those or those operations through bool. And I have a lot of them. I'm telling you, it's easier for me to remove unnecessary.
Just a note: lots must be aligned. Even if it's just multiplication by an integer.
just a note: Lots have to be aligned. Even if just multiplying by an integer
what is "alignment"? Thanks of course, but that's not what's bugging me.
I get the gist of your conjecture, that's probably how it works, but practically how to find this "save". The code is huge.
Here are the Prints to help you find them...
The Prints will help you find them...
Well, I can see from the history in the tester where, when and with what parameters. What gives?
can be done. Anything can be done.
But it is guaranteed to slow down in php, it is not designed for such purposes.
And then the MQL syntax is almost the same, knowing php you can master mql in a week.
Guys, no need to be redundant. Just like removing two orders with the same price, lot and opening time and that's it! That will be enough! In the tester out of 100000 orders happened really 4 times. That is, it happens extremely rarely, but because of one such doublet, the strategy moved away.
Do this and there will be no doubling.