here is the problem, I wanted my positions to stack as they get profits and as well do a "martingale" I know this is not martingale because this is not doubling the lots on wrong trades but here is what it is supposed to do.
- Open an order in both sides buy/sell for the currency with a take profit of 50 pips.
-Then when it notices there is only a losing trade (exemple buy -60 pips) it opens 2x sell and 1x buy so if there is a long term trend it will not stack more losing but stack more winning.
- Maybe there is a simpler way to make this anyways I'm sure this is a good way to start programming eas.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
here is the problem, I wanted my positions to stack as they get profits and as well do a "martingale" I know this is not martingale because this is not doubling the lots on wrong trades but here is what it is supposed to do.
- Open an order in both sides buy/sell for the currency with a take profit of 50 pips.
-Then when it notices there is only a losing trade (exemple buy -60 pips) it opens 2x sell and 1x buy so if there is a long term trend it will not stack more losing but stack more winning.
- Maybe there is a simpler way to make this anyways I'm sure this is a good way to start programming eas.
here is the code