Correction of existing EA for in mql4 and mql5.

Работа завершена

Время выполнения 40 дней
Отзыв от исполнителя
Thank you!
Отзыв от заказчика
Anand is very professional. I add the arbiter per mistake even though he conclude the job with excellence.

Техническое задание

I have same EA one for mt4 and same EA for mt5. 

Both of them work with an existing renko chart indicator that I have.

Correction for mql4 and Mql5:

1-SYNCHRONIZATION ( this is the only one will not be applied to mql5, only mql4)

This EA has a timer to synchronize with the renko timer. The renko box just close after a given timer (usually 1 minute) is reached. It seems that sometimes the EA is opening 2, 3 or 4 orders without the renko has closed the box to buy or sell. Need to fix this synchronization and I have some pics to explain.


2- FUNCTION MODES:

How is the lot calculated:

The names below are examples, not exactly as it is in the EA.

Loss? if yes

MAX BALANCE (record the max balance reached before the loss). The "money management" part of the EA  will work as far the MAX BALANCE is not recovered.

CUMLOSS (sum losses in pips until SLCOUNTER is reached)

SLCOUNTER (setting in pips, after the trade is closed, it compares the CUMLOSS with SLCOUNTER)

GALE(martingale Factor)

N (Power to the martingale factor)

{

IF CUMLOSS>SLCOUNTER

Apply (GALE^N) to next trade.

N = INT(CUMLOSS/SLCOUNTER)

}

After the GALE is applied, then the CUMLOSS is reseted and start the counting again until, after a trade is closed, the MAXBALANCE is crossed. Then reset to initial lot again.

Example in pips:

+30

-20

-21

CUMLOSS= 41

SLCOUNTER= 40

GALE=2

N= 41/40 = 1

Next trade will use,

(last lot size)* (GALE^N)

Now lets say

-20

+10

-20

-60

CUMLOSS=100

SLCOUNTER= 40

GALE= 2

N= 100/40= 2

next lot = (last lot size)* (GALE^2)


UNTIL HERE THE EA WORKS WITHOUT TWO OPTIONS THAT CAN BE SET TODAY (MODERATE AND RECOVERY):

  • A- MODERATE Function (is working fine):

If moderate is active, then:

MGT (MAXIMUM MARTINGALE TIMES)setting in "times"

Calculate N (GALE POWER)

IF N<MGT, N=N

ELSE MGT

Example:

MGT=2

-40

-50

-60

CUMLOSS = 150

N=150/40 = 3 

As N>MGT

N=MGT

  • B- RECOVERY FUNCTION (need to be fixed)

Instead of using CUMLOSS to calculate lot, will use now RECLOSS

RECLOSS in stead of discard the positive trades after a loss, it considers it.

See comparison:

Example with SLCOUNTER=40

+20  RECLOSS=0  CUMLOSS=0

-20  RECLOSS=20 CUMLOSS=20

-30  RECLOSS=50 CUMLOSS=50

Apply gale normally and reset counting

-30  RECLOSS= 30 CUMLOSS=30

+10  RECLOSS= 20 CUMLOSS= 30

Whenever the running trade exceeds the MAX BALANCE it checks the RECOVERY OFFSET (pips) function

The trade is closed after the MAX BALANCE is exceeded in the RECOVERY OFFSET amount of pips.

Now, you see the RECLOSS reduces the counting as + trades happen. UNTIL HERE IS WORKING FINE

What need to be fixed is the following:

In case

Balance < MAX BALANCE (This means we are in loss condition)

Actual lot > initial lot (This means gale has already been applied)

And a + trade is closed that exceeds the SLCOUNTER positivelly,

the lot can be reduced applying GALE reverse.

If

N= (GAIN/SLCOUNTER)

So next lot will be ( ACTUAL LOT / (GALE^N) )

>>reset counting


3- PAUSE function (to be created)

Create Pause function yes/no

Create Pause % setting X

Create Y timer (minutes)

Whenever the drawdown is X%, the EA closes the trade(s)  where it is and pauses the EA for Y minutes. Every subsequent drawdown of same proportion will be paused again.


FINAL COMMENTS:

THE EA for MT5 has no timer and the renko for MT5 has no timer as well

The renkos are stable and don't need to be touched, unles to fix the problem 1.

The martingale calculation for MT5 seems to be working only when both MODERATE and RECOVERY functions are set + Trailling tick set. This must be fixed.

The Martingale can work indepentend of Moderate and Recovery set to yes as explained above.

MQL5 must be backtested capable









Файлы:

PNG
Settings.png
180.5 Kb

Откликнулись

2
Разработчик 2
Оценка
(91)
Проекты
144
38%
Арбитраж
67
15% / 48%
Просрочено
55
38%
Свободен
3
Разработчик 3
Оценка
(1)
Проекты
1
0%
Арбитраж
1
0% / 100%
Просрочено
0
Свободен
Похожие заказы
BUY AND SELL 30+ USD
Create an Expert Advisor that collaborates between these indicators ETR, MEv2 and STLv3 with these features 1. SL and TP 2. TIME FILTER 3. ETR, MEv2 and STLv3 PARAMETERS BUY ENTRY STEP 1. FIRST candle OPEN above Symphonie Trend Line STEP 2. Check Symphonie Extreme must indicate color BLUE STEP 3. Check Symphonie Emotion must indicate color BLUE STEP 4. Open trade with money management STEP 5. Trade open MUST BE 1
Hello, I have a protected Ninja trader Order Flow indicator and I was wondering if you can reverse engineer it to replicate the functionality. H ere are the specifications and indicator: https://docs.google.com/document/d/1KyYwQ7iTL2KWGhnZzxS1gObccu9LPMrGuMc9Mdk_3KY/edit?usp=sharing
I have an EA that need some changes including integrating the indicator code directly into the Expert Advisor. I will give the detailed doc once we settle on the candidate for the job . Please bid if you can work with the stated amount. Thanks
Hello, Need to convert Tradingview Indicator to MQL4 indicator. or if you have this one converted already, let me buy a copy please. If we're good, then will definitely buy it and ask to convert into EA on new order. Supertrend by KivancOzbilgic
Fix bug or modify an existing Trading view indicator to display correct. The indicator is working but not displaying/plotting all the information i want. So i want it adjusted to plot all the info
Here's a brief requirement you can use: **Description:** I am seeking an experienced MQL5 developer to create a (EA). The EA should include features for placing pending orders (Buy Stop and Sell Stop) based on market spread, managing trades effectively at the opening of new candlesticks, and implementing take profit and stop loss strategies. Additionally, I would like the option to adjust parameters based on market
I have an EA which i need to do below modifications. Variable Inputs to be added Order Type : Market , Pending Trade Type : Buy, Sell , Buy & Sell Pending Pips Step : ( Pips Value can be negative or positive to decide on what type of Pending Order ) // If trade type Buy is selected Close Type : Close All ( Bulk Close Option in MT5 ) , Close Individually Close Option : %of Equity , %of Balance , Amount $ , %of No
Add multiplier to grid recovery system. For example: Grid Trade 2-3 Spacing; 1.0 Multiplier Grid Trade 4-6 Spacing; 2.0 Multiplier Grid Trade 7+ Spacing; 1.6 Multiplier Need quick turn around. Need it done ASAP
Objects reader PIN 70 - 100 USD
Hi I have an indicator that create objects in the chart and using those following some rules the new indicator will create external global variables with value = 0 ( NONE ), = 1 ( BUY ) or = 2 ( SELL ). The global variable will use PIN external integer number . PINS are by now global variables (GV) whose name indicates the pair name and the PIN belonging and their value indicates it direction/action. PINS GV names
I want an indicator and its source code that returns the value of: - two moving averages in different selectable timeframes, with method Exponential and price calculation price_open; - Opening, closing, maximum and minimum of the candle in different timeframes And that returns the values ​​regardless in a chart of one minute. The input parameters: * select timeframe media1 = {1,2,3,4,5,...} * select timeframe media2

Информация о проекте

Бюджет
80 - 140 USD
Исполнителю
72 - 126 USD
Сроки выполнения
от 1 до 60 дн.