Pyramiding orders w/unique stops in MT5

 
Hello I am porting my EA from MT4 to MT5.  One thing I am having trouble grasping is how to implement pyramiding of orders w/each order having a unique stop in MT5.  I understand that I need to use one position and add to that position but am uncertain how to execute the dynamic stops.  Does anyone have any code or suggestions on how to do this?  Thanks
 
andrew.potter77:
Hello I am porting my EA from MT4 to MT5.  One thing I am having trouble grasping is how to implement pyramiding of orders w/each order having a unique stop in MT5.  I understand that I need to use one position and add to that position but am uncertain how to execute the dynamic stops.  Does anyone have any code or suggestions on how to do this?  Thanks
Instead of using .sl field of MqlTradeRequest for placing stops, open pending order on the opposite direction with the same volume at the stopped price.
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / Trade Request Structure - Documentation on MQL5
 
Thank you fireflies!