Is is possible to open a "buy stop-limit" order (or "sell stop-limit" order) by the class CTrade?

 
We can use CTrade or MqlTradeRequest to open orders. But I can not find the option "buy stop-limit" (and sell stop-limit) in the drop-down combo box of the class CTrade in MetaEditor. So must I learn  MqlTradeRequest to order these orders? And can we work with both CTrade and MqlTradeRequest in one expert?
Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Trade Request Structure
Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Trade Request Structure
  • www.mql5.com
Interaction between the client terminal and a trade server for executing the order placing operation is performed by using trade requests. The...
 
Jo Jomax:
We can use CTrade or MqlTradeRequest to open orders. But I can not find the option "buy stop-limit" (and sell stop-limit) in the drop-down combo box of the class CTrade in MetaEditor. So must I learn  MqlTradeRequest to order these orders? And can we work with both CTrade and MqlTradeRequest in one expert?


you mean like this?

 
Michael Charles Schefe #:


you mean like this?

Exactly. There is only three options. It should be 5.

 
Jo Jomax #:

Exactly. There is only three options. It should be 5.

wow. i never saw that. but then i never used the stop limit before.

I cannot find it even as option here

But i am sure that a moderator will point us to the correct page.

Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Trade Operation Types
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Trade Operation Types
  • www.mql5.com
Trading is done by sending orders to open positions using the OrderSend() function, as well as to place, modify or delete pending orders. Each...
 
Jo Jomax #:

Exactly. There is only three options. It should be 5.

did you search codebase. i am sure there will be a library that someone has made already.

not a library, but a script that you can learn from

https://www.mql5.com/en/code/18055

OpenBuySellStopLimitOrders
OpenBuySellStopLimitOrders
  • 2017.05.29
  • www.mql5.com
A script for placing two Buy Stop Limit and Sell Stop Limit orders at an equal distance.
 
Michael Charles Schefe #:

did you search codebase. i am sure there will be a library that someone has made already.

not a library, but a script that you can learn from

https://www.mql5.com/en/code/18055

Thank you for this answer.

 
Jo Jomax #:

Thank you for this answer.

i found this article. note the librarys near bottom of page.

https://www.mql5.com/en/articles/6482

Library for easy and quick development of MetaTrader programs (part VII): StopLimit order activation events, preparing the functionality for order and position modification events
Library for easy and quick development of MetaTrader programs (part VII): StopLimit order activation events, preparing the functionality for order and position modification events
  • 2019.07.11
  • www.mql5.com
In the previous articles, we started creating a large cross-platform library simplifying the development of programs for MetaTrader 5 and MetaTrader 4 platforms. In the sixth part, we trained the library to work with positions on netting accounts. Here we will implement tracking StopLimit orders activation and prepare the functionality to track order and position modification events.