Fractal-Based CHoCH/BOS Hedging EA (MT5)

MQL5 エキスパート

仕事が完了した

実行時間1 分
開発者からのフィードバック
Thank you!
依頼者からのフィードバック
Fully aligned with my specification and available to talk. Will work again with Tzvetan!

指定

IMPORTANT:

Upon agreeing on a Project, I will be able to share as well:

1) Screenshot of the logics explained above for better understanding;

2) PineCode Script of the Indicator I use for Fractal Market Structure (so you can turn it into MQL5).

Summary

This Expert Advisor automates a hedging strategy based on market structure analysis using fractals. It identifies Break of Structure (BoS) for trend continuation and Change of Character (ChoCH) for potential reversals, and executes trades accordingly.

The EA is designed to work across all currency pairs and timeframes, including high-frequency 1-minute scalping. It opens a trend-aligned trade after a BoS and adds a hedged trade in the opposite direction upon ChoCH, managing drawdowns without stop losses.

Trades are closed based on a fixed take profit, and when profits are realized, they are used to trim opposing trades. The EA supports dynamic lot sizing based on equity growth and offers full visualization (arrows, labels, and on-screen dashboard) for transparency.

It includes robust error handling, retry logic and optional alerts. The strategy supports all major backtesting modes and is optimized for low-latency execution.

Key inputs are configurable, including fractal sensitivity, TP level, retracement filter, and lot scaling. The system is optimized for scalability, clarity, and performance in both manual and automated trading environments.


REQUIREMENTS SPECIFICATION FOR MQL5 EXPERT ADVISOR

Title: Fractal-Based CHoCH/BOS Hedging Strategy EA (Multi-Pair, Multi-Timeframe)


1. Trading Idea

The EA will detect market structure using fractal-based logic to identify:

- Break of Structure (BoS): trend continuation

- Change of Character (ChoCH): potential trend reversal


The EA trades using a hedging approach:

- It opens a position in the direction of the current trend (as determined by the last BoS).

- When a ChoCH occurs, it opens a hedged trade in the opposite direction.

- Trades are not closed when new ones are opened; they are trimmed based on take profit logic.


The strategy runs on all currency pairs and all timeframes, including 1-minute scalping charts.


2. Fractal Detection

- Uses fractal detection with a default lookback of 5 bars, configurable via input.

- A fractal is detected when a candle’s high is higher/lower than the two candles before and after.

- Recalculation frequency (on tick vs on bar close) is controlled by a boolean input.

- Fractal points and BoS/ChoCH events must be visualized on the chart with labels or arrows.


3. Signal Logic

Buy Signal:

- If no trade is open and the indicator confirms bullish market structure → open a Buy trade.

- If previous trade direction was bearish and a ChoCH to bullish occurs → open a Buy hedged trade.

- ChoCH is confirmed only on candle close above previous bearish fractal high.

- Optional retracement filter: configurable (0–3 opposite candles must form before breakout).


Sell Signal:

- If no trade is open and structure is bearish → open Sell trade.

- If a ChoCH to bearish occurs → open a Sell hedged trade.

- ChoCH is confirmed only on candle close below previous bullish fractal low.

- Retracement rule same as Buy.


4. Signal Lifetime

- A BoS or ChoCH signal is valid until it is invalidated by an opposite signal or replaced by a newer fractal structure.


5. Trade Entry Conditions

- All trades are placed at market after signal confirmation at bar close.

- No filters (RSI, time, volume) are used.

- The EA must support hedging and allow multiple trades in both directions.


6. Position Management

- Each trade has a fixed Take Profit (TP) of 10 pips, adjustable via input.

- No Stop Loss is used (hedging logic manages drawdown).

- If TP is hit and there’s no hedged trade, a new trade is placed in the same direction at that price level.

- If TP is hit and there is a hedged trade:

  - 50% of profit is used to reduce the volume of the opposite trade (trim loss).

- When a new ChoCH occurs, a new hedged trade is opened.

  - The new trade's lot size = 1 lot minus the already trimmed open hedge.


7. Lot Size Calculation

- Default: 1 lot, adjustable via input.

- Dynamic adjustment: if equity increases by 10%, increase lot size proportionally to maintain TP value growth.

- Initial capital input should define base profit expectation per 10 pips.


8. Error Handling

- Best practice handling:

  - Retry failed orders after 500ms (up to 3 times).

  - Log all order failures, price info, signal type, lot size.

  - Display error codes in Experts tab.

  - No spam alerts, but a log file with timestamped messages is required.

- Optionally: add terminal notification on failed order (optional toggle).


9. Other Features

- On-screen dashboard showing:

  - Total BOS and ChoCH events

  - Current trend (Bullish/Bearish)

  - Active Buy/Sell trade counts and directions

- Arrows and/or labels must appear for:

  - Bullish/Bearish fractals

  - BoS (green/red label)

  - ChoCH (labeled clearly)

- No need to separately enable/disable Buy or Sell since it’s a hedging EA.


10. Testing and Optimization

- Must support visual backtesting mode with all plotted elements.

- Must be testable in:

  - “Open price only”

  - “Every tick”

  - “Every tick based on real ticks”

- Should run on low timeframes (1M, 5M) without lag.

- Compatible with high-frequency use cases (scalping).


Example of the iput Parameters Overview

| Parameter                  | Type       | Description                                     |

|---------------------------|------------|-------------------------------------------------|

| FractalLength             | Integer    | Bars to look back for fractal detection         |

| UseTickRecalculation      | Boolean    | Use tick-by-tick vs bar-close for detection     |

| InitialLotSize            | Float      | Starting lot size                               |

| TP_Pips                   | Integer    | Take profit in pips                             |

| RetracementCandles        | Integer    | 0–3 required opposite candles before BoS/ChoCH  |

| DynamicLotAdjustment      | Boolean    | Enable/disable 10% equity-based lot scaling     |

| EnableNotifications       | Boolean    | Alert user on trade error                       |

| EnableDashboard           | Boolean    | Show dashboard with structure and trend info    |


応答済み

1
開発者 1
評価
(258)
プロジェクト
323
30%
仲裁
34
26% / 65%
期限切れ
10
3%
仕事中
2
開発者 2
評価
(258)
プロジェクト
265
29%
仲裁
0
期限切れ
3
1%
パブリッシュした人: 2 codes
3
開発者 3
評価
(15)
プロジェクト
19
16%
仲裁
5
40% / 40%
期限切れ
0
4
開発者 4
評価
(62)
プロジェクト
90
29%
仲裁
24
13% / 58%
期限切れ
7
8%
仕事中
5
開発者 5
評価
(51)
プロジェクト
70
36%
仲裁
4
25% / 75%
期限切れ
1
1%
パブリッシュした人: 1 code
6
開発者 6
評価
(271)
プロジェクト
553
50%
仲裁
57
40% / 37%
期限切れ
227
41%
仕事中
7
開発者 7
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
8
開発者 8
評価
(1)
プロジェクト
4
0%
仲裁
5
20% / 40%
期限切れ
2
50%
9
開発者 9
評価
(10)
プロジェクト
14
43%
仲裁
0
期限切れ
3
21%
10
開発者 10
評価
(16)
プロジェクト
35
23%
仲裁
4
0% / 50%
期限切れ
2
6%
仕事中
11
開発者 11
評価
(200)
プロジェクト
256
21%
仲裁
23
48% / 17%
期限切れ
0
多忙
12
開発者 12
評価
(77)
プロジェクト
244
74%
仲裁
7
100% / 0%
期限切れ
1
0%
パブリッシュした人: 1 article
13
開発者 13
評価
(7)
プロジェクト
13
15%
仲裁
13
23% / 46%
期限切れ
3
23%
パブリッシュした人: 29 articles
14
開発者 14
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
15
開発者 15
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
16
開発者 16
評価
(8)
プロジェクト
12
0%
仲裁
5
20% / 80%
期限切れ
2
17%
17
開発者 17
評価
(45)
プロジェクト
91
13%
仲裁
34
26% / 59%
期限切れ
37
41%
18
開発者 18
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
19
開発者 19
評価
(5)
プロジェクト
5
60%
仲裁
0
期限切れ
0
20
開発者 20
評価
(162)
プロジェクト
289
35%
仲裁
18
22% / 61%
期限切れ
43
15%
21
開発者 21
評価
(12)
プロジェクト
12
17%
仲裁
2
0% / 50%
期限切れ
1
8%
22
開発者 22
評価
(6)
プロジェクト
5
0%
仲裁
4
25% / 75%
期限切れ
2
40%
23
開発者 23
評価
(28)
プロジェクト
32
25%
仲裁
20
10% / 50%
期限切れ
10
31%
仕事中
24
開発者 24
評価
(363)
プロジェクト
436
54%
仲裁
22
50% / 14%
期限切れ
30
7%
取り込み中
25
開発者 25
評価
(4)
プロジェクト
7
43%
仲裁
0
期限切れ
2
29%
26
開発者 26
評価
(322)
プロジェクト
499
67%
仲裁
5
40% / 0%
期限切れ
4
1%
パブリッシュした人: 8 codes
類似した注文
//+------------------------------------------------------------------+ //| Simple XAUUSD EA | //+------------------------------------------------------------------+ input double LotSize = 0.01; input int StopLoss = 500; // in points input int TakeProfit = 1000; // in points input int MAPeriod = 20; int maHandle; int OnInit() { maHandle = iMA(_Symbol, PERIOD_H1, MAPeriod, 0, MODE_SMA
Hello, I need a Python-based MT5 forex trading bot developed. The bot should connect to MetaTrader 5, execute trades based on a predefined strategy, and support standard risk management features such as stop loss, take profit, and position sizing. Requirements: MT5 integration using Python Automated trade execution based on provided strategy rules Configurable risk management settings Support for major forex pairs
Hi, I'm Barak, founder of FX Trade Africa, a trading automation company based in Africa. I'm looking for a serious EA developer for a long-term business partnership — not a one-time paid job. IMPORTANT: This is not a paid order. I am looking for a long-term partner who believes in the model and wants to build something serious together. Compensation will be based on profit sharing from funded accounts — details
### ** Main EA File** - `InstitutionalTrendPullbackScalper.mq5` **Core Features Implemented:** **Multi-Timeframe Analysis** - M15 trend filter (EMA20 > EMA50 for uptrends) - M5 entry signals with 5-condition confirmation - Independent indicator sets for both symbols **Advanced Entry Logic** - RSI reversal detection (crosses thresholds) - Price pullback zone validation - Bullish/bearish candle close confirmation -
I need developer who Can perfectly build me a layout of Ninjatrader 8 (NT8) to look and feel the same on SierraCharts? I currently use NT8 but I want to start using SierraCharts because its more robust than NT8, but I don't want to have to worry about programming SierraCharts. How much would this cost? Thank you
Automate my trading 100 - 300 USD
i want a trading bot that take trade auto and make 5% profit daily and stop with in 24 hours not more then that at least the bot give me more then 2% not less then that like a ai agent if it make any loss that agent have to take care of it i need only 5 % profit
I am looking for an EA for MT5 which is stable for long period. should make minimum 20% per month and DD should be less than 10% first send me your backtest reports for last 5 years with real ticks. budget is negotiable based on the quality of the EA. source code should be delivered at the end. Please dont apply without sending backtest report as mentioned above, in other case offers would be rejected
I do not have any startegy, and I want you to create one with your experience, you will provide me EA along with source code. you may use Grid or any logic, but the EA should keep generating profit during Newyourk and Asian session
I am looking for an experienced MQL5 developer to build a professional-grade Expert Advisor (EA) for MetaTrader 5. The strategy is based on liquidity sweeps, market structure (Break of Structure), and institutional concepts (order blocks), specifically optimized for XAUUSD (Gold). This is not a basic bot. I need a structured, optimized, and reliable system suitable for live trading after testing
I need an Ai trading bot for Binance and BTC on MT5 that also uses order flow data. It should also make use of TSI- Temporal indicator sampling and also it should make use of fundamental analysis in the process of signal generation

プロジェクト情報

予算
200 - 300 USD
締め切り
最低 1 最高 5 日