Idea: close profitable trades with opposite loss trade (antimartingale enabled)

Avatar
  • updated
  • Completed

Hello Community!

The EA is called: Close Minus by Plus. You can find it in the mql5.com store (I don't know if it is allowed to add links to other EAs) Exp5 Close Minus by Plus for MT5.ex5. This EA is in charge of managing open orders, closing 1 order with higher negative amount, for several orders that have higher positive amount.

That is, if you make purchases and sales in both directions, and there is a strong trend, the EA closes orders after several orders in positive for an order with a greater negative amount, regardless of whether they are purchases or sales. On reversals, it still closes the order with the largest negative amount for several positive orders.

Unfortunately, with CP I have tried to implement it, but without success. CP comes close to what the EA does, but when there are reversals (entries with Anti-MartinGala), CP closes them. That's why I wanted to expose my idea and evaluate it.

This is my .set: CP MT5 - Fixed lot 0.01.set  <<--- For CENT account. You will see that for example: In a downtrend where there are MartinGale entries (BUYS), when the price starts to make a reversal, CP opens Anti-MartinGale orders (SALES), but the CommunityPoweb closes them to me, and I don't want that to happen, I have tried a thousand ways, but it always closes them. The idea is to keep them open, so that if the price goes down again, there are already those SELL orders open, to keep closing the BUY orders that go with negative amounts.

I hope the idea is understood.

Avatar
1
Ulises Cune

Hello,

Read the manual to better understand how it works. This set file would fulfill the same function as the "Close Minus by Plus" EA, closing operations when it reaches 5USD

https://docs.google.com/document/d/1ww1M97H54IBwtCKZDhxtqsTsrtEMKofXHMEWMGCyZNs/edit#heading=h.1j6pjejld0ow

Close_Sell_With_Buy_5USD.set

Avatar
0
Michel

¿Can anyone else help explain to Andrey what EA: Close Minus by Plus does?

I don't know what else to explain.

Avatar
0
Michel

If I set to "0", then it will not close any order.

This is the .set I have. CP MT5 - SystemGRID - Fixed lot 0.01 - Prof....set With the option: "Close partial after order #" disabled.

Avatar
0
Andrey Khatimlianskyi
Quote from Michel

If you try to test the EA that I have published, you will understand better. I understand that you might be a busy person, just like me, but I don't know what else I can explain, so that you can understand. I currently use CP in conjunction with "Close Minus by Plus for MT5.ex5" and it is excellent. I would not waste my time on this feature, if it were not so.

The EA "Close Minus by Plus for MT5.ex5", closes orders no matter if they are:

Sales with Sales

Buys with Buys

Sales with Buys

Buys with Sales

etc...

Thanks for your interest in this feature.

Michel, I don't know how does "Close Minus by Plus" work.

Maybe, it disables one side closings (buy + buy) when both buy and sell are opened.

I showed you how to make CP work with your strategy.

Have you tried to use my tip? Does it close trades as you want?

What else do you want to fix?

Avatar
0
Michel

Avatar
0
Michel
Quote from Andrey Khatimlianskyi

Why do you enable "Close partial after order #" if you don't want to close losing buy with profitable buy?

Set it to 0 and your strategy will work as you want:

If you try to test the EA that I have published, you will understand better. I understand that you might be a busy person, just like me, but I don't know what else I can explain, so that you can understand. I currently use CP in conjunction with "Close Minus by Plus for MT5.ex5" and it is excellent. I would not waste my time on this feature, if it were not so.

The EA "Close Minus by Plus for MT5.ex5", closes orders no matter if they are:

Sales with Sales

Buys with Buys

Sales with Buys

Buys with Sales

etc...

Thanks for your interest in this feature.

Avatar
0
Andrey Khatimlianskyi
Quote from Michel

OKey!!

1- TrailingStop I put it just to test. But for me it is irrelevant to use it. I also tested without enabling this option.

2- The intention is to use order openings only at 0.01 or 0.1 or 1 fixed lots. And the closings, to total or partial closings. In the case of orders at 0.01, it would obviously be at full closes.

3- I do not understand this point very well. Anyway, at the end I will explain the correct way of what I am looking for and that personally I think it is one of the best ways to operate the GRID.

4- The same as point 1, I put it just for testing. I also tested without enabling this option.

"You made a very complicated set and I'm not sure you understand how it works))" A: Yes, I understand. I do understand CP but not 100%. The learning curve is higher than the usual EAs I have worked with.

EXPLANATION: The intention is to ALWAYS eliminate NEGATIVE orders FIRST and take small profits.

Please try this .SET CP MT5 - SystemGRID - Fixed lot 0.01 - Prof....set Take profit for each close is 0.1$. The test was done with:

Broker: RoboForex MT5
Account type: CENT
Pair: GBPUSD
Timeframe: M5
Exact date: 2021-10-03

In BlackTesting, it proceeds as follows:

Point 1: The price goes down, and the CP closes several SELL orders with positive amounts, for a buy order with higher negative amount. Good!!!

Point 2: Then the price goes up, leaving 3 open orders. As the price rises, CP closes 2 buy orders: 1 with negative amount and one with positive amount, taking the $0.1 profit, but leaving the SELL order that has a LARGER amount with no chance to close.



How should CP close at point 2? He should wait for the price to go up, and close the SELL order that is more in danger. As indeed the price did: It went up enough to be able to close the sale, but as CP closed the previous positive purchases, it cannot, and now we would have to wait for the price to go much higher to be able to close the sale that has a high negative amount.

This does not happen with few orders, it also happens with many more orders, causing the account to burn out.

There is a great potential behind this way of trading. I hope it has been understood, my head hurts from so much explaining. Successes!

Why do you enable "Close partial after order #" if you don't want to close losing buy with profitable buy?

Set it to 0 and your strategy will work as you want:

Avatar
0
Ice Scream

hello. I understand everything, thank you.

Avatar
0
Michel
Quote from Ice Scream

can you provide a testing schedule?

Hi. I don't understand what you are asking. If you are referring to blacktesting, it doesn't make much sense at this time, since trading only CP in GRID the way I indicate, will end up burning your account.

Avatar
0
Ice Scream

can you provide a testing schedule?