Script collecting information about occuring candlestick patterns in tester and displaying aggregated results using the Backtest window

MQL5 Experts Scripts

Specification

The only purpose of this script will be to find initial settings for an existing EA, which uses different candlestick patterns as signals to enter the market. It has to give information about candle size and spread.

This script has to run in the tester (preferably only the tester) on any time frame, mostly the M1, M5, M15 chart, but also any other time frame and correctly extract the information about the candle characteristics and display them in an aggregated form in the Backtest window.

If it is not possible to modify the backtest window in this way, an alternative solution has to be provided.

What is meant by aggregated result is the following:
Like this functionality of the backtest window, I want that the average characteristics of the candlestick formations are displayed for every hour of the day (in points and %). This does not have to look like the graphs below. Preferably, it is in the form of a table.
This is just an example of what is meant by “aggregated results”.
Preferably, the script will also be able to aggregate the results by a custom time period, which is not necessarily one hour.

As already mentioned, this script has the only purpose to help finding initial settings for an existing EA.
One functionality of this EA is that for a selected number of bullish / bearish candles in a row + a corresponding selectable price movement a buy / sell signal is generated.

This is what a part of the input menu of this EA looks like:

The main thing I want from this script, is that it will count and display how many candlestick formations with consecutive bullish/bearish candles occur within an hour of the selected time period and the Average size of candlestick patterns in points and % is displayed. Candle number from 1 to 59.

Selected time period is whatever is chosen in the tester here:


Preferably the script provides the functionality to only look at a specific time period.
This can be achieved while collecting data or later, where the data is displayed in the backtest window. The latter is preferred.


(However, this is how it could look like, when the data collection of the script is limited via the input menu in the tester:

Possibility to choose multiple time periods in hours (the script only looks at included time period)
Include hours → ON / OFF
From:
To:

(4x the same input)

Possibility to exclude multiple time periods in hours (the script ignores excluded time periods)

Exclude hours → ON / OFF
From:
To:

(4x the same input)

Here is a list of things the script should collect information about and display aggregated results for the selected time period.


1. Amount of Consecutive positive, negative candles + Average size of candlestick formation in points and %
How Average size of candlestick formation could be calculated. If there is a more efficient way to calculate is that would be even better.

Bullish candlestick formation:
- points: (Close prize last candle of formation – Open prize first candle in formation) x 100
- %: (Close prize last candle of formation – Open prize first candle in formation) / Open prize first candle in formation x 100

Bearish candlestick formation:
- points: Open prize first candle of formation – Close prize last candle in formation x 100
- %:  (Open prize first candle of formation – Close prize last candle in formation) / Open prize first candle of formation x 100

In the following there will be an example how this aggregated information could look like. This is just an example. This example is only for one hour of the day. As mentioned before all hours of the day have to be displayed.

(See this again:
)

Preferably it is also possible to have the script display custom time intervals. How the results are displayed has to be discussed with the developer.

Example of what is meant by amount + size of candlestick formations
10 a.m – 11:am
Bullish candles:
- candle number 1: 15; 28p
- candle number 2: 8; 39p
- candle number 3: 4; 51p
- candle number 4: 1; 58p
- candle number 5: 0
Bearish candles:
- candle number 1: 18; 21p
- candle number 2: 5; 13p
etc.

2. Average maximum for bullish formations, Average minimum for bearish formations in points and %.

Maximum / Minimum includes the wick / shadow of the candle, while average size only included the candle body.

How maximum / minimum could be calculated.

Bullish candlestick patterns:
points: highest price in formation - open prize first candle of formation
%: (highest price in formation - open prize first candle of formation) / open prize first candle of formation x 100

Bearish candlestick patterns:
points: Open prize first candle of formation – highest price in formation
%: (Open prize first candle of formation – highest price in formation) / open prize first candle of formation x 100

Example
10 a.m – 11:am
Bullish candles:
- candle number 1: 15; 28p, maximum: 38p etc.
- candle number 2: 8; 39p
- candle number 3: 4; 51p
- candle number 4: 1; 58p
- candle number 5: 0
Bearish candles:
- candle number 1: 18; 21p, minimum: 31p etc.
- candle number 2: 5; 13p
etc.

3.  Average spread in points and %

The spread is calculated at the beginning of each new candle and divided by 60 to get an average for every hour.

spread in points: ask – bid
spread in % =  (ask – bid) / ask * 100

The requirement specifications for this task are only a draft and are to be completed with suggestions of the developer how to achieve the outlined task.
The task for the developer does not only include the writing of the code, but also to think about of how to realize the task, which again, is only outlined in the requirement specifications.
Therefore the developer needs to completely understand the task.
It is in the interest of the developer to ask all the questions which are not clear beforehand.
To solve the task, it is necessary for the developer to communicate his strategy and understanding before the coding can begin.

Additional payment based on the work required to complete the task is negotiable as long as the desired result will be achieved.

At the end the source code is required.
Troubleshooting has to be provided by the developer in case of errors which are detected only after the payment is completed.

Developers which are interested in a long term cooperation are preferred.

Responded

1
Developer 1
Rating
(240)
Projects
302
28%
Arbitration
32
25% / 63%
Overdue
9
3%
Loaded
2
Developer 2
Rating
(1)
Projects
1
0%
Arbitration
0
Overdue
0
Free
3
Developer 3
Rating
(462)
Projects
483
75%
Arbitration
5
80% / 0%
Overdue
0
Working
4
Developer 4
Rating
(14)
Projects
19
11%
Arbitration
1
0% / 100%
Overdue
5
26%
Free
5
Developer 5
Rating
(9)
Projects
8
50%
Arbitration
6
17% / 50%
Overdue
2
25%
Free
Similar orders
strategy is as follows market gold, timeframe 1 hour. for buys once a candlestick closes 10 pips or lower away from candlestick high. for sells once a candlestick closes 10 pips or lower away from candlestick low, the stop loss is 100 pips and he take profit is two things one 500 pips or for buys once candlestick closes 10 pips or lower away from low of candle stick, and sells once candlestick closes 10 pips or lower
New EA Urgent! 30+ USD
greetings,i am currently looking for a good programmer to help me develop a custom ea using a custom indicator,the strategy will be based on currency correlation,the ea should also have a break even stop loss...thank you
Hi There, I have an indicator which i am using to take trades manually and looking to automate trades through EA. Reach out to discuss further on this work. Cheers
We are looking to acquire an existing, profitable EA that trades using price action–based logic . The EA must operate as a day-trading system with proper Stop Loss and Take Profit , and must NOT use grid, martingale, or high-frequency scalping . This is a buyout request — we want to purchase the complete strategy along with the full source code . We are not looking to develop a new EA from scratch
Build a low-latency, event-driven trading bot for Polymarket esports markets that ingests real-time PandaScore LoL match events , converts them into dynamic win-probability estimates , detects micro-latency mispricing opportunities , and executes short-hold automated trades , with an architecture designed to scale later to Dota 2 and CS2
Hola, Necesito un EA o sistema que me permita copiar operaciones de una cuenta de origen (demo, inversor o real) a una cuenta real , con ciertas reglas específicas que detallo a continuación: Requisitos Tipo de órdenes: La cuenta de origen puede abrir operaciones como Buy Stop o Sell Stop , pero en la cuenta real quiero que se abran órdenes de mercado al instante , tan pronto la operación se activa en la cuenta de
I will develop a custom MetaTrader 5 Expert Advisor based on the client’s provided trading rules. The EA will include proper entry and exit logic, stop loss and take profit handling and stable risk management. The code will be clean, non-repainting, MT5 compliant, and delivered with full source files. "Risk Disclosure : Trading in financial markets involves risk, and results depend on market conditions, broker
I'm looking for someone who can create a EA for an existing MT5 indicator. The goal is to have the EA execute orders when the indicator gives a signal. I already have the SC to the indicator. I would prefer an EA that can be added to the existing Indicator. Message me for more details
I need a professional developer to build a Telegram-to-MetaTrader trade copier system. Project overview: - A Telegram bot will read trade signals from a Telegram channel - Trades will be automatically executed on MT4 and/or MT5 accounts - The system must support copying trades to multiple MetaTrader accounts - Execution should work even when the user is offline Functional requirements: - Structured signal format
Robot mt5 30 - 120 USD
Urgent! I need a bot like the one in the video for the MT5 platform, working the same way on a real account. Please watch the video as soon as possible

Project information

Budget
60 - 250 USD
Deadline
from 4 to 30 day(s)