ottenand: I am talking about order types. They can only be in the stock market. How will a Sell Limit be below the market?
It will be executed immediately and it will suffer a loss. The trader does not lose anything from this, he only gains. And this will not work with the stop-limit orders because the order should immediately turn out to be in the profit.
Dmitry Fedoseev: Also write that there is no bay with the village. See for yourself what you fill in the request.action and request.type fields
Argument!
But, imho, everyone is right in their own way. You just shouldn't confuse form and content. In MQL5 the limit order is pending (in form). Another thing is that the mechanism allows to use it as a market order, i.e. quickly transform it into a market order (if order activation conditions are met). And, as to its content, the limit order turns into a market order. So it goes like this...
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.
Here is an example from a real account:
Here is an example from a real account:
Have you run my EA on demo?
added
MqlTradeResult result={0};
order_ticket=0;
request.magic=Magic;
request.symbol=Symbol();
request.volume=1;
request.type_filling=ORDER_FILLING_IOC;
request.type_time=ORDER_TIME_DAY;
request.action=TRADE_ACTION_PENDING;
request.type=ORDER_TYPE_SELL_LIMIT;
request.comment="";
double a_price = SymbolInfoDouble(Symbol(),SYMBOL_SESSION_PRICE_LIMIT_MIN);
request.price=a_price;
Print(__FUNCTION__,": Order price = ", DoubleToString(a_price));
TRADE_ACTION_PENDING
Set a trade order to execute a trade under specified conditions (pending order)
ORDER_TYPE_SELL_LIMIT
Pending Sell Limit order
It is not postponed anywhere and is executed at the current price!!!!
It does not matter whether it is demo or real.
I am talking about order types. They can only be in the stock market. How will a Sell Limit be below the market?
It will be executed immediately and it will suffer a loss. The trader does not lose anything from this, he only gains. And this will not work with the stop-limit orders because the order should immediately turn out to be in the profit.
Also write that there is no bay with the village. See for yourself what you fill in the request.action and request.type fields
Argument!
But, imho, everyone is right in their own way. You just shouldn't confuse form and content. In MQL5 the limit order is pending (in form). Another thing is that the mechanism allows to use it as a market order, i.e. quickly transform it into a market order (if order activation conditions are met). And, as to its content, the limit order turns into a market order. So it goes like this...
Have you run my EA?
No, of course I know what you mean. A limit order can be executed on the market if you set a price that is known to be worse than the current price.
But this is not what we are talking about here - to place a pending order in a market slice, only limit orders BuyLimit/SellLimit should be used.
No, of course I know what you mean. A limit order can be executed on the market if you set a price that is known to be worse than the current price.
This is not what we are talking about here - we should only use BuyLimit/SellLimit orders to place a pending order in a market window.
No, in order to place an order in the market (and it will be there) you should use
request.type_filling=ORDER_FILLING_RETURN.
Added
Change ORDER_FILLING_IOC to ORDER_FILLING_RETURN (in my example)
and the price to SYMBOL_SESSION_PRICE_LIMIT_MAX
And you will see the order in the market
OK, I'll ask again, are you putting the sell limit below the market?
YES
YES
So you want a sell-limit order in the cup to stand amongst the buy-limits?
I don't want anything.
Read the entire thread carefully.