Buy and Sell EA

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Buy and Sell EA

Postby Ludo69 » Fri Nov 08, 2019 7:13 am

Hi,

I would like to know if some one is able to code a Robot Buy and SELL with this parameters.

A) Place a buy order limit at (X) Pips of the current price with a take profit at (X) + (Y) and a stop loss at (X) - (Z) for (T) lot

B) Place a sell order limit at (X) Pips of the current price with a take profit at (X) - (Y) and a stop loss a (X) + (Z) for (T) lot

if at least one of the orders is executed it cancels the other one and re-positions 2 orders (A and B).

And so on.

Regards,

Ludo
Ludo69
 
Posts: 28
Joined: Mon Apr 17, 2017 5:29 am
Location: France

Re: Buy and Sell EA

Postby Apprentice » Mon Nov 11, 2019 6:13 am

Your request is added to the development list.
Development reference 300.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Re: Buy and Sell EA

Postby Ludo69 » Tue Nov 12, 2019 11:07 am

Hi, It's not exaclty what i hope.

2 orders in 2 differents ways.

1 It's a buy stop at X pips of the actual price with a take profit at Z pips of the actual price
2 It's a sell stop at X pips of the actual price with a take profit at Z pips of the actual price

when a take profit of one of this orders the 2nd order is canceled and 2 new orders are opening.

Exemple: X= 5 et Z= 10
Price Eur/Usd = 1.10135

Buy stop 0.1 at 1.10140 ( price + X) and TP = 1.10145 ( Price + Z) and SL = 1.10125 ( Price - Z)
Sell stop 0.1 at 1.10130 ( price - X) and TP = 1.10125 ( Price - Z) and SL = 1.10145 ( Price +z)

if one order is ok the other one is canceled and when the TP or SL is ok, 2 news orders are placed.

parameters are: T ( nomber of Lot) , X, Z.
Ludo69
 
Posts: 28
Joined: Mon Apr 17, 2017 5:29 am
Location: France

Re: Buy and Sell EA

Postby Apprentice » Wed Nov 13, 2019 2:38 am

Your request is added to the development list.
Development reference 304.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Buy and Sell EA

Postby Apprentice » Wed Nov 13, 2019 2:10 pm

Buy_and_Sell_EA.mq4
(28.79 KiB) Downloaded 346 times

Try this version.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 20 guests