Create EA for open position buy and sell at the same time with TP and SL

Hello…

I’m looking for an EA to Open Position Buy and Sell at the same time

here the rules:

Open Position Buy and Sell at the same time
TP : X Pips
SL : X Pips
Lot : X

After both positions are closed the EA will wait for some minutes ( adjustable delay 0 - 20 minutes) before opening another Buy and Sell positions simultaneously.

After total X amount of total account profit is reached the EA will stop opening positions.

Who knows the code to make it please share or Who can help me create one?
Please Help Me…

I can’t answer your question directly but its interesting - you must have trialled this and worked out how to make the approach work profitably. Might encourage someone to come forward and reply if you give out what are your basic principles.

I can take a look.
It would be easier to wait in candles instead of minutes, but lets just prototype first.
I’ll try to drop something tomorrow.

One question - are the positions closed only by reaching their SL/TP? Or is there any scenario where second one is closed before reaching TP/SL?

CutMeTwice.ex4 (11.5 KB)

Please check this out and let me know, if it works as intended. Not sure about minute delay part between trades.

I am surprised how robust this strategy is :slight_smile: I’ve backtested it without any delay between trades, small position size and 30 TP / 10 SL with quite good results on EUR USD

2 Likes

Thanks If you could please also add max spread & slippage function.

Sure, I will drop new version once I have some free time :slight_smile: Cheers!

Guys i will explain ok.

If you open a position lets say buy 1 lot, and you decide to close that position immediately, when you press the close trade button your broker closes your position for you by entering a order of 1 lot sell, and you pay the spread.

So in the example above you buy 1 lot, close the trade ( broker sells 1 lot) you are net flat in the market payed the spread.

If you buy 1 lot and sell 1 lot at the same time, it will do the exact same thing that it did in the previous example you end up net flat in the market, but now you pay for 2 spreads.

So you are opening a trade and closing it right after and paying the spreads for nothing, its a really stupid thing to do, you pay and wont get anything from it.

1 Like

You’re quite fast to call something stupid.
This is clearly a volatility strategy (check out option strategies such as straddle) - it aims at move in one of the directions (regardless which)

Take a Stop Loss = 10 pips and Take Profit = 30 pips.
Open Buy and Sell.
If the market will move > 30 pips in long - you will lose 10 pips from sell and get 30 pips from remaining buy which is hit
If the market will move < 10 pips long and then > 30 pips short - you will hit the buy stop loss (-10) and get 30 pips short …

This strategy wins if TP > 2SL AND there is a volatility. Whenever price changes directions below 30 pips - you lose 20 pips on both trades. So definitely this is not the same as closed position.
If you would like to replicate this strategy in one trade you would say “If price goes 10 pips in direction X I will open a position in this direction for 20 pips TP”. Yet the OP wanted to have two trades so I’ve dropped an EA :slight_smile: I don’t say it’s profitable in current state. Personally I would add some volatility indicator (%BB or some MA/ATR)

This is exactly why its stupid, if you can let the market run 10 pips and then open a trade with 20 pips TP and pay for only 1 SPREAD, why would someone want to open 2 positions and pay 2 SPREADS to achieve exactly the same thing.

Its like you disagree with me, but at the same time you proved that i am right. If he wants to take both directions he can place 2 pending orders 10 pips above and below current price and have a 20 pip TP and it will cost him less.

1 Like

Hello, Thank you for this! but is there any way to modify this, so once a buy hits TP or SL, it immediately opens another buy, with the same parameters (set TP/SL) and same for a sell?

I have been looking for something like this for a long time, any help would be appreciated!

How would this be profitable long term?

I have seen this strategy many times and it works.

You want a buy and sell with TP and SL…but once a buy hits tp, the EA must immediately put in another buy and vice versa…as it cycles through the trades, you will accrue profit…

I just cannot find an EA that does this…they all are BS martingale or hedging multiple sells or buys…

Any updates on this? would like it to immediately open buy or sell, once the current buy or sell hits TP or SL…

So if you have a buy and sell trade, and one of the trades hits the TP or SL, in needs to automatically open another trade, in its place (buy or sell).

I can’t find an EA that does this for some reason?
any help or advice would be appreciated man!

Hi, i saw someone using this EA and I’m looking for the this for a long time. So can I ask that you find or not?

Hi, i saw someone using this EA and I’m looking for the this for a long time. So can I ask that you found or not?

I’ll try to drop something tomorrow.

1 Like

please read my topics too

This is very good can you change the time thing instead of it placing orders every 5 min can you make it use real time like if i say 09:00am is should place orders everyday at 9 it must do that include even seconds in case i want it to place orders using seconds like 08:00:30

1 Like

It’s not stupid you need to know how to use it this thing is profitable if you use it the right way

Hello. Any update on this? I am also looking for an EA that work exactly like this