HHLL channel breakout strategy EA

Tarea técnica

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

Archivos adjuntos:

Han respondido

1
Desarrollador 1
Evaluación
(60)
Proyectos
87
29%
Arbitraje
24
13% / 58%
Caducado
7
8%
Trabaja
2
Desarrollador 2
Evaluación
(152)
Proyectos
228
80%
Arbitraje
22
27% / 50%
Caducado
11
5%
Libre
Ha publicado: 24 artículos, 1882 ejemplos
3
Desarrollador 3
Evaluación
(72)
Proyectos
80
10%
Arbitraje
38
8% / 58%
Caducado
6
8%
Libre
4
Desarrollador 4
Evaluación
(2)
Proyectos
4
0%
Arbitraje
4
25% / 75%
Caducado
1
25%
Libre
5
Desarrollador 5
Evaluación
(12)
Proyectos
25
4%
Arbitraje
1
0% / 0%
Caducado
7
28%
Libre
6
Desarrollador 6
Evaluación
(568)
Proyectos
641
41%
Arbitraje
25
48% / 36%
Caducado
46
7%
Trabaja
7
Desarrollador 7
Evaluación
(11)
Proyectos
18
28%
Arbitraje
4
50% / 50%
Caducado
1
6%
Libre
8
Desarrollador 8
Evaluación
(77)
Proyectos
243
74%
Arbitraje
7
100% / 0%
Caducado
1
0%
Libre
Ha publicado: 1 artículo
9
Desarrollador 9
Evaluación
(144)
Proyectos
186
41%
Arbitraje
24
58% / 21%
Caducado
13
7%
Libre
Solicitudes similares
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
Broker is Blackwell Global. I run a MAM account and have been using a bot that uses 0.02 lots per £100 with only 1.5% risk per trade but the bot has been unprofitable. The more lots per £100 the better, but risk of roughly 1%-2% + fees of 4 pence per 0.01 lots should be considered. The more trades the system does the better, as this is a MAM account - HFT would be perfect but any strategy is okay. Any forex pair is
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’m looking for an experienced MQL5 developer to build an EA for MetaTrader 5 based on a Pin Bar price action strategy. The developer should propose and explain the detailed strategy. Goal: Consistent performance with a target around 8%+ monthly profit. Stability and risk control are more important than high risk. When applying, please include: Your Pin Bar strategy logic Examples of previous MT5 EAs Estimated
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
hello, please take a moment to review my project. It is for Quanttower. it is very detailed in the instructions. Thank you, Just let me know if you can do it and the whats the cost and timeframe
Key Requirements: Source Account: Connect to a Master account using Investor (Read-only) Password. Destination Account: Execute trades on a Live Slave account with full trading access. Currency Focus: The system must handle Currency Pairs accurately, including symbol mapping (e.g., EURUSD to EURUSD.m) between different brokers. Stealth Features: Remove/Disable all trade comments. Assign custom Magic Numbers to the

Información sobre el proyecto

Presupuesto
50+ USD
Plazo límite de ejecución
de 1 a 3 día(s)