Hedging EA

MQL4 Experts

Tâche terminée

Temps d'exécution 7 jours
Commentaires du client
Tuoitrecuoi once again amazes me by promptness of product and willingness to sit via Team Viewer for support and immediate changes. Tuoitrecuoi is the best programmer on MQL5.com

Spécifications

Note: Do not be intimidated by lengthy EA explanation below. It is very simple in nature. I also attach an EA where lot of the concepts are already finished.

 

Idea behind EA:

The Hedging EA sole purpose is not to make money, but to automatically hedge against positions that I do not want to close out. The idea is to protect balance and equity and free up some margin. In the event that a trade becomes too far in the negative, I would close out the primary trade, which will automatically close the hedge order. The end result would be to minimized loss against those positions that venture off too far into the negative.

Repeater should work on all Symbols and charts:

Inputs Should Include:

BrokerIsECN = Yes/No

Wait For New Orders = Yes/No (This means when EA is applied to chart, to apply rules based on existing order or start with new orders).

Hedge at Amount = This will be a figure in dollars ($). This is where the EA will place a hedge trade. For example, if I enter in “20”, then EA will place a hedging trade at -$20

Time Between Open Orders in Minutes = Primary orders will have its own timer. Order 1 will work off a different timer then order 2. So if this option is set at “5”, and order 1 hedge is placed…….then order 2 will not have to wait 5 minutes but could place order immediately if conditions are correct. Same goes for closing the orders.

Take Profit in $= This option will give me the ability to take profit in the hedge trade. However, after take profit, order will wait “Time Between Open Orders in Minutes” option before reentering the market if the Hedging conditions still exist. If conditions still exist per “Hedge entry at amount”, another Hedge order will be entered in. 

Exit at Previous Entry (Default Edging Exit Position) = With this option, The hedging order will set a TP at its previous entry. In other words, if it hits this TP, there will be no profit.  Note: If a hedge order is closed with the “Take Profit In $” option, or is closed manually, then the next hedge order most likely will “not” have the same “Exit at Previous Entry” as previous order. The reason is, this order most likely will enter in a price different then the first hedging order.  The “Exit at Previous Entry” should be placed wherever the Hedge order enters the market. The Hedging can continue to reenter the market an unlimited amount of times as long as the primary order is opened, the previous hedge order is closed out, and other hedging conditions apply.

Use lot size of original order = this means hedging order will always match the size of the primary order

Fixed Lot Size = this means hedging order will always follow a specific size regardless of primary order size

 

Additional Options:

 

Exit at Previous Entry (Default Edging Exit Position) – Just wanted to post a note first that No option below will ever exit past this point of entry TP unless the “Active Hedge Minimum time” option below allows the trade to carry past this mark.

 

Active Hedge Minimum time = this is a timer for the minimum of how long the hedge order must stay opened before it can close. This will prevent the order from closing as soon as it opens due to pricing jumps. If the order is past the “Exit at Previous Entry “after the minutes expire, then the hedged position will close automatically at a loss.

 

Exit Hedge at Commission Rate = this option will set a TP at the cost of the hedging position.  “Active Hedge Minimum time” will still take priority over this rule. There are free tools that could assist with this option found https://www.mql5.com/en/market/product/4033 and https://www.mql5.com/en/market/product/3509

 

Hedging Exit in $ = The Idea for this option is to manually input a point where the EA will exit a trade in profit in $. The idea works much like a trailing stop rather than a TP option. It must cross a threshold before it can be activated. If the trade does not cross this threshold, then it will exit at “Exit at Previous Entry”.

Hedging Threshold in $ = This is the Threshold that the EA must cross before the “Hedging Exit in $” can be activated.

 

Example:

When Hedge order is activated, then activate “Exit at Previous Entry”. If trade meets/exceeds “Hedging Threshold in $”, then activate “Hedging Exit in $”. But exit must still play by “Active Hedge Minimum time” rules.

 

Notes:

When the original order is closed, it will automatically close the hedge order.

Performance Handling- It is extremely important that this EA be able to keep up with order volumes in volatile markets. At any given time, I may have 50+ orders opened. I don’t know if the EA’s are automatically effective when it comes to order processing, or if this feature needs to be built in with some kind of data-check. Do not worry about PC processing power if building in more code requires it. I do understand the volatile markets may cause slippage, however I am more worried about the EA confirming the trade has been executed, or that a hedge has actually been closed.

I have attached a very similar EA. The rules of the attached EA are almost identical, but only the attached EA repeats order rather than hedge them. Feel free to use this as a starting point.

If you have any question, please reach out to me. 

Répondu

1
Développeur 1
Évaluation
(88)
Projets
138
25%
Arbitrage
33
33% / 45%
En retard
59
43%
Travail
2
Développeur 2
Évaluation
(362)
Projets
505
40%
Arbitrage
147
18% / 72%
En retard
99
20%
Occupé
3
Développeur 3
Évaluation
(49)
Projets
77
43%
Arbitrage
6
33% / 50%
En retard
22
29%
Gratuit
4
Développeur 4
Évaluation
(647)
Projets
1295
67%
Arbitrage
84
26% / 49%
En retard
338
26%
Gratuit
Commandes similaires
hi. I hv a strategy on tradingview need to convert to MT4/MT5 expert advisor for algo trading. would like to add some tradingview strategy setting to the EA(not included in my tradingview code): recalculate after order is filled, order size: xx% of equity
The idea of the trading system is as follows : market entries are performed when MACD's main and signal lines intersect in the current trend direction . 2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is
Modify My EA 30+ USD
good day coder i want to add additional indicator to my ea The Coder should be able to code indicator to EA i will only send you source code if you can proof the indicator can be coded into ea all other features will be discussed inside but the major part is this peculiar indicator i am available for discussion My time zone is GMT+1 Source code will be release and tested on live market i trade from monday to sunday
Hello , By slippage control on Take profit and stoploss functions the ea won't implement different results of TP and Stoploss on volatile markets, target is to produce exact numbers of sl and tp on live executions .A coder who has done this type of job will be the choice . lot sizing will be added to EA
Use indicator provided to produce support and resistance levels, and enter trade if price reaches s/r level which user has specified in settings. TP and SL should also come from user settings. TP and SL options should be s/r levels. EA trade should only be opened if there is a trade already open from another EA, based on magic number. EA should check for magic number from other EA, and only enter trade if there is a
1. Idea uruchomienia jest następująca : wejście na rynek ma miejsce, gdy główna linia MACD przecina się z linią sygnałową zgodnie z aktualnym uruchamianiem trendu . 2. Trend jest ustalany na podstawie średniej kroczącej wykładniczej z określonym okresem (InpMATrendPeriod). Jeśli bieżąca wartość EMA jest większa od sieci, trend jest postrzegany jako rosnący (ema_current > ema_previous). Alternatywnie, jeśli
Hello, Need to create an EA solely based on an indicator. Will provide the indicator, which is just available on the market. The EA will just trade based on the signals and close trades based on my parameter
So, I have the attached include and ex files (which I got from online. I cannot remember the time and where though). I would like you to edit it to fit something I have and use in excel. What I want is that I want to specify these main parameters: 1. Number of trades (I do not think it should be difficult but If it will be too complex and challenging, then you can set number of trades to just 3). That is fine 2
Hello. I would features added to an EA I have made for an indicator I purchased; "PZ Day Trading Indicator", for indicator buffers and other information you can find it here in the "developer" tab https://www.pointzero-trading.com/en/Products/view/PZDayTrading I cannot provide you with the indicator due to licensing, you can download the demo version on the market, and we will have to work in a produce -> test ->
1. Combination of Market Profiles on daily basis a) this should be combined if the bell curve is similar to the previous day. Rotational day (volume - standard deviation). b) If breakout, new range should be drawn Conclusion: Market profile should be combined on daily after the market is closed 2. Use Vwap indicator, with 0.5 - slow trend, 1.0 - normal trend, 1.5 fast trend. The stop loss should be under the trend

Informations sur le projet

Budget
10 - 70 USD
Pour le développeur
9 - 63 USD
Délais
de 1 à 10 jour(s)