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
(24)
Proyectos
31
16%
Arbitraje
7
29% / 43%
Caducado
4
13%
Trabaja
2
Desarrollador 2
Evaluación
(140)
Proyectos
205
80%
Arbitraje
18
33% / 44%
Caducado
10
5%
Trabaja
3
Desarrollador 3
Evaluación
(71)
Proyectos
80
10%
Arbitraje
35
9% / 54%
Caducado
6
8%
Trabaja
4
Desarrollador 4
Evaluación
(2)
Proyectos
4
0%
Arbitraje
4
25% / 75%
Caducado
1
25%
Libre
5
Desarrollador 5
Evaluación
(9)
Proyectos
21
5%
Arbitraje
1
0% / 0%
Caducado
7
33%
Libre
6
Desarrollador 6
Evaluación
(568)
Proyectos
641
41%
Arbitraje
21
57% / 29%
Caducado
47
7%
Trabaja
7
Desarrollador 7
Evaluación
(10)
Proyectos
15
27%
Arbitraje
3
67% / 33%
Caducado
0
Libre
8
Desarrollador 8
Evaluación
(61)
Proyectos
187
73%
Arbitraje
4
100% / 0%
Caducado
1
1%
Libre
9
Desarrollador 9
Evaluación
(125)
Proyectos
159
42%
Arbitraje
20
60% / 20%
Caducado
9
6%
Trabaja
Solicitudes similares
Fibonacci EA 30 - 180 USD
This EA will utilize the Fibonacci indicator after a break of structure, there will be three trading points, the 23.6 , 76.4 and a hedge trade for the 23.6. More explanation will be made if you signify interest, my mql5 account has been funded and i am ready to get this started Right awaay
Ready made welcome Software where i can add and delete licenses for an EA. The EA will need the license as a parameter, which should only be applicable to a particular account number, only then with a valid license it will be possible to trade. The license system will check if the license is valid. it should work on both mt4 and 5 The Licensing should also accept all my upcoming EAs and INDICATORS It should be
Life Creator 40 - 1000 USD
the topic of this robot is ,,life creator'' becouse when you have no idea what to do, this robot can help you and teach you how you can do it. The robot gonna creat you your own tactics which can help you in future. When you gonna see that it's really work you start to be happy and you gonna want to have more of this
AllForexEA 30+ USD
Algorithm - from which order the drawdown reduction algorithm is activated. - Percent profit for DD Reduction Algoritm - percentage of profit when closing orders in the drawdown reduction mode. - Magic - is a special number that the EA assigns to its orders. - Fix distance - fixed distance between orders (default 250 - in points) - Order dinamic distance - from which order will the
I need two trading view indicators to be on Mt4 .i want them to work the same way that they do on trading view if possible.i will send the indicators
Function (A) simple to do___________________________________________________ //+------------------------------------------------------------------+ //| Expert Tick Function | //+------------------------------------------------------------------+ void OnTick() { F1(); F2(); F3(); } //+------------------------------------------------------------------+ bool F1(){ extern bool F1(); Set to external (false) or (true)
hi , i am looking for a Grid EA with some basic type of EA but fully functional and final one. so anyone who can do perfect EA should contact. plan is discussed as below. start and end time, and days of active deactive button should be added in dashboard or else like if we want to close EA for any future day or days in coming week so before time we should be able to set. when EA starts. it opens one buy or sell and
Hi, I would Like an EA ORDER PANEL for MT5 which allows me to place limit orders . The only addition I would like compared to other order panels, is an o ption to place a reversal trade if the original idea is stopped out. For example: I place a Short trade at 1.2120 with a 20 pip Stop Loss and a 100 pip target IF the SL is hit, then I want a Long trade to be place at 1.2120 with the same size SL and TP (20pip and
I need the following modules as per this sample indicator, then integrated with RSD Candles. look into the sample input settings, ................................................. ......................................................................................................... .......................................................................................................... ................previous
hello everyone I need to create an ea that creates signals based on the indicator on trading view and transmits it directly to mt5, so that the signals are created on trading view and orders are opened in mt5

Información sobre el proyecto

Presupuesto
50+ USD
IVA (19%): 9.5 USD
Total: 59.5 USD
Para el ejecutor
45 USD
Plazo límite de ejecución
de 1 a 3 día(s)