Opening 2 different orders with different take profit levels, once filled the position appears to be combined.
This link was helpful to explain more details on the TP levels being updated as they are. https://www.metatrader5.com/en/terminal/help/trading/general_concept
Just in case anyone else later comes across this.
Edit:
To clarify what I was after from an order entry and execution perspective.
- Bullish setup fires in this example and Limit order(s) entered. In this example volume would just be 2 contracts to keep simple.
- Both would have same SL set when filled but wanted to have half the position exit at TP of lets say 2:1 RR to keep simple and the remaining would exit at some trailing stop level.
- Was trying to accomplish this by two different Limit orders with different TP levels w/ each only 1 contract.
- TP1 was 2:1RR
- TP2 being 0.0 so in theory either the original SL exits or if 2:1RR is reached the trailing stop would activate and become the SL ultimately exiting the position
Hope that adds more detail/context for anyone.
- www.metatrader5.com
History Tab of Strategy Tester Shown Below. Placing buy stop limit orders with different take profit levels as shown below. Showing individual orders 14 and 15 getting filled.
Trade Tab of Strategy Tester Shown Below. After the fill they appear to be combined and using the Ticket 14 only but using the 0.0 Take Profit that was sent thru in Order 15 as shown above.
Trying to understand how MT5/MQL5 processes this or is expecting it to be sent thru. Currently we have hard coded the volume to 1 in the OrderModify function in trade.mqh to attempt to force only a single order sell but that also did not work. It keeps closing both open contracts out. I was also unable to find a function that allowed me to modify the specific active trade.
My pending limit orders should be set and waiting but this seems to use "Market" price to close. Wont this lead to more slippage?
Thanks in advance.
Not quite clear, you are using a Netting account ?
SL/TP are not limit orders.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
History Tab of Strategy Tester Shown Below. Placing buy stop limit orders with different take profit levels as shown below. Showing individual orders 14 and 15 getting filled.
Trade Tab of Strategy Tester Shown Below. After the fill they appear to be combined and using the Ticket 14 only but using the 0.0 Take Profit that was sent thru in Order 15 as shown above.
Trying to understand how MT5/MQL5 processes this or is expecting it to be sent thru. Currently we have hard coded the volume to 1 in the OrderModify function in trade.mqh to attempt to force only a single order sell but that also did not work. It keeps closing both open contracts out. I was also unable to find a function that allowed me to modify the specific active trade.
My pending limit orders should be set and waiting but this seems to use "Market" price to close. Wont this lead to more slippage?
Thanks in advance.