Lot size of last closed trade due to Stop Loss
-
Can someone help me with this logic?
I would like my EA to create a new Buy Trade if my last trade that closed was a Sell Trade with lot size of +1 then the closed trade.. How do I accomplish this?
Examples:
-
I would have a Buy Trade with 1 Lot with a fixed SL already set. When the SL hits, I would like my EA to create a "Sell" Trade with 1+1=2 lots.
-
I would have a Sell Trade with 1.6 Lot with a fixed SL already set. When the SL hits, I would like my EA to create a "Buy" Trade with 1.6+1=2.6 lots.
-
-
@bluemoon I'm not sure if that is bullet proof if multiple orders are closed at same time, but if you have just 1 order, it might work like this

Once you have that variable, you can use it with your next order (add to your regular lotsize) and than set it back to 0. If Sell and Buy trade matters, use 2 variables and split per each direction.
-
Just curious. Are all those Constants really necessary?

-
@l-andorrà Well, in my project yes. For the answer of the question I was too lazy to crate a new project.

-
@trader-philipps LOL, Ok
