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
비슷한 주문
I have 2 trading view indicators by GainzAlgo that I want code to mt5 , could u advise? I need you to give me response if you can convert This
I DO NOT need any programming or strategy development. I already have a working NinjaTrader 8 automated strategy based on a 3/5 EMA crossover. I need you to run my existing strategy through NinjaTrader Strategy Analyzer/Optimizer, test the existing adjustable parameters, and find robust settings with the best profit factor and lowest reasonable drawdown. I will provide the existing NinjaScript ZIP. I do not want the
Yes, that is exactly what I need. The bot should not be restricted to a fixed list of currency pairs. It should technically scan all available Quotex pairs in real time and automatically select the pair where the market conditions are strongest. The bot should analyze each pair using multiple confirmations, such as short-term price momentum, trend direction, market structure, support/resistance, candle formation
Platform: TradingView Programming Language: Pine Script v6 Type: Custom Indicator Project Name: Scalping Reaction Zones + Valid Order Blocks MAIN GOAL I need a custom TradingView indicator for scalping. The indicator must detect: 1. Reaction / Explosion Zones 2. Valid Order Blocks 3. Combined Reaction Zone + Order Block zones The indicator should NOT generate: Buy signals Sell signals TP SL Entry signals Trading
Project Description I am looking for an experienced MQL5/MT5 Expert Advisor developer to develop an automated trading EA for XAUUSD on the M3 timeframe , running on an Exness account . The EA will automate a manual strategy based on SNR/GAP zones , using two setup types: Price Rejection Price Correction The EA should identify valid BUY/SELL setups around predefined SNR/GAP areas, apply configurable RSI, SMA, EMA and
Indicador Maximas e Minimas + Super Trend O Indicador MAX/MIN é um indicador de análise técnica para o MetaTrader 5 , desenvolvido para ajudar você a identificar regiões importantes de preço e possíveis oportunidades de compra e venda. O que ele faz MAX/MIN: identifica máximas e mínimas relevantes do mercado e mostra os preços no gráfico. HH / HL / LH / LL: ajuda a visualizar a estrutura do mercado, mostrando quando
Hello Traders, Have a trading strategy or idea you want to automate? I specialize exclusively in MQL5 development, helping traders turn their concepts into professional trading solutions. Custom Expert Advisors — automate your strategy and reduce manual execution Custom Indicators — transform your market ideas into powerful trading tools Fix & Debug — identify errors and get your existing code working properly
I DO NOT need any programming or strategy development. I already have a working NinjaTrader 8 automated strategy based on a 3/5 EMA crossover. I need you to run my existing strategy through NinjaTrader Strategy Analyzer/Optimizer, test the existing adjustable parameters, and find robust settings with the best profit factor and lowest reasonable drawdown. I will provide the existing NinjaScript ZIP. I do not want the
I'm looking for an experienced developer to create an automated gold trading bot. The bot should be compatible with MetaTrader 4/5 and TradingView. Key Requirements: - Automated trading bot - Compatible with MetaTrader 4/5 and TradingView - Implement scalping and swing trading strategies Ideal Skills and Experience: - Proficiency in trading algorithms - Experience with gold trading - Familiarity with MetaTrader and
I need a robust optimization of my MT5 EA, mainly for XAUUSD (Gold). Please optimize the existing adjustable parameters such as entry/exit settings, SL/TP, trailing/break-even settings, and any other strategy parameters that are appropriate. I want the optimization focused on stable profitability, low/moderate drawdown, and robustness rather than simply the highest possible profit. Please use out-of-sample testing