HHLL channel breakout strategy EA

Spezifikation

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

Bewerbungen

1
Entwickler 1
Bewertung
(28)
Projekte
35
14%
Schlichtung
6
33% / 50%
Frist nicht eingehalten
5
14%
Frei
2
Entwickler 2
Bewertung
(141)
Projekte
207
80%
Schlichtung
18
33% / 44%
Frist nicht eingehalten
10
5%
Arbeitet
3
Entwickler 3
Bewertung
(72)
Projekte
80
10%
Schlichtung
36
8% / 53%
Frist nicht eingehalten
6
8%
Arbeitet
4
Entwickler 4
Bewertung
(2)
Projekte
4
0%
Schlichtung
4
25% / 75%
Frist nicht eingehalten
1
25%
Frei
5
Entwickler 5
Bewertung
(11)
Projekte
23
4%
Schlichtung
1
0% / 0%
Frist nicht eingehalten
7
30%
Frei
6
Entwickler 6
Bewertung
(568)
Projekte
641
41%
Schlichtung
22
55% / 32%
Frist nicht eingehalten
47
7%
Arbeitet
7
Entwickler 7
Bewertung
(10)
Projekte
17
24%
Schlichtung
3
67% / 33%
Frist nicht eingehalten
2
12%
Frei
8
Entwickler 8
Bewertung
(63)
Projekte
194
73%
Schlichtung
4
100% / 0%
Frist nicht eingehalten
1
1%
Arbeitet
9
Entwickler 9
Bewertung
(129)
Projekte
163
42%
Schlichtung
20
60% / 20%
Frist nicht eingehalten
9
6%
Arbeitet
Ähnliche Aufträge
I am looking for help to code an Expert Advisor (EA) for MetaTrader 4 (MT4). The EA should automate trading based on specific strategies and market conditions. I'm familiar with the basics of MQL4 but need assistance with more advanced features, like managing multiple indicators, optimizing risk management, and implementing trailing stops. I aim to create a reliable, efficient EA that can monitor the market and
I’m looking to turn into code. Trading Instrument - Crude Oil Futures (CL) Chart and Timeframe - 30-second chart Entry Setup 1. Time Focus on the first 30-second candle after 11:00:00 AM New York time. (11:00:00 candle) 2. Candle Size Limit : Skip the trade if the first candle is greater than 10 points. 3. Entry Orders - Place stop orders at the high and low of the first 30-second candle after 11:00:00. - Long Entry
EA gold HB king5 100+ USD
// เริ่มต้นโปรแกรม EA input double LotSize = 0.1; // ขนาดของล็อต input double TakeProfit = 50; // จุดกำไร input double StopLoss = 50; // จุดขาดทุน // ฟังก์ชันที่เรียกเมื่อมีการสั่งซื้อ void OnTick() { double MA = iMA(NULL, 0, 14, 0, MODE_SMA, PRICE_CLOSE, 0); // Simple Moving Average (SMA) 14 double Price = Bid; if(Price > MA) // เงื่อนไขสำหรับการซื้อ { if(OrderSelect(0, SELECT_BY_POS) == false) //
I’m looking to turn into code. Trading Instrument - Crude Oil Futures (CL) Chart and Timeframe - 30-second chart Entry Setup 1. Time Focus on the first 30-second candle after 11:00:00 AM New York time. (11:00:00 candle) 2. Candle Size Limit : Skip the trade if the first candle is greater than 10 points. 3. Entry Orders - Place stop orders at the high and low of the first 30-second candle after 11:00:00. - Long Entry
hello there I need a copy trade for mt4 can ANYONE help me with and let discuss on how to go about it kindly send me message to signify and let discuss mind you i need this urgently let connect to discuss and conclude
I would like the better volume indicator 1.6 in a scanner format. Scanning multiple timeframe and pairs of which can be picked. Would like it to provide all standard notifications and also if pressed to go to the a template timeframe and pair. *To be placed in a table format as the one added. To be able to add which time frame you want to see. *To advise me of the following Climax High - turn the text green High
i have a JavaScript of a code which is a indicator of trading view, i want to convert into python script and make a mql5 automated trading bot which can take automatic trade and also exit when the signals come by the indicator
I need to build EA MT4 that able to connect as copy trading between demo account to real account with partial of positions not all Example: If the demo account open position so the real account will be opened same position with ability to place different volume size based on real account equity and demo equity, and ability to choose which position should be copied, position one, two, three, four, five, six, seven
I would like an existing, older MT4 EA I had developed converted into an MT5 EA and debugged where necessary. The EA is attached and should be fairly self-explanatory. It is a breakout order entry EA with customisable parameters
I require an MT4 Expert Advisor (EA) that automatically places hedge orders when a buy or sell order is placed by me or another EA. The hedge orders will consist of a stop order (either Buy Stop or Sell Stop), with the same lot size as the original order, deployed at a predefined price distance. The EA must ensure that only one hedge order is placed for each trade. The system should monitor trades based on specific

Projektdetails

Budget
50+ USD
MwSt (19%): 9.5 USD
Insgesamt: 59.5 USD
Für die Entwickler
45 USD
Ausführungsfristen
von 1 bis 3 Tag(e)