Martingale on pending orders
-
I need to implement 2 initial pending orders each 0.1 lots.
After one executed other close.
martingale loss in pips for the next order.
Please find the shared provided by miro1360.
I need to implement the martingale logic here.
I failed because I added the input for each buy/ sell pending orders separately from money management area, so one's loss doesn't consider other type of trade.

https://fxdreema.com/shared/7AnscAEkd -
when you tried to create this betting martingale, is not working?
-
scenario not working;
- execute and loss a pending buy order
- then execute a pending sell order
I think if the executed and lost trade is a buy, then EA place martingale only for next pending buy order. not for pending sell order.
wise versa for sell type. -
Yes, Martingale option works in a global way. It looks at the last trade to decide what will be the next lot size, but the type (buy or sell) doesn't matter. What matters is the Group number, so if you want to separate buys from sells, create them with different group numbers.
And by the way, even I don't know what is the right behavior when Martingale is used for pending orders. A true Martingale is when you create a trade, wait for it to close, then create new one, wait for it to close... and so on. But people decided that Martingale should happen in some way for currently running trades. So I added the ability to check currently running trades first (to get the lot size of the latest running trade instead of the latest closed trade). Then people decided that Martingale should happen in some way for pending orders, which is kinda ridiculous. So I added this MM for pending orders, but to be honest I forgot how Martingale works for them.