Building a ZigZig_EA MT5

MQL5 Experts

Spécifications

Building a ZigZig_EA MT5
If you used ZigZag indicator at least once, you know how many compromises you have to make when searching for optimal parameters. Too small parameter values divide a big movement into small parts, while too big parameter values skip short movements. The algorithm for searching graphical patterns is very demanding as of quality of finding extremums. While trying to find a middle ground, I decided to use the indicator with small parameter values and create an additional superstructure combining unidirectional movements with short corrections into one movement.
The attached CTrends class Trend.mqh has been developed to solve this issue.  During the initialization, a reference to the indicator class object and the minimum movement value considered as a trend continuation are passed to the class.
To get data on extremums, the following methods are provided in the class Trend.mqh:
•    ExtremumByTime — get the extremum number in the database for a specified time,
•    Extremum — return extremum at a specified position in the database,
•    IsHigh — return true if a specified extremum is a top and false if it is a bottom.
The general information block features methods returning the total number of saved extremums, used symbol and timeframe.
------------------------------------------------------------------------------------------------------------------
The main class logic of Trend.mqh is implemented in the Calculate method. Let's take a closer look at it.
At the beginning of the method, check the relevance of the reference to the indicator class object and the presence of extremums found by the indicator.
Next, define the number of unprocessed extremums. If all extremums are processed, exit the method with the true result.
After that, request the necessary amount of extremums from the indicator class.
If there have been no extremums in the database up to this time, add the oldest extremum to the database by calling the AddTrendPoint method.
Next, arrange the loop with iteration over all downloaded extremums. Previous extremums before the last saved one are skipped.
In the next step, check if the extreme points are unidirectional. If a new extremum re-draws the previous one, update the data.
For oppositely directed extreme points, check whether the new movement is a continuation of a previous trend. If yes, update data on extremums. If no, add data on the extremum by calling the AddTrendPoint method;
------------------------------------------------------------------------------------------------------------------


You need the classes:
Include/ZigZag.mqh
Include/Trends.mqh

You might need those classes also:
Include/Pattern.mqh
Include/Header.mqh
Include/Trade/LimitTakeProfit.mqh

All functions from ZigZag indicator and the optimizer ZigZag.mqh and Trends.mqh should be changeable in the EA.
Based on the smoothed ZigZag signals, the EA should sell or buy as follows:
Here is an example of the logic needed. It would be good to encapsulate this logic in a separate class, so that it can easily fit on a new base later:
Let's say (optimized) ZigZag indicator generates a sell signal for EURUSD at 1.20660 then EA checks the latest bottom price where (optimized) ZigZag indicator turned upwards. This may was 1.20563. Then ZigZag_EA calculates the difference between 1.20660 and 1.20563 that is 0.00097 and divide it by a figure I want to choose, 6 for example That comes to 0.00016. Take profit is then 1,20643.
After that EURUSD make an unexpected rise to 1.2077 and (optimized) ZigZag indicator redraws and generates a sell signal again. ZigZag_EA sells again (a number of times of the first lot I want to set, like martingale. New take profit for the new sell position would be at (1.2077- 1.20563)/6+1.20563=1.205975 but ZigZag_EA must not set a new TP .
Meanwhile I am 0.00207 in loss with the first position, of course. Then market turns and the last position generates profit. At the very point when the profit of first position plus the profit of second position equals the first TP distance of 0.00097 close all sell positions.
For buy positions vice versa.

Dossiers :

ZIP
MQL5.zip
13.0 Kb

Répondu

1
Développeur 1
Évaluation
(172)
Projets
195
11%
Arbitrage
37
38% / 35%
En retard
5
3%
Chargé
2
Développeur 2
Évaluation
(12)
Projets
12
25%
Arbitrage
1
0% / 100%
En retard
0
Gratuit
3
Développeur 3
Évaluation
(155)
Projets
239
70%
Arbitrage
3
67% / 33%
En retard
20
8%
Gratuit
4
Développeur 4
Évaluation
(392)
Projets
420
69%
Arbitrage
4
75% / 0%
En retard
2
0%
Travail
5
Développeur 5
Évaluation
(42)
Projets
88
14%
Arbitrage
31
29% / 55%
En retard
36
41%
Travail
Commandes similaires
Copy Trader 30+ USD
I already have a robot that copies all operations from a master account, it also copies pending orders and I need an option so that I can invert the signals sent by the master account, I am attaching the receiving robot to add the option to invert the signal
Scope of work : - Choose a specific period for strategy application. - Determine the highest and the lowest price levels (breakout levels) within the chosen period. - At a specific inside level within these two levels, create one buy stop and one sell stop - Implement buy and sell triggers based on price breaking through these levels with defined pips. - Option to use moving average as a filtering condition. - Option
- The program is to have active and inactive periods through the week. - When active, it is to open trades based off either a fixed Buy / Sell instruction, or comparison between a moving average and the current mid-price. - The take profit, stop loss, and stake per point are all determined by a value called the “increment” which cross references a string of comma separated values given by the user such as
STACKING MAGIC STRATEGY 150 - 400 USD
1. Determine Support and Resistance on the higher time frame, 4 Hours (H4) or Daily (D1). 2. Robot can pick Lot size depending on the Account size. E.g. 0.01 for a $100 account To $1000, $2000 a/c 0.02 ETC 3. Ideally, the distance between my Support and Resistance should be at least 200 To 350 Pips. 4. Since the strategy is candlesticks dependent, move down to the Lower time frame 1 Minute (M1) OR 5
I'm looking for a skilled developer to create a custom MT5 EA that integrates with Twitter to copy trading signals from a specific Twitter handle and execute them on MT5. The EA should be able to monitor the Twitter feed in real time (or near real-time), parse trading signals based on predefined formats, and execute trades automatically. Project Requirements: Twitter API Integration : Set up and configure access to
Trade Copier 200 - 300 USD
Hi Sir im searching a Skilled MQL5 Developer Programmer , I want to Develop a Trade Copier , Like Master and Slave Accounts , Trade Copier Between MT4 to MT4 & MT5 to MT5 to MT5 & MT5 to Mt4 Copier with my Specific Requirements Thanks
A robot 40 - 46 USD
Hy I am looking for someone who can make me robot using my own strategy..my strategy is SMC ..I want it only shows me Bos , choch and liquidity... I have entry to show you and Tp that is only things are need
Hello everyone I‘ve designed a unique risk management and coded it already into a include file for mql5. The implementation is done with a few libe of code. I would like to booster your strategy and obviously take also advantage from it. Please provide me some backtests in pictures (5 years minimum with >99% data quality) of your best EA for MT5. It would be also good if your EA has a fixed takeprofit level
The Moving Average Cross needs debugging for live chart . [Condition 1] Personalized Omega Trailing Stop Loss ( Details of how it works will be provided , If still necessary the expert where it works just fine will be provided . ) Couple of Input parameters that needs to be removed (previous dev just added ) [ He can be contacted if necessary ]. Following are the implementations required by my expert : 1. Auto Lot
Hello Here Everyone, I need an expert to help me create a tradingview indicator that works exactly according to my requirements, Even though i will attach a file there review it and let me know if you could do it and we can talk about the price as well

Informations sur le projet

Budget
100+ USD
TVA (19%): 19 USD
Total: 119 USD
Pour le développeur
90 USD