Hedge to Profit EA

MQL4 Experts

Tâche terminée

Temps d'exécution 42 jours
Commentaires du client
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.
Commentaires de l'employé
Good client, clear rules and nice communication. I was glad work for...

Spécifications

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.


Répondu

1
Développeur 1
Évaluation
(620)
Projets
680
57%
Arbitrage
25
16% / 60%
En retard
228
34%
Gratuit
2
Développeur 2
Évaluation
(349)
Projets
463
51%
Arbitrage
41
24% / 49%
En retard
149
32%
Gratuit
3
Développeur 3
Évaluation
(94)
Projets
148
59%
Arbitrage
16
38% / 13%
En retard
25
17%
Gratuit
4
Développeur 4
Évaluation
(646)
Projets
1294
67%
Arbitrage
84
26% / 49%
En retard
338
26%
Gratuit
5
Développeur 5
Évaluation
Projets
1
0%
Arbitrage
0
En retard
1
100%
Gratuit
6
Développeur 6
Évaluation
(258)
Projets
395
28%
Arbitrage
69
19% / 49%
En retard
120
30%
Gratuit
7
Développeur 7
Évaluation
(4)
Projets
6
0%
Arbitrage
2
0% / 50%
En retard
4
67%
Gratuit
8
Développeur 8
Évaluation
(27)
Projets
43
7%
Arbitrage
18
6% / 78%
En retard
26
60%
Gratuit
9
Développeur 9
Évaluation
(96)
Projets
142
75%
Arbitrage
0
En retard
2
1%
Gratuit
10
Développeur 10
Évaluation
(90)
Projets
118
17%
Arbitrage
44
23% / 39%
En retard
20
17%
Gratuit
11
Développeur 11
Évaluation
(259)
Projets
533
50%
Arbitrage
54
41% / 37%
En retard
224
42%
Chargé
12
Développeur 12
Évaluation
(62)
Projets
84
26%
Arbitrage
22
23% / 50%
En retard
23
27%
Gratuit
13
Développeur 13
Évaluation
(586)
Projets
1045
49%
Arbitrage
39
28% / 41%
En retard
49
5%
Gratuit
14
Développeur 14
Évaluation
(5)
Projets
7
0%
Arbitrage
1
100% / 0%
En retard
5
71%
Gratuit
15
Développeur 15
Évaluation
(66)
Projets
143
34%
Arbitrage
11
9% / 55%
En retard
26
18%
Travail
16
Développeur 16
Évaluation
(43)
Projets
72
49%
Arbitrage
4
0% / 50%
En retard
19
26%
Gratuit
Commandes similaires
Hi! I am willing to pay for a paid or rental EA with good track record. I have to see results first, try on a demo. Just let me know if you need any information
I need a professional or expert who is a trader and also know about coding that can quote a profitable strategy and code the strategy for me in MT4 with my specification, If you are capable of doing this I will be glad to share my requirement with you to get started
Integration of Supply and Demand Zones from CSV: Develop functionality to read supply and demand zone data from a .CSV file. Define the structure of the CSV file for storing zone data (e.g., price levels, zone type). Implement a mechanism to parse the CSV file and extract relevant zone information. Dynamic Zone Detection: Integrate algorithms to dynamically identify supply and demand zones based on historical price
Need a tradin g robot 30 - 50 USD
I would like to create a robot (another version of a robot I already have) I currently have the source code but would like to have another robot that belongs to me but with different settings, if I provide you with the source code with all the settings are you able to remake me another robot with modifications? and if so what would be your price
邏輯交易EA,主要包括如下內容,(細節後談) 1. 網格繫統:可選:YES/NO. 如果:YES,設置:網格間隔,網格層數,同一個網格線上,可以加倉一次或多次. 2. 開倉:條件開倉,可選:YES/NO.(目前默認爲NO) 分爲市價開倉或者 STOP ORDER/ LIMIT ORDER,多單和空單的開倉設置,可以設置不同手數. 3. 加倉:分爲:固定手數,如:0.03,或末單累加:0.01,或:末單倍數如:1.5倍.多單和空單的加倉方法可以不同設置. 4. 移動止盈.(單獨移動,多/空方整體點數移動/或金額移動) 5. 平倉包括: A.多方/空方止盈線,和多方/空方止損線 (可以設置三條價格:每條選擇:平倉 1/3,1/2,或全部) B.單獨止盈/止損 (多方和空方可以設置不同的,)盈利點數或金額 整體止盈/止損.(多方和空方可以設置不同的,)盈利點數或金額. C.同向對衝平倉(多方獲利單對衝虧損單,空方獲利單對衝虧損單)
How are you today? We’re looking for a ctrader bot that can receive signals from tradingview and place orders on different ctrader accounts, so no strategy coding is required. Here are the details: https://www.loom.com/share/d8166c67a74f46c28920be9e131f8ec7?sid=bd2c6ff2-52e4-4355-b35f-f4fc1bfb0f3b&nbsp ; We would like to know from you what’s the most cost effective method to create this bot. PDF is also attached to
Hello I Need A decompiler that can help me Am looking for a professional that can decompile ea and get me source code iF YOU CAN HELP ME WITH DECOMPILE TO GET SOURCE CODE ONLY DM
Objectif de la modification : 1. Supprimer les sécurités spécifiques pour permettre la compilation avec n'importe quels identifiants de compte réel ou démo. 2. Corriger les erreurs présentes sur chaque ligne du code source. 3. Intégrer les filtres et les flèches d'achat et de vente déjà présents dans le programme existant. 4. Ajouter une fonctionnalité de trailing stop pour améliorer la
Hi there, can you create an addon for Ninja Trader that replicates the Level 2 window? See image attached. I am looking to change the row colours based on the size
Due to the complicity of the strategy on the first two orders I madeI had to create another one with a simple strategy cos many can't create what I'm asking for...Example: : When The market is buying and rejects an has created an M formation the First leg is higher than the second leg(first leg Higher high,second leg lower high then a line must touch the peak of the Higher high then connect with the peak of the lower

Informations sur le projet

Budget
50 - 100 USD
Pour le développeur
45 - 90 USD
Délais
de 2 à 4 jour(s)