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
類似した注文
I'm looking for an expert MQL5 developer that can create an EA that's based on my price action trading strategy with no indicators. The EA must analyze trades based on my price action rules, enter trades based on my price action rules, manage trades based on my price action rules and exit trades based on my price action rules
hi hi there i have an strategy on tradingview and i want to automate it like metatrader EA so i want the strategy to open and close trade automaticlly on tradingview
We are looking for an experienced Expert Advisor Developer who can build a customized MT5 Expert Advisor for us. The Expert Advisor would use two built-in indicators as entry/exit signals and our own risk management strategy with customizable inputs. The goal is to create a reliable and efficient trading tool that can automate our trading process on the MT5 platform. Skills required: - Strong understanding of
I need stochastic div (hidden &regular ea) that should perform task in all tf's ..divergence is a repaint stly so i want to use it with candlestick flips .. so bet for it
Hello, I have an indicator from a friend and I'd like to replicate it on my own TradingView or MT5 platform. Could you assist me with that?. Here is the link
so basically I have an EA(mql5), AI script(python), flask server and socket server both on python. Now this is an experimental script as I am trying to learn. However the EA is not entering any trades. How much would it cost for you to troubleshoot this for me? Thank you in advance
NEW FUNCTION 50+ USD
La idea es la siguiente, sería un EA semi automático. Yo como trader opero en zonas. En adelante las vamos a denominar ``zonas calientes´´. El EA debe que necesito debe operar conforme a 4 zonas calientes que yo configure en el mismo. ¿Qué hará el EA en cada una de esas zonas calientes que yo he configurado? En cada una de estas zonas el EA debe realizar hedging (crear un rango en el cual el EA entrara en sell o en
I have the bot just over half made, from another developer who let me down and decided they no longer wished to finish the project, so I have a basic example of the fundamentals of what it could look like, although multiple functions I require do not work, but I can show this to you on request. There are multiple features that I require, so please read the in depth requirement sheet on the attachment. Function: To
I need EA that works on MT5 to be able to do the following: - Can recognize Support/Resistance area - Can recognize VWAP direction. - Can recognize RSI. - Can recognize Double Top/bottom, Bullish/Bearish hammer candle, Bullish/bearish engulfing candle. - Ability to set Stoploss below/above support/resistance, but risk must be fixed at a certain price. - Stoploss
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5

プロジェクト情報

予算
80 - 140 USD
開発者用
72 - 126 USD
締め切り
最低 1 最高 60 日