I have the following problem: order does not close, error 129: wrong price. I set the close price as Ask and Bid The order is closed at the same price as the buy or sell order, respectively:
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Is it possible to create a two-dimensional array by setting the size of the second dimension to a variable instead of a constant?
Use classes or structures. ArrayResize can help you there.
The define option is not suitable because it is not variable.
Is it possible to create a two-dimensional array by setting the size of the second dimension to a variable instead of a constant?
It is possible. Is the size of the first dimension constant?
Can I. Is the size of the first dimension constant?
Basically, both dimensions have to be set from global variables, like this:
Good day!
There is a problem: Order does not close, error 129: Wrong price. I set the closing price Ask and Bid respectively for Buy and Sell:
bool close1 = OrderClose(ticket1,0.1,Ask,15,clrNONE);
bool close2 = OrderClose(ticket2,0.1,Bid,15,clrNONE);
What could be the problem here other than a broker quirk?
Good day!
There is a problem: Order does not close, error 129: Wrong price. I set the closing price Ask and Bid to buy and sell respectively:
bool close1 = OrderClose(ticket1,0.1,Ask,15,clrNONE);
bool close2 = OrderClose(ticket2,0.1,Bid,15,clrNONE);
What could be the problem here other than a broker quirk?
Instead of Ask and Bid, put OrderClosePrice() and if 5-digit quotes , put a bigger slip, 30-40
What could be the problem here other than the broker's quirks?
Could also be a programmer's quirk, trying to close an order on one pair, but taking an asc and bid from another :)
Good afternoon!
I have the following problem: order does not close, error 129: wrong price. I set the close price as Ask and Bid The order is closed at the same price as the buy or sell order, respectively:
bool close1 = OrderClose(ticket1,0.1,Ask,15,clrNONE);
bool close2 = OrderClose(ticket2,0.1,Bid,15,clrNONE);
What may be the problem here, besides a broker's quirk?
If in the same sequence as in the post, just in case:
buy closes at Bid, sell closes at Ask.
P./S.: Requirements and restrictions for trade transactions.
I had an idea to use "ENUM_APPLIED_PRICE"in indicator, i.e. to use different prices of this enumeration.
I can not find examples how to take PRICE_HIGH[i] and give it to the indicator during optimization instead of Close[i].
Or at least High[i] instead of Close[i]
I had an idea to use "ENUM_APPLIED_PRICE"in indicator, i.e. to use different prices of this enumeration.
I can not find examples how to take PRICE_HIGH[i] from it and feed it to the indicator during optimization instead of Close[i].
Or at least High[i] instead of Close[i]