Download MetaTrader 5
To add comments, please log in or register
Do you want to become a well-known developer? Execute the orders of traders in the Freelance service!
Roman Zhitnik
1553
Roman Zhitnik 2015.05.29 07:57 
Hello. I've faced with a strange problem in my terminal. The logic of the EA is based on placing the Limit orders and deleting them in case of changing the market conditions. In the 99.9% of cases it worked and works ok but today I got an error #3(ERR_INVALID_TRADE_PARAMETERS) when was trying to delete the pending order. As said earlier the orders before that one and the orders after that one were managed according to the trading logic. So the pending buy limit order was placed and later on the EA met market conditions and tried to delete the order and got the above mentioned error. In terminal trade tab it was as well displayed as a buy limit and on the chart it was a limit order as well. I've checked the ticket - the ea was trying to delete the correct order. I decided to re-login and the buy limit immediately turned into a market buy with an order open time of a buy limit. How could that happen? Is that an issue of a broker or a terminal and how it could be excluded? Thank you.
whroeder1
13619
whroeder1 2015.05.29 12:10  
You can't delete a pending order when the market is closer than MarketInfo(_Symbol, MODE_STOPLEVEL) * Point to the pending price.
Roman Zhitnik
1553
Roman Zhitnik 2015.05.29 14:10  
That's true (though my broker is showing that it's equal to 0) but if this non-deleted limit order did convert into a market buy then why in the terminal it was still displaying as a limit order?
/
To add comments, please log in or register