HHLL channel breakout strategy EA

Техническое задание

MetaTrader 4 (MT4) script that implements a channel breakout strategy. This script will use the "HHLLIndicator" and "Average Daily Range (ADR)" indicators to make trading decisions.

Logic Overview:
Indicators: The script will utilize two custom indicators: "HHLLIndicator" to identify Highest High (HH) and Lowest Low (LL) and "ADR" to calculate the Average Daily Range.

Timeframe: The strategy will be applied on the 15-minute (M15) chart.

Entry Conditions:

Average Daily Range (ADR) Check: The script will calculate the ADR using the "ADR" indicator. If the ADR is greater than or equal to 100 pips, the script will proceed with the strategy. Otherwise, it will not trade.

HH and LL Calculation: The "HHLLIndicator" will be used to calculate the Highest High (HH) and Lowest Low (LL) on the 15-minute chart.
Entry Levels: The script will calculate entry levels for both long (buy) and short (sell) positions.
Buy Stop: Above the HH by a specified number of pips.
Sell Stop: Below the LL by a specified number of pips.
Pending Orders:

The script will check for existing pending orders and delete them to avoid duplication.
Order Placement:
The script will place pending buy-stop and sell-stop orders at the calculated levels.
Trailing Stop:

If the Trailing Step Stop is enabled (not set to -1), the script will not set trailing stops.
If the Trailing Step Stop is set to -1, the script will set trailing stops for both buy and sell orders. The trailing stop will initially be set at "TrailingStopStart" pips, and it will step by "TrailingStepSteps" pips as the price moves in favor of the trade.
Detailed Task:
Create a new script in MetaEditor and name it "ChannelBreakout.mq4."
Define the necessary input parameters at the beginning of the script. These parameters include:

StopLoss: Stop Loss in pips (0 for automatic calculation).
TakeProfit: Take Profit in pips (0 for automatic calculation).
ADRThreshold1: ADR threshold for the first condition (e.g., 100).
ADRThreshold2: ADR threshold for the second condition (e.g., 175).
EntryOffsetPips: Offset for entry orders (e.g., 10).
EntryHourGMT: Hour to enter pending orders in GMT time (e.g., 23).
RiskRewardRatio: Risk-reward ratio (e.g., 3.0).
TrailingStopStart: Initial Trailing Stop in pips (e.g., 30).
TrailingStepSteps: Trailing Step in pips (e.g., 20).
TrailingStepStop: Trailing Step Stop (use StopLoss or set to -1 for trailing) (e.g., -1).
MagicNumber: Magic Number for orders (e.g., 0).
BuyStopAboveLL: Buy Stop Offset above Lowest Low in pips (e.g., 10).
SellStopBelowHH: Sell Stop Offset below Highest High in pips (e.g., 10).
In the "OnInit" function, create handles for the "HHLLIndicator" and "ADR" indicators. These handles will allow you to access the indicator values later.

In the "OnDeinit" function, delete the indicator handles to free up resources.

In the "OnTick" function, implement the trading logic based on the steps mentioned in the logic overview. Specifically:

Calculate the ADR using the "ADR" indicator on the 15-minute chart.
Check if ADR is greater than or equal to "ADRThreshold1." If not, do not proceed with trading.
Calculate HH and LL using the "HHLLIndicator" on the 15-minute chart.
Calculate entry levels for buy and sell orders based on HH, LL, BuyStopAboveLL, and SellStopBelowHH.
Check for existing pending orders and delete them.
Place pending buy-stop and sell-stop orders at the calculated levels.
If "TrailingStepStop" is set to -1, set trailing stops for both buy and sell orders.
Create a function to delete pending orders called "DeletePendingOrders." This function should iterate through existing orders and delete buy-stop and sell-stop orders.

Create a function to set trailing stops called "SetTrailingStop." This function should calculate the appropriate trailing stop level based on the current price and trailing parameters.
Save and compile the script.
Attach the "ChannelBreakout.mq4" script to a 15-minute chart in MetaTrader.
Ensure that the "HHLLIndicator" and "ADR" indicators are properly installed and available in MetaTrader.
Test the script in a demo account to ensure it behaves as expected and follows the defined logic.

The strategy now it has erros and dont work as should
In the atachment you have all teh script and the EA the chart must display the
ADR =day value
Details aboout postions
Positions
SL
TP
Working/Slipping
Must work on any time frame and calculate the ADR

HH and LL lines above the candle
I need to know how long you need and how much you want to be pay the job is for 2-3 h max

Debug report
back testing report
No errors or warning

Zomm and  interview  is  amust before job will be acceptd

Файлы:

Откликнулись

1
Разработчик 1
Оценка
(60)
Проекты
87
29%
Арбитраж
24
13% / 58%
Просрочено
7
8%
Работает
2
Разработчик 2
Оценка
(152)
Проекты
228
80%
Арбитраж
22
27% / 50%
Просрочено
11
5%
Свободен
Опубликовал: 24 статьи, 1882 примера
3
Разработчик 3
Оценка
(72)
Проекты
80
10%
Арбитраж
38
8% / 58%
Просрочено
6
8%
Свободен
4
Разработчик 4
Оценка
(2)
Проекты
4
0%
Арбитраж
4
25% / 75%
Просрочено
1
25%
Свободен
5
Разработчик 5
Оценка
(12)
Проекты
25
4%
Арбитраж
1
0% / 0%
Просрочено
7
28%
Свободен
6
Разработчик 6
Оценка
(568)
Проекты
641
41%
Арбитраж
25
48% / 36%
Просрочено
46
7%
Работает
7
Разработчик 7
Оценка
(11)
Проекты
18
28%
Арбитраж
4
50% / 50%
Просрочено
1
6%
Свободен
8
Разработчик 8
Оценка
(77)
Проекты
243
74%
Арбитраж
7
100% / 0%
Просрочено
1
0%
Свободен
Опубликовал: 1 статью
9
Разработчик 9
Оценка
(144)
Проекты
186
41%
Арбитраж
24
58% / 21%
Просрочено
13
7%
Свободен
Похожие заказы
need a high-quality Expert Advisor for MT5 based on the RSI strategy. ​Key Features: ​News Filter: The EA must stop trading 30 minutes before and after High-Impact news. ​Risk Management: > - Customizable Lot size (Default: 0.05). ​Hard Stop Loss fixed at 10 USD. ​Trailing Stop feature included. ​Strategy: RSI (30/70) entries for Gold and Forex. ​Please provide a professional and clean MQL5 code
I’m looking to acquire an existing, profitable Expert Advisor (EA) with full source code to add to our client investment portfolio. To be clear, this is not a request to develop or design a new strategy. If you already have an EA that is proven, consistent, and production-ready, I’m open to reviewing it immediately. Please apply only if you meet all the requirements below. Submissions without a proper introduction or
Good morning, I have a Gap Fill strategy and a 10 min opening range break strategy that trade on RTH ES Futures data I have been working on that seem to have some bugs while live trading. They have both been coded by ChatGPT so I would like someone that know how to properly code a strategy to go over each to proof and debug them. Would you be able to do this and could you possibly add some context or features that
I have attached the demo version of the EA and the performance graph Below run it on the strategy tester to confirm that it is working. It is based on order flow combined with a rigorously tested risk management system. It is going for $1000 , you will pay $150 now and $850 after 1 month (I am sure you will have made enough profits to cover the balance).Dm me if you have any questions
i need ninjatrader strategy, i want to buy this strategy, i mean an existing ninjatrader strategy, we can make deal after i have seen the backtest of the ninjatrader strategy, my budget is within 100 to $120
I am looking for an experienced MQL5 developer to build a fully automated trading bot (Expert Advisor) for MetaTrader 5 . The bot will focus on trend-following scalping and must be designed to trade XAUUSD and BTC on the M1 timeframe . The objective is to create a stable and efficient EA that can open multiple trades per day while managing risk using proper stop-loss, take-profit, and trailing stop mechanisms
I am looking for an experienced MT4 (MQL4) developer to build a Harmonic Pattern Indicator with a PRZ (Potential Reversal Zone) detection system , similar to advanced harmonic scanners. Kindly apply if you can handle this project. Note: I don't want unprofessional developer
hello, i want a convertion of this trading view indicator FVG (NEPHEW_SAM_) to mql5 to be add later to an expert advisor. i want to access this data, gap data printed on current timeframe and multi timeframe that i choose (current, timeF1, timeF2, timeF3, timeF4)(gap time, gap value, top gap value, low gap value, gap type bull / bear, gap type iFVG or FVG). a function that check if the price is checking the gap at
I have developed a ready-made quantitative trading system for MetaTrader 5. The system uses an ensemble of machine learning models (XGBoost, LightGBM, Random Forest) combined with a market regime filter based on a Hidden Markov Model. Core features: - Automated trading for XAUUSD - Risk management and dynamic position sizing - Market regime detection (trend / range) - Volatility filter - Telegram monitoring interface
Hello, I am looking for an experienced MT5 (MetaTrader 5) developer to create a simple and reliable Forex trading EA. Broker: Skyriss Platform: MT5 Requirements: • EA should work only on Forex pairs (EURUSD, GBPUSD, USDJPY, USDCHF) • Around 1–2 trades per day is enough • Proper risk management with Stop Loss (SL) and Take Profit (TP) • Prefer low-risk trading with 0.01–0.03 lot depending on balance • No martingale or

Информация о проекте

Бюджет
50+ USD
Сроки выполнения
от 1 до 3 дн.