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
等级
(62)
项目
90
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)
项目
245
74%
仲裁
7
100% / 0%
逾期
1
0%
空闲
发布者: 1 文章
9
开发者 9
等级
(144)
项目
186
41%
仲裁
24
58% / 21%
逾期
13
7%
空闲
相似订单
MultiPair_PriceAction 30 - 200 USD
OANDA market watch clock and symbols (.sim) Multipair able so i can choose at least 6 of those more volatile forex pairs. Price Action setups instead of relay on lag indicators. But rsi for confirmation. Spread protection, position management, magic number editor, hours trading. Volatility protection Trailing Stop, Stop losses, take profit. Percentage and ATR scale instead of dollars or lot sizes. Funds management
Project Overview I am seeking an experienced MQL5 Expert Advisor (EA) developer to automate a systematic, multi-timeframe institutional trading framework specifically optimized for Spot Gold (XAUUSD) . The EA must programmatically map market structure, identify liquidity zones, and execute trades based on structural confirmations across three distinct timeframes: Daily (D1), 1-Hour (H1), and 15-Minute (M15) . Core
I would like to convert an MT4 ea to MT5 ea. I already have the mt4 file so I can send to you if you accept the job and I’m hoping things work really will when I’d done
Looking for an MT5 Expert Advisor developer with: Minimum 1 year of verified activity on the MetaTrader Market Positive, real user reviews Ability to build EAs without Bollinger Bands Fully configurable parameters (risk, filters, SL/TP, trading hours) Free test version available before any payment Clear communication and ongoing support If you meet these requirements, please send your MQL5 profile or portfolio
I want to create a EA based on an existing EA. I want to create a COPY of same EA. This is a Grid based EA and do averaging when market goes against it. While doing Averaging it keeps on taking trades and booking profits
Full and specific details will be if selected for the task. This is the general description of the EA Create an expert advisor with two options. Either send email to buy or sell... or make a trade. Create an expert advisor which sends email for a buy alert or make a trade when all three of the following criteria are met: * CCI goes more than 100 ( or more than any other set value) * MACD shows green bar or
Akram boushaba 30 - 500 USD
مرحبا كيف حالكم انا اكرم مهتم بالتداول احاول ان اصمم برنامج روبوت قادر على التداول من تلقاء نفسه من يمكنه ان يساعدني او يعلمني كيف استطيع فهل ذلك وسأكون ممتناً له وشكرا لكم
I am in need of a profitable scalping EA for gold. No grid or martingale strategy pls. If you have one fully developed and working, pls reach out. You should be able to provide trial version
I need some modification on exiting EA. its open pending order upside and down side, but when close order any side than other side pending trad not come closer running price. so it should be delete one pending order from other last side & open one order running price side
Looking for someone who is experienced in creating MT5 EA from scratch to go over 7 public youtube videos (total duration about 6 hours) and extract the strategy code taught in the videos to make a MT5 .mq5 source code file. Full code is explained in the 7 videos so it's just a matter of going over the videos and extracting the relevant parts that relate to the source code and compiling it into a working EA. The

项目信息

预算
50+ USD
截止日期
 1  3 天