So it's the server's crooked hands, which the Tester can't straighten right now. At the same time, everything will open in Terminal, as TickSize is not accounted for there.
Is there a workaround for the tester now? Specify ticksize in bot input parameters?
I have now tried zero in price. The library sends the correct types of course. The error remains the same.
#include <MT4Orders.mqh>
#define AskSymbolInfoDouble(_Symbol, SYMBOL_ASK)
voidOnTick()
{
if ((int)Ask != Ask) // Дождались дробной цены
{
Print(OrderSend(_Symbol, OP_BUY, 1, Ask, 100, 0, 0)); // Тестер не даст сделать BUY по Ask - ошибка TickSize-настроек.Print(OrderSend(_Symbol, OP_BUY, 1, 0, 100, 0, 0)); // 0 - прокатит, т.к. настройки символа для маркет-ордеров позволяют.ExpertRemove();
}
}
MT4Orders has no effect on trade request settings. What the user has written, that is what is sent. Everything is the same as with MT5-OrderSend.
2018.12.0300:56:01 failed market buy 1.00 NI225 [Invalid price]
2018.12.0300:56:01 -12018.12.0300:56:01 market buy 1.00 NI225 (22489.84 / 22722.15)
2018.12.0300:56:01 deal #2 buy 1.00 NI225 at 22722.15 done (based on order #2)
2018.12.0300:56:01 deal performed [#2 buy 1.00 NI225 at 22722.15]
2018.12.0300:56:01 order performed buy 1.00 at 22722.15 [#2 buy 1.00 NI225 at 22722.15]
2018.12.0300:56:0122018.12.0300:56:01ExpertRemove() function called
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.
Use this function
Then, simply add (subtract) whatPointsToPrice() returned to the price.
Added
If it doesn't work correctly, then by this symbol
is translatingSYMBOL_TRADE_TICK_SIZE
Pardon, but I don't understand what long points should be input, especially considering that this parameter can be either positive or negative.
Okay, but I didn't understand what the long points were for input, especially since this parameter can be either positive or negative.
I just pulled the code from my EA
long points is how many points you want to increase (decrease) the price
I just pulled the code from my EA
long points - how many points do you want to increase (decrease) the price
To buy on ask - ceil, to sell on bid - floor? I want to open on the market.
So it's the server's crooked hands, which the Tester can't straighten right now. At the same time, everything will open in Terminal, as TickSize is not accounted for there.
Is there a workaround for the tester now? Specify ticksize in bot input parameters?
For bid-ask purchases - ceil, for bid-ask sales - floor? I want to open on the market.
For market, just send the order without the price.
Request.action = TRADE_ACTION_DEAL;
And consequently Buy or Sell.
request.type = ORDER_TYPE_BUY;
request.type = ORDER_TYPE_SELL;
By market, simply send an order without price.
request.action = TRADE_ACTION_DEAL;
And respectively Buy or Sell
request.type = ORDER_TYPE_BUY;
request.type = ORDER_TYPE_SELL;
In this bot, it works through MT4Orders.
I have now tried zero in price. The library sends the correct types of course. The error remains the same.
In this bot - through MT4Orders goes to work.
I have now tried zero in price. The library sends the correct types of course. The error remains the same.
Well, then to you to fxsaber.
Did you try to open the market using your hands?
Tried it myself
The server is not working properly.
In this bot - through MT4Orders goes to work.
I have now tried zero in price. The library sends the correct types of course. The error remains the same.
MT4Orders has no effect on trade request settings. What the user has written, that's what is sent. It's the same as with MT5-OrderSend.
Does MT4Orders work with history?
Does MT4Orders work with history?
Yes.