What do you mean by not providing SL and TP and if you need levels, what do you do? Or you mean to modify it after opening? If you modify it, can you give me an example function, thanks.
What do you mean by not providing SL and TP and if you need levels, what do you do? Or you mean to modify it after opening? If you modify it, can you give me an example function, thanks.
If you will use limit orders, you can set both stop and take. How close to the market can a limit order be set? Depends on the broker, from zero pips (i.e. at market price).
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.
Can you tell me, I am trying to set take profit and stop loss, the order is opened and SL and TP are not set, what is the problem and how to fix it?
CheckSYMBOL_TRADE_EXEMODE property for the tool, which can be one of the values ofENUM_SYMBOL_TRADE_EXECUTION enumeration :
ENUM_SYMBOL_TRADE_EXECUTION
Identifier
Description
SYMBOL_TRADE_EXECUTION_REQUEST
Trade on request
SYMBOL_TRADE_EXECUTION_INSTANT
Trade at streaming prices
SYMBOL_TRADE_EXECUTION_MARKET
Execution_execution_market
SYMBOL_TRADE_EXECUTION_EXCHANGE
Exchange execution
SL and TP are not requiredfor trading in SYMBOL_TRADE_EXECUTION_MARKETmode .
Can you tell me, I am trying to set take profit and stop loss, the order is opened and SL and TP are not set, what is the problem and how to fix it?
Returns 3 - i.e. SYMBOL_TRADE_EXECUTION_MARKET
What do you mean by not providing SL and TP and if you need levels, what do you do? Or you mean to modify it after opening? If you modify it, can you give me an example function, thanks.
Returns 3 - i.e. SYMBOL_TRADE_EXECUTION_MARKET
What do you mean by not providing SL and TP and if you need levels, what do you do? Or you mean to modify it after opening? If you modify it, can you give me an example function, thanks.
What if I need to follow the market? I opened an order and what should I do if I cannot set the TP and SL?
This is where the MQL5 Reference / Standard constants, enumerations and structures / Data structures / Structure of a trade request says:
SL & TP Modification Торговый приказ на модификацию уровней StopLoss и/или TakeProfit. Требуется указание 4 полей: action symbol sl tpSo the code is roughly like this (after checking for position):
Returns 3 - so you get SYMBOL_TRADE_EXECUTION_MARKET
The problem seems to be elsewhere.
The value "3" is not returned in any way :) After all, the enumerations are numbered from zero.