Hedge function for existing EA & Trailing stop for open positions if TP level is reached.

MQL4 Experten

Auftrag beendet

Ausführungszeit 4 Tage
Bewertung des Kunden
My first time working with a freelancer here, Billy was a pleasure to work with. Very fast and highly skilled. My EA is greatly improved. Will work with him again and I can highly recommend him.
Bewertung des Entwicklers
Happy to work with you Oscar, hope we can do it again next time.

Spezifikation

Dear all,

I'm new to, but learning, MQL4 coding. I've created a very simple EA that I'm quite happy with. But I'd like to pay for some help with a few more complicated (at least for me) functions. I really want to improve my coding skills so I'd appreciate well-commented code. That way I can learn.

Please note that this EA is only aimed at short positions

What I'm looking for is to extend my EA with the following:

1 - Hedging short positions

  • I wish to prevent margin calls and negative liquidity/ equity fluctuations if a short position temporarily moves against me. 
  • I'd like to profit from the hedge position if my short position gets stopped out and the price keeps moving up. 

Specifically: 

  1. I'd like to have an input variable called something like "input double HedgeCost=10.0;"
  2. Every time my EA opens a short position, I'd like a buystop order to be placed at a level of the OpenSell price + HedgeCost. In this example, the buystop order would be triggered when the bid price reaches 10.0 PIP's above the OpenSell price).
  3. When the price moves down, I'd like the hedge position to be closed at OpenSell price - HedgeCost. And again, another BuyStop order should be placed, at OpenSell price + HedgeCost. So if the price moves up again, my short position will be hedged again.
  4. When my short position is closed by Take Profit or any reason except Stop Loss, I want the BuyStop order to be canceled.
  5. If my short position is closed due to a stop loss, the hedge position should be modified and a trailing stop should be placed at the exact level of where my short position got stopped out.

I also would like this hedge function to really attach to the ticket number. Because in the future, my EA may open several positions, and all of these need to be hedged. So it won't work if the hedge order is triggered by looking at the total open orders, it has to really check any open short position that hasn't got a hedge Buystop attached to it. And then hedge those that don't. 

 

2 - Trailing stop when TP is reached

I think this is relatively simple. Again I'd like to learn how to do this, based on your code.

  1. I'd like an input variable called something like "input int TrailingRange=3"
  2. When my short position almost reaches it's TP level, I'd like an OrderModify to happen so that the TP is removed and a trailing stop loss is put into place at the TP - TrailingRange level.
Thank you in advance and I look forward to your offer/ reply.

Best regards,

Oscar. 

Bewerbungen

1
Entwickler 1
Bewertung
(121)
Projekte
134
66%
Schlichtung
36
25% / 56%
Frist nicht eingehalten
22
16%
Frei
2
Entwickler 2
Bewertung
(53)
Projekte
74
26%
Schlichtung
30
10% / 63%
Frist nicht eingehalten
22
30%
Frei
3
Entwickler 3
Bewertung
(12)
Projekte
17
29%
Schlichtung
6
17% / 67%
Frist nicht eingehalten
4
24%
Frei
4
Entwickler 4
Bewertung
(258)
Projekte
395
28%
Schlichtung
69
19% / 49%
Frist nicht eingehalten
120
30%
Frei
5
Entwickler 5
Bewertung
(107)
Projekte
149
36%
Schlichtung
29
3% / 55%
Frist nicht eingehalten
35
23%
Frei
6
Entwickler 6
Bewertung
(97)
Projekte
121
25%
Schlichtung
5
20% / 60%
Frist nicht eingehalten
17
14%
Frei
7
Entwickler 7
Bewertung
(76)
Projekte
136
45%
Schlichtung
11
27% / 64%
Frist nicht eingehalten
26
19%
Frei
8
Entwickler 8
Bewertung
(89)
Projekte
137
24%
Schlichtung
35
9% / 40%
Frist nicht eingehalten
52
38%
Frei
Ähnliche Aufträge
Mt4/mt5 30 - 100 USD
i need a remote trade copier over internet for mt4 and mt5, i need the open source, its ok also from stratch or if you have someone available please share some screen or other about it
THERE ARE FEW MODIFICATION IN PARAMETER LIKE ORDER PLACEING, ORDER CREAT AFTER STOP LOSS HITTING,STOP LOSS TRAILING AND EXIT FROM THE TRADE. FEW OPTION WILL BE DELETED FROM THE FILE ATTACHED. REST ALL IS SAME
I am seeking to develop a small scalping robot in MQL5 that utilizes the "Trend Catcher with Alert" indicator. This indicator provides entry and exit signals, which I would like the robot to follow. Key Requirements: Entry Signals : The robot should enter a trade based on the signals generated by the Trend Catcher indicator. Exit Signals : The robot should exit trades according to the indicator's exit signals
Counter ea 30+ USD
MULTISTRATEGIST EA I have a problem with my ea that the account always blows up before the price has a chance to arrive so I want a program that will counter the trades the expert makes by identifying the magic numbers There is also a need for the functions of SL delay and taking Perciel and I can control how many of the commands I want to take like Perciel 40% or maybe 80% and follow the rest and maybe not take
I have list of free indicators in tradingview and i would like to convert them into an mt4 ea, But the EA will have and work based on the indicators features The list of the are listed as follows :> 1. Market Structure Break And Order block. By EmreKb 2. Rainbow Adaptive RSI by LuxAlgo 3. Multiple MA (21,50,100) 4. SuperTrend My budget for this 80$ max
I want a programmer to create me a trading robot that can open an close trades that works from a 5m time frame to daily time frame that trades all currencies an it should work in all brokers. The bot should trade the minimum amount of $10 an more it should trade both MT4 an MT5
Hello there!! I need a professional ninjatrader developer who can code my specifications to an EA .kindly bid and all the necessary informations will be sent via chat box..Thank you
The EA should have the input of both indicators for i will be putting my own settings Buy/sell order conditions to be met before an order is executed 1. BUY ORDERS; a weak/strong low signal appears (from smart money concept indicator) and must be touching/sitting on a previous buy order block which is constant or doesn't disappear/vanish and the other indicator Bheurekso must have given an arrow signal of opposite
I want to develop a trade copier that copies trades from master account to client and also from client account to master account. It should be working on computer or VPS
Wirtschaftskalender 50 - 200 USD
1) Einbinden des Wirtschaftskalender ( https://www.mql5.com/de/economic-calendar ) 2) Unterschiedliche Gewichtung der Ereignisse erkennen (Farbe rot/orange/grau) 3) Je nach Gewichtung unterschiedliche Wartezeiten vor und nach dem Ereigniss Der Sourcecode muss dokumentiert sein. Die Bezahlung des vereinbarten Betrages läuft in 33% Schritten ab. 33% bei Vergabe 33% bei Endabnahme (Version 1.0) 33% nach Abgabe des

Projektdetails

Budget
10 - 50 USD
Für die Entwickler
9 - 45 USD
Ausführungsfristen
von 1 bis 3 Tag(e)