Repair the compilation error

Trabalho concluído

Tempo de execução 1 dia

Termos de Referência

i need to repair the existing EA that has been wrongly written.

Here is a summary of the requirements for the EA and how they must been implemented in the code:

On every new bar, the EA needs to analyze the chart to see if there are any open positions. If there are no positions, the EA will enter a trade based on the candle: bullish candles will result in a buy trade, bearish candles will result in a sell trade. This must be implemented in the OnTick() function.

If the chart already has positions entered by the EA, the EA will only enter a new trade if the last position is at a loss. The lot size for the new position must be calculated using the martingale method. This must be implemented in the MartingalePosition() function.

The EA name and the number of positions of the same direction should be added to the comment section for each trade. This must be implemented in the FirstPosition() and MartingalePosition() functions.

If Hedging is set to false, the EA will only enter trades in one direction at a time. If the first position is a buy trade, all subsequent martingale positions must also be buy trades. If the first position is a sell trade, all subsequent martingale positions must also be sell trades. If Hedging is set to true, the EA will enter trades in both directions. This must be implemented in the MartingalePosition() function.

After every trade, the EA will modify the take profit of all positions in the same direction to a single break even point plus a take profit level. This must be implemented in the ModifyTakeProfit() function.

The global variables should include the lot size, take profit level, martingale multiplier, EA name, expiry date, magicnumber, and Hedging flag. These global variables must be defined at the beginning of the code.

The code should be sorted into blocks for each part of the EA's functionality, such as entering the first position, entering martingale positions, and modifying the take profit level. The code must be organized into separate functions for each of these parts.


Arquivos anexados:

MQ4
1111.55.mq4
15.5 Kb

Respondido

1
Desenvolvedor 1
Classificação
(98)
Projetos
137
52%
Arbitragem
5
40% / 60%
Expirado
0
Livre
2
Desenvolvedor 2
Classificação
(217)
Projetos
369
33%
Arbitragem
34
41% / 29%
Expirado
108
29%
Livre
Publicou: 1 código
3
Desenvolvedor 3
Classificação
(16)
Projetos
35
23%
Arbitragem
4
0% / 50%
Expirado
2
6%
Trabalhando
4
Desenvolvedor 4
Classificação
(7)
Projetos
14
21%
Arbitragem
1
0% / 100%
Expirado
3
21%
Livre
5
Desenvolvedor 5
Classificação
(1)
Projetos
2
0%
Arbitragem
1
0% / 100%
Expirado
0
Livre
6
Desenvolvedor 6
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Publicou: 4 códigos
7
Desenvolvedor 7
Classificação
(64)
Projetos
77
55%
Arbitragem
4
0% / 50%
Expirado
1
1%
Trabalhando
Publicou: 6 códigos
8
Desenvolvedor 8
Classificação
(77)
Projetos
244
74%
Arbitragem
7
100% / 0%
Expirado
1
0%
Livre
Publicou: 1 artigo
Pedidos semelhantes
Title Professional AI Automation Trading Bot for Forex & Crypto Solution Language Python (preferred) or MQL5 depending on integration requirements. Categories Expert Advisor (EA) for MetaTrader 5 Automated trading strategies AI/ML-based signal generation Risk management automation Required Skills Strong knowledge of MQL5/Python Experience with MetaTrader API integration Machine learning model deployment
BullyMax Pro 30+ USD
"Act as an expert MQL5 algorithmic trading developer. I want you to create a profitable and efficient Expert Advisor for MetaTrader 5. Do not write the code yet; read the following trading rules, analyze them, and ask me any clarifying questions if needed. Timeframe: [e.g.15 minutes Chart] Entry Logic: [e.g.MACD + RSI + REVERSAL PRICE ACTION. Enter buy when Macd line crosses above the signal line ,RSI above 30 and
I want an indicator that displays the risk reward ratio of each chart candle as a sub window histogram. If the candle closes above the open the histogram displays a green bar above zero the size of which is dependant on the size of the RRR. If the candle closes below the open the histogram displays a red bar below zero the size of which is dependant on the size of the RRR. My attempt that does not work is attached
Hi, I am looking for an experienced MQL5 developer to modify an existing, fully functional MetaTrader 5 Expert Advisor (Source code .mq5 Version 2.62 will be provided). Brief Overview of the EA: It executes trades based on 4 custom Supply/Demand levels (R1, R2, S1, S2) which are inputted manually . It uses two custom indicators for confirmation: SPA (Price Action filter) and AMG (Volume/Momentum filter). The code
I really like this platform. I am interested in trading and need funds for it. I enjoy both crypto and forex trading.I"really appreciate this platform. I am keen on trading and am looking for trading funds. I enjoy trading in both cryptocurrency and forex."
Titan Quantum Algo Engine V2 is an advanced MT5 Expert Advisor designed to identify high-probability market opportunities using trend analysis, breakout detection, and intelligent risk management. The EA automatically executes trades, manages stop-loss and take-profit levels, and helps traders maintain disciplined trading with optimized entry and exit strategies
The striker robot 30 - 2000 USD
I would like a trend and pullback strategy for the robot timeframe:15 minutes(m15) or 1 hour(h1) indicators:50 EMA (Exponential Moving Average)/200 EMA/RSI (14) BUY SET UP 1.Confirm The Trend .50 EMA must be above 200 EMA .Price must be above both EMAs 2.Wait for a pullback .Do not buy when the price shoots up. .Wait for the price to come back near the 50 EMA 3.Confirm entry .ENTER BUY WHEN: .A bullish candlestick
I do not have any startegy, and I want you to create one with your experience, you will provide me EA along with source code. you may use Grid or any logic, but the EA should keep generating profit during Newyourk and Asian session
I need an Ai trading bot for Binance and BTC on MT5 that also uses order flow data. It should also make use of TSI- Temporal indicator sampling and also it should make use of fundamental analysis in the process of signal generation
Hello, I need a MetaTrader 5 Expert Advisor (EA) for XAUUSD. Place Buy Stop orders above current price every 0.300 distance Place Sell Stop orders below current price every 0.300 distance 10 levels up and 10 levels down Lot size fixed 0.01 No TP/SL required, manual close only No duplicate orders on restart Please confirm if you can build this and your final price and delivery time

Informações sobre o projeto

Orçamento
30+ USD
Prazo
de 1 para 10 dias