@fxdreema
I agree that there is no golden rule on how martingale should work. In my opinion the EA should look at the lot size and overall outcome (profit/loss) of the previous position, independently of how it was open (market or pending order) to decide on the next pending order's lot size, but this is just my opinion.
Either way, now that the function is working (I've tested a "simple martingale" from pending orders at least) the user can see how the block behaves and decide for himself what to do...
As always, fxDreema empowering trader's creativity... best tool on the whole internet 🙂