Download MetaTrader 5

Pyramiding orders w/unique stops in MT5

To add comments, please log in or register
andrew.potter77
54
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
Jimmy
490
Jimmy  
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
andrew.potter77
54
andrew.potter77  
Thank you fireflies!
To add comments, please log in or register