Hedge to Profit EA

MQL4 Asesores Expertos

Trabajo finalizado

Plazo de ejecución 42 días
Comentario del Cliente
Developer demonstrated an excellent understanding of trading and coding which was an excellent combination for the job he carried out for me. I recommend him.
Comentario del Ejecutor
Good client, clear rules and nice communication. I was glad work for...

Tarea técnica

The idea behind this EA is to hedge, take profit on the trades that are making profit and manage the trades that in loss with the aim that overall, the account will end in net profit.

The description is as follows

Opening Buy and Sell at the same time.  I want the EA to trade either of the following trade events and other user inputs:  

string note = "========= EA Trade Events and Other User Inputs =========";

input string Start_time = "01:00", Stop_time = "00:15";//EA will only trade at this time

bool TradeAuto = True;// if true, EA will trade as soon as it is launched on the chart 

Input double TakeProfit = xx;

Input double StopLoss = xx;

STEP 1: TRADE ENTRIES

As soon as this EA’s trade event is triggered, eight entries are automatically generated (Two entries in Step 1a, Three entries in Step 1b and Three entries in Step 1c)  

Step 1a: Open 1 buy and 1 Sell @ market.  Lot size = User input. Take Profit = User Input; StopLoss = 0;  

Step 1b: At the same time open Buy Stop, Buy Stop, Sell Limit. Treat as follows:

     Step 1b(1)  Buy Stop:  Lot = same as in 1a, Take Profit = User Input, Stop Loss = 0;  

     Step 1b(2)  Buy Stop:   Lot = same as in 1a, Take Profit = 0,  StopLoss=User input; 

     Step 1b(3)  Sell Limit;  Lot = same as in 1a, Take Profit = User Input, Stop Loss = 0; 

Note that the price to use for pending orders is market price + TakeProfit Pips         

Step 1c:  At the same time, open 1 Buy Limit, Sell Stop, Sell Stop. Treat as follows:

          Step 1c(1)  Sell Stop:  Lot = same as in 1a, Take Profit = User Input, Stop Loss = 0; 

          Step 1c(2) Sell Stop:   Lot = same as in 1a, Take Profit = 0,Stop Loss = User Input;  

          Step 1c(3) Buy Limit:  Lot = same as in 1a, Take Profit User Input, Stop Loss = 0;  

STEP 2: TRADE MANAGEMENT AND EXITS WHERE BUY TRADE HITS PROFIT FIRST

Step 2a. If the trade moves up 100 pips (depending on the user input for TakeProfit), the buy trade will close in profit of 100 pips (depending on the user input for TakeProfit). At that same point, a sell trade will still be open at this stage. The floating loss on this trade will be 100 (depending on the user input for StopLoss. Also, at the point, the pending orders (2 Nos Buy Stops and 1 No Sell Limit) created in 1b above will trigger and four open trades will float. 

The four open trades will be as follows:

1.     Sell trade that will be now 100 pip loss. At this point, adjust Take profit to zero

2.     New buy trade triggered from the previous Buy Limit

3.     New buy trade triggered from the previous Buy Limit

4.     New Sell trade triggered from the previous Sell Stop

Step 2b. The pending trades opened in step 1c above, should now be deleted and another three pending trades to replace them at a distance equal to the StopLoss/Takeprofit. The trades are as follows:

          Step 2b(1)  Sell Stop:  Lot = same as in 1a, Take Profit = User Input, Stop Loss = 0;  

          Step 2b(2) Sell Stop:   Lot = same as in 1a, Take Profit = 0,Stop Loss = User Input;  

          Step 2b(3) Buy Limit:  Lot = same as in 1a, Take Profit User Input, Stop Loss = 0;  

STEP 2: TRADE MANAGEMENT AND EXITS WHERE SELL TRADE HITS PROFIT FIRST

Step 2a. If the trade moves down 100 pips (depending on the user input for TakeProfit), the sell trade will close in profit of 100 pips (depending on the user input for TakeProfit). At that same point, a buy trade will still be open at this stage. The floating loss on this trade will be 100 (depending on the user input for StopLoss. Also, at the point, the pending orders (2 Nos Sell Stops and 1 No Buy Limit) created in 1b above will trigger and four open trades will float. 

The four open trades will be as follows:

1.     Buy trade that will be now 100 pip loss. At this point, adjust Take profit to zero

2.     New Sell trade triggered from the previous Sell Limit

3.     New Sell trade triggered from the previous Sell Limit

4.     New Buy trade triggered from the previous Buy Stop

Step 2b. The pending trades opened in step 1c above, should now be deleted and another three pending trades to replace them at a distance equivalent to the StopLoss/Takeprofit. The trades are as follows:

          Step 2b(1)  Buy Stop:  Lot = same as in 1a, Take Profit = User Input, Stop Loss = 0;  

          Step 2b(2) Buy Stop:   Lot = same as in 1a, Take Profit = 0,Stop Loss = User Input;  

          Step 2b(3) Sell Limit:  Lot = same as in 1a, Take Profit User Input, Stop Loss = 0;  

 

Either of the two scenarios will continue forever.  Each time a Take Profit level is reached, profit is taken at that level and existing pending orders will be deleted and new ones placed.   

Note, it is the entry (Buy or sell) that has Take Profit that will have profit adjusted to zero.  This is to ensure that when the trade starts reversing, such trades will be taken out at zero

 

DEMONSTRATION

In the following example EURUSD is used to demonstrate how the EA should work

Assumptions are as follows:

TakeProfit = 100;

StopLoss = 100;

TradeAuto = True;

Current Price of EURUSD = 1.14194

Since our trade event is chosen as Auto, the EA will launch trades as soon as it is attached to the EURUSD chart.    

1a. The following entries are generated

1a(1) Buy EURUSD @ 1.14194 Stop Loss = 0, Take Profit =1.15194

1a(2) Sell EURUSD @ 1.14194   Stop Loss  = 0, Take Profit = 1.13194

1bPending orders as follows BBS above market price

1b(1). BuyStop EURUSD @ 1.15194,  Stop Loss = 0, Take Profit = 1.16194

1b(2). BuyStop EURUSD @ 1.15194,  Stop Loss = 1.14194, Take Profit = 0

1b(3). SellLimit EURUSD @ 1.15194 Stop Loss = 0, Take Profit = 1.14194

1c. Pending orders as follows SSB below market price

1c(1). SellStop EURUSD @ 1.13194, Stop Loss = 0, Take Profit =  1.12194

1c(2). SellStop EURUSD @ 1.13194, Stop Loss = 1.14194, Take Profit = 0;

1c(3). BuyLimit EURUSD @ 1.13194,Stop Loss = 0, Take Profit = 1.14194

When price moves upward and reaches EURUSD = 1.15194, the following will happen,

1.     Buy EURUSD @ 1.14194 will hit take profit at 1.15194 and be closed at 100 pips profit   

2.     Sell EURUSD @ 1.14194 will have open loss of 100 pips and TP will move to 1.14194

3.     Pending BuyStop orders (2 Nos) will trigger at market at the price 1.15194   

4.      Pending SellLimit order (1 No) will trigger at market at the price  1.15194   

5.     The 3 Nos pending orders SellStop EURUSD @ 1.13194, SellStop EURUSD @ 1.13194, BuyLimit EURUSD @ 1.13194 will be deleted.  

6.     New Pending orders (6 Nos) will be opened to replace them as follows:

a.     SellStop EURUSD @ 1.14194, SellStop EURUSD @ 1.14194, BuyLimit EURUSD @ 1.14194   

b.     BuyStop EURUSD @ 1.16194, BuyStop EURUSD @ 1.16194, SellLimit EURUSD @ 1.16194 

 

7.     This process will continue to repeat each time price reaches a new Take Profit level.

The above process will be reversed if price starts to go down.

Once the trade cycles repeats to the level where the accumulated profit per trade is up to twice the take profit level, all open trades should be closed and the cycle started all over again.

In the above case, once the open and closed profit is up to 200 pips, all trades related to the trade cycle should be closed and a new cycle started.


Han respondido

1
Desarrollador 1
Evaluación
(620)
Proyectos
680
57%
Arbitraje
25
16% / 60%
Caducado
228
34%
Libre
2
Desarrollador 2
Evaluación
(349)
Proyectos
463
51%
Arbitraje
41
24% / 49%
Caducado
149
32%
Libre
3
Desarrollador 3
Evaluación
(94)
Proyectos
148
59%
Arbitraje
16
38% / 13%
Caducado
25
17%
Libre
4
Desarrollador 4
Evaluación
(647)
Proyectos
1295
67%
Arbitraje
84
26% / 49%
Caducado
338
26%
Libre
5
Desarrollador 5
Evaluación
Proyectos
1
0%
Arbitraje
0
Caducado
1
100%
Libre
6
Desarrollador 6
Evaluación
(258)
Proyectos
395
28%
Arbitraje
69
19% / 49%
Caducado
120
30%
Libre
7
Desarrollador 7
Evaluación
(4)
Proyectos
6
0%
Arbitraje
2
0% / 50%
Caducado
4
67%
Libre
8
Desarrollador 8
Evaluación
(27)
Proyectos
43
7%
Arbitraje
18
6% / 78%
Caducado
26
60%
Libre
9
Desarrollador 9
Evaluación
(96)
Proyectos
143
76%
Arbitraje
0
Caducado
2
1%
Libre
10
Desarrollador 10
Evaluación
(90)
Proyectos
118
17%
Arbitraje
44
23% / 39%
Caducado
20
17%
Libre
11
Desarrollador 11
Evaluación
(266)
Proyectos
540
50%
Arbitraje
55
40% / 36%
Caducado
224
41%
Trabaja
12
Desarrollador 12
Evaluación
(63)
Proyectos
84
26%
Arbitraje
23
22% / 48%
Caducado
23
27%
Trabaja
13
Desarrollador 13
Evaluación
(586)
Proyectos
1048
49%
Arbitraje
39
28% / 41%
Caducado
49
5%
Libre
14
Desarrollador 14
Evaluación
(5)
Proyectos
7
0%
Arbitraje
1
100% / 0%
Caducado
5
71%
Libre
15
Desarrollador 15
Evaluación
(66)
Proyectos
143
34%
Arbitraje
10
10% / 60%
Caducado
26
18%
Libre
16
Desarrollador 16
Evaluación
(43)
Proyectos
72
49%
Arbitraje
4
0% / 50%
Caducado
19
26%
Libre
Solicitudes similares
If you think you can replicate EA ("reverse engineering") from Metarader's Market, and create a new EA from scratch that works 100% the same - please send an offer. I have already managed to find out many features of that EA (entry times, risk management, averaging, trailing...) but I still miss a few
Candle wick bot The bot will have a set amount of wick length to enter trade at candle open price, there will be a set Amount in points that the candle wick has to be to then enter that opposite of the wick direction Settings will look like this : Timeframe: (meaning which candles you’re using to measure open price from for the wick length ) If set to 5 min it’ll be using 5 min candles , if set to 15 it’ll use 15
Looking for a developer to create an MT4 EA based on a custom currency strength indicator and simple moving average. Will provide currency strength indicator code to the selected developer. Buy rules If the EA added in the EURUSD chart and EUR has a currency strength above or equal to 6 and USD has strength less than 2. Wait for the prices comes back to SMA and open the buy trade if the price closes above SMA. Place
I have an equity reporter. This equity reporter displays the maximum and minimum equity reached over a specific interval. So, if the interval is set to 24 hours, the script will generate data in the format: "Profit ATT" (profit AtThatTime) shows max./min. during the specific interval This specific report shows data in pips. It can also be set to display in price or percentages. The interval is also easily adjustable
Sistema HTF EFECTIVO 30 - 60 USD
Hola, me gustaría que un programador experimentado creea un sistema de trading EA que abra y cierre operaciones muy rápido en segundos (HFT). Sería óptimo tener una opción/botón para activar solo para comprar o solo para vender (operaciones unidireccionales). Con una buena interfaz gráfica de usuario. Se agradece la implementación de su propia experiencia con sistemas de trading HFT. Es para mercados volátiles como
Hello, I would like an experienced programmer to create an EA trading system which opens and closes trades very fast within seconds (HFT). To have an option/button to activate either for only buy or only sell (one way trading) would be optimal. With a nice GUI. Implementing your own experience with HFT trading systems is welcomed. It's for volatile markets such as XAUUSD or US30. Taking advantage of order placements
The strategy is a martingale type . i.e if it hits the stop loss , it will double the lot size and place again in that direction, and when it hits the take profit at any level of the martingale, it will start over from the first lot size used initially
I want you to make me an indicator in Training View. Its idea is very simple, and I want it to have an alarm. Here's a clearer step-by-step guide to checking the last 50 candles on your chart and applying Fibonacci retracement levels based on their colors: Identify Candle Color: Start from the 100th candle from the left on the chart and check its color. If the 100th candle is green (i.e., the close is higher than the
I'm looking for a developer to assist in creating an Expert Advisor (EA) for use in a prop firm. The EA should be designed for the MT4 trading platform and include the following features: Scalping strategy Maximum drawdown of 3% Please let me know if you're interested and capable of handling this project
Hello, is it possible to be made accommodation of provided signal for Forex for mt4? I bought a signal for multiple pairs. it is executing all pair.I want to use it on couple of pairs.Is it possible to be made some modifications?I do not have codes for the signal

Información sobre el proyecto

Presupuesto
50 - 100 USD
Para el ejecutor
45 - 90 USD
Plazo límite de ejecución
de 2 a 4 día(s)