Hedging EA

MQL4 エキスパート

仕事が完了した

実行時間7 日
依頼者からのフィードバック
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

指定

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. 

応答済み

1
開発者 1
評価
(88)
プロジェクト
138
25%
仲裁
33
33% / 45%
期限切れ
59
43%
仕事中
2
開発者 2
評価
(362)
プロジェクト
504
40%
仲裁
147
18% / 72%
期限切れ
98
19%
多忙
3
開発者 3
評価
(49)
プロジェクト
77
43%
仲裁
6
33% / 50%
期限切れ
22
29%
4
開発者 4
評価
(647)
プロジェクト
1295
67%
仲裁
84
26% / 49%
期限切れ
338
26%
類似した注文
Hi, i want to create EA that using martingale and hedge system working on metatrader 4 and has some options to be manually changed in the bot options i need expert in this strategy to do this job note that strategy is very simple no indicator needed unless moving average
Hi there, I have an MT5 EA with its source code that I would like to convert to MT4 and enhance with additional features. Currently, the EA functions as a cost-averaging and martingale EA. When I want to trade only buy or only sell, I place the EA on one chart. To trade both buy and sell, I place the EA on two charts. Each leg (buy and sell) operates independently with its own parameters. The EA does not use any
looking for someone to create an EA based on the OHLC of the last x candles, calculate lot size and place limit and stop orders with partial close. some other features
I have one table (Google Sheets) in my Google account. I need the MQL5 EA to be able to read this table and write to it. Please clarify immediately: can MQL5 EA access my table with my Google login and password or do I need to create some kind of service account
I would like a trading robot / Expert Advisor that simply operates on two basic trading view indicators to enter trades. Everything happens on the 1 minute time frame for this robot. Make the settings of both indicators full customization enabled from my end and also the risk percentage must be adjustable from my end but the risk-to-reward ratio must be fixed to 1:1.5. The scalping robot must operate based on two
I require an English speaking programmer to create the following robot: Brief overview: The program primarily operates just after the open of a new candle on the chart it is attached to. On new candle opening, previous candles over a user defined period are checked. If the number of candles closing with a price rise equal or exceed a given number, the market is considered “Overbought” and the program opens a buy or
Ezeana 40+ USD
i would like to have high frequency trading strategy bot that opens and close multiple trades in short calculated period of time . the expert adviser should be able to full run automatically on its own with 99% winning rate
i need a custom indicator in mql5 syntax with arrows to point when to buy or sell at time frames M5 and M15. the bellow settings and criteria look into higher time frames to confirm entries. I need extra string to add symbols: input string symbol2 = "DXY"; input string symbol3 = "US10Y"; i have made a very basic sketch on chatgpt but it needs professional code work. Indicators and Settings Used: Commodity Channel
The goal of this project is to catch positions which are moving in the right direction, while locking / hedging the ones that do not. Positions are only opened when price has been moving according to the predominant trend, and wins are used to buy down existing locked positions as required. Please see the attached files for full explanation of the requirements and anticipated solution
I have two not very sophisticated bots that need to be converted from python to MQL5. The bots are very similar, they use 99% of the same methodology, the only difference being that one is a trend-following bot, and the other is a mean reversion bot. I need the parameters to be at the top of the script so that they can be easily changed and optimised. The entire codebase is already done in python (sl,tp, trailing

プロジェクト情報

予算
10 - 70 USD
開発者用
9 - 63 USD
締め切り
最低 1 最高 10 日