Stop Loss Help

Back to topics list To post a new topic, please log in or register
avatar
1
Spider4896 2015.02.11 07:00
 

Need some help on how to code stop loss on the next order to open.

Exmaple:

Order 1 = Opens with StopLoss of 200 points.

Order 2 = Opens next signal with StopLoss of 10 points below/above Last Open Order StopLoss  (Order 1 is still open)

Order 3 = Opens next signal with StopLoss of 10 points below/above Last Open Order StopLoss (Order 1 and 2 are still open)

If no orders are open it will use the default SL of 200 for example.


Another Example:

Order 1 Sell SL: 1.5200

Order 2 Sell SL: 1.5210

Order 3 Sell SL: 1.5220


If someone can give me guidance that would great!


avatar
Moderator
3419
GumRai 2015.02.11 07:26 #
 

Depending on the way the EA operates, you could simply find the stoploss of the most recent open order with the same magic number and ordertype.

Set the new order's stoploss 10 pips above/below it. 

 

Back to topics list  

To add comments, please log in or register