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
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

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
Michel

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

I don't know what else to explain.

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

Thank you Ulises for the intention. But it is not what the EA "Close Minus by Plus" does.

I wanted to be able to use only CP, to be able to make different configurations for Blacktesting, but nobody understood or nobody is interested in this feature or I don't know.. I will have to continue to operate with the 2 EAs.

You can close this idea Mr. Andrey, if you wish. Sorry for the inconvenience.

Successes!

Avatar
0
Andrey Khatimlianskyi
Quote from 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.

Michel,

Set "Close partial after order #" = 0.

But enable "Hedge: Close partial after order #" and all corresponding parameters.

Avatar
0
Michel
Quote from Andrey Khatimlianskyi

Michel,

Set "Close partial after order #" = 0.

But enable "Hedge: Close partial after order #" and all corresponding parameters.

Andrey, I did what you said, but it doesn't close any orders. 


It seems that nobody knows how the EA "Close Minus by Plus" works, Ulises published a .SET that doesn't even come close to "Close Minus by Plus" and as long as others don't know how the EA works, they will hardly know how to configure CP to do the same. And to my understanding, CP does not have the proper functions to work like the EA "Close Minus by Plus".

Avatar
0
Ulises Cune

Set "Close partial after order # = 2"

Set Hedge: Close main series by opposite main series = true

Avatar
0
Michel
Quote from Ulises Cune

Set "Close partial after order # = 2"

Set Hedge: Close main series by opposite main series = true

No Ulises, although it approaches the EA "Close Minus by Plus" way of closing orders, there is no priority on closing the order with the largest negative amount. CP gives priority is to close orders where there is profit and sometimes, depending on the movement, sometimes closes negative orders. CP definitely does not have the PRIMARY function and objective of the EA "Close Minus by Plus", which is to SEARCH for the order with the LARGEST NEGATIVE amount, and to be able to close it with orders that have the LARGEST MOSITIVE amount. That is the priority of "Close Minus by Plus".


I have explained it very well in this previous post:

https://communitypowerea.userecho.com/en/communities/1/topics/427-idea-close-rentable-trades-with-opposite-loss-trade-antimartingale-enabled?redirect_to_reply=2758#comment-2758

I do not understand why they do not accept that CP does not have such a function. It is simple: look for an order with a higher negative amount, and be able to close it thanks to several orders with higher positive amounts.

Avatar
0
Andrey Khatimlianskyi
Quote from Michel

Andrey, I did what you said, but it doesn't close any orders. 


It seems that nobody knows how the EA "Close Minus by Plus" works, Ulises published a .SET that doesn't even come close to "Close Minus by Plus" and as long as others don't know how the EA works, they will hardly know how to configure CP to do the same. And to my understanding, CP does not have the proper functions to work like the EA "Close Minus by Plus".

Michel, it does.

I showed the screen in my previous reply — https://communitypowerea.userecho.com/agent/#comment-2803

Of course, you should to explain what do you want. Nobody wants to test another EA to understand you idea.

You said you want to close most profitable buys with largest negative sell — I told you how to do this.

Let's continue with your updated set (with "Hedge: Close partial after order #" enabled and other functions that close your profitable orders before they can close your loss disabled).

Show me where do you want it to close sum profit (but it doesn't do it).

Tetster ini will be the easiest way to continue.

You can also PM me for the faster response. I can't read  he forum every day at the moment.