A grid of pending STOP orders for the three pairs EUR/USD, EUR/JPY, USD/JPY - page 6

 
MaxKobalt:
ah))) sorry, that I did not understand) there it turns out that these two transactions, with the opposite price course will be blocked by two orders from the other side and each subsequent order will already bring a profit, covering here this distance in the lots, and then it turns out to be a net profit.
What exactly is the question? Do you need an expert or just want to discuss a strategy?
 
RomanS:
What's the question? Do you want an expert or do you just want to discuss strategy?
I have a set of scripts, and you can do it with them. If someone will write an EA that closes all trades by total profit, as well as independently remove the grid after profit taking and set the grid anew, it would be very good. Moreover, it would be good to double-check the results in the mt4 tester
 
The most important thing is that you can set the exact amount of profit after which everything closes
 
Or, the Expert Advisor would count pips for positive trades and negative trades, and if there were X more pips in the positive trades, it would close them all. It would be simpler that way
 
MaxKobalt:
If there are more profitable trades than X number of points, then the Expert Advisor must close them all. It would probably be easier this way

As far as I understand this grid, profit on it appears when the price reaches certain levels (by the way, the spread will eat into the profit substantially). You might as well put two orders in different directions +5 pips from the current price and a take profit of 5 pips. You will need the price to deviate from the current price by 10 points only to get a 5 points profit.

What will happen if the price moves in a 100-pp price band and opens all 20 of your trades? The loss is 10-pp+20*spread.

The number of orders opened in both directions and their total depth (50 points, not 5) only reduces, but does not cancel the probability of loss.

 

MaxKobalt, here is an EA that works in a similar scenario, set the volume of positions you need and go ahead. The only difference is that the orders are opened by market and not by a grid of pending orders.

Yes, the balance will slowly grow for a while. But after testing it on the history you will become sure that this system is far from a winning one, as the impressive jumps on the chart attest. It is essentially a kind of monkey's game.

Files:
locker.mq4  8 kb
 
Sersad:

As far as I understand this grid, profit on it appears when the price reaches certain levels (by the way, the spread will eat into the profit substantially). You might as well put two orders in different directions +5 pips from the current price and a take profit of 5 pips. You will need the price to deviate only 10 points from the current price to gain 5 points.

What will happen if the price moves in a 100-pp price band and opens all 20 of your trades? The loss is 10-pp+20*spread.

The number of open orders in both directions and their total depth (50pp, not 5pp) only reduces, but does not cancel, the probability of loss.

I've tried it the way you say, but the losses are still more frequent and the profits are always less than the losses. As for jumps in the range, yes, that may well happen, but usually if the price jumps like that, it will still go strongly in one direction. And yes, that is the thing - it reduces the probability of loss, I totally agree, but such a price swing is very unlikely, I have never come across it in my tester for a couple of years. As for the possibility of that one, we have to reckon with the fact that such a situation may nevertheless happen, so investing the whole deposit in those 20 trades is certainly not reasonable.
 
OnGoing:

MaxKobalt, here is an EA that works in a similar scenario, set the volume of positions you need and go ahead. The only difference is that the orders are opened by market and not by a grid of pending orders.

Yes, the balance will slowly grow for a while. But after testing it on the history you will become sure that this system is far from a winning one, as the impressive jumps on the chart attest. It is essentially a kind of monkey's game.

Yes, interesting Expert Advisor, the idea is what you need, but here it closes on percentage of profit growth relative to the deposit, and it should be by pips, i.e. here in the Expert Advisor, after a series of trades with 0.1 lot, the next trade should go much further to the plus and you get such a kolbosnia, in the tester it went in the plus many times, but not wing them, because of the percentage ratio relative to the deposit, it was not enough. I have to ask him to calculate losing pips and profitable pips and close all deals regardless of the percentage ratio (negative pips) if profitable pips turned out to be 10 points more than unprofitable pips. If anyone is able to tweak this EA and we will see the results together.
 
MaxKobalt:
I would like to say that this is an interesting Expert Advisor, but it closes according to percentage increase of profit relatively to the deposit, and it should be by pips, i.e. in this EA, after a series of deals with 0.1 lot, the next deal should go much further to profit and it turns out to be a kolbosnya, in the tester it went to profit many times with all pazitions, but did not close them, because the percentage ratio to the deposit, it was not enough. I have to ask him to calculate losing pips and profitable pips and close all deals regardless of the percentage ratio (negative pips) if profitable pips turned out to be 10 points more than unprofitable pips. If anyone is able to tweak this EA and we will see the results together.
Then decrease the percentage value and set it equal to the expected profit. It is the same.
 
OnGoing:
So reduce the percentage by setting it equal to the expected profit. This is the same.
So, after 10 profitable trades, the balance will increase, while the lot, for example, remains the same => the Expert Advisor will close each next trade with a larger number of pips, i.e. it will close the profit in 20 pips, but not in 10 pips, and if we consider that the series of losing lots has fallen, then this profit may not be expected at all. On visualization in MT4 you can see that it keeps on working longer and longer with every deal and the lot is the same, and this with a bloated balance from the first deals. I will even use this EA, it is more convenient than making a lot of lots, I will just close positions manually