8 ERROR ON THE CODE FOR MY EA

Termos de Referência

GOOD DAY

I have created a robot using mql5 however though i have 8 errors and i tried everythin i can do but still failing.


Please advise on what to do, i am will to add more if someone can solve my issue.


PLEASE FIND THE CODE BELOW.


p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px 'Helvetica Neue'; color: #000000} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px 'Helvetica Neue'; color: #000000; min-height: 12.0px}

#include <Trade\Trade.mqh>


input int length = 22;

input float mult = 3.0;

input bool showLabels = true;

input bool useClose = true;

input bool highlightState = true;


input double lotSize = 0.1; // Lot size for trading

input double stopLoss = 50; // Stop loss distance in points

input double trailingStop = 0.3; // Trailing stop percentage


//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+

void OnStart()

{

   CTrade trade;

   

   int totalBars = Bars;

   double atr[];

   double longStop[];

   double shortStop[];

   int dir[];

   bool buySignal[];

   bool sellSignal[];


   ArraySetAsSeries(atr, true);

   ArraySetAsSeries(longStop, true);

   ArraySetAsSeries(shortStop, true);

   ArraySetAsSeries(dir, true);

   ArraySetAsSeries(buySignal, true);

   ArraySetAsSeries(sellSignal, true);


   for (int i = length; i < totalBars; i++)

   {

      atr[i] = mult * iATR(_Symbol, _Period, length, i);


      double highRange = useClose ? iHigh(NULL, _Period, i) : iHighest(NULL, _Period, MODE_HIGH, length, i);

      double lowRange = useClose ? iLow(NULL, _Period, i) : iLowest(NULL, _Period, MODE_LOW, length, i);

      

      longStop[i] = highRange - atr[i];

      longStop[i] = MathMax(longStop[i], longStop[i - 1]);


      shortStop[i] = lowRange + atr[i];

      shortStop[i] = MathMin(shortStop[i], shortStop[i - 1]);


      dir[i] = iClose(NULL, _Period, i) > shortStop[i - 1] ? 1 : iClose(NULL, _Period, i) < longStop[i - 1] ? -1 : dir[i - 1];


      buySignal[i] = dir[i] == 1 && dir[i - 1] == -1;

      sellSignal[i] = dir[i] == -1 && dir[i - 1] == 1;


      if (buySignal[i])

      {

         double entryPrice = iOpen(NULL, _Period, i + 1);

         double stopLossPrice = entryPrice - stopLoss * Point;

         double takeProfitPrice = entryPrice + trailingStop * entryPrice * Point;

         trade.Buy(_Symbol, lotSize, entryPrice, stopLossPrice, takeProfitPrice, 0, "Buy Signal", 0, clrNONE);

      }

      else if (sellSignal[i])

      {

         double entryPrice = iOpen(NULL, _Period, i + 1);

         double stopLossPrice = entryPrice + stopLoss * Point;

         double takeProfitPrice = entryPrice - trailingStop * entryPrice * Point;

         trade.Sell(_Symbol, lotSize, entryPrice, stopLossPrice, takeProfitPrice, 0, "Sell Signal", 0, clrNONE);

      }

   }

}


Respondido

1
Desenvolvedor 1
Classificação
(43)
Projetos
65
11%
Arbitragem
12
58% / 42%
Expirado
1
2%
Livre
2
Desenvolvedor 2
Classificação
(15)
Projetos
20
35%
Arbitragem
2
0% / 100%
Expirado
0
Livre
Publicou: 1 código
3
Desenvolvedor 3
Classificação
(82)
Projetos
154
42%
Arbitragem
2
100% / 0%
Expirado
4
3%
Livre
4
Desenvolvedor 4
Classificação
(15)
Projetos
17
29%
Arbitragem
0
Expirado
1
6%
Livre
5
Desenvolvedor 5
Classificação
(535)
Projetos
613
34%
Arbitragem
34
38% / 47%
Expirado
9
1%
Ocupado
6
Desenvolvedor 6
Classificação
(54)
Projetos
102
23%
Arbitragem
12
25% / 17%
Expirado
13
13%
Livre
7
Desenvolvedor 7
Classificação
(438)
Projetos
458
73%
Arbitragem
5
80% / 0%
Expirado
0
Trabalhando
8
Desenvolvedor 8
Classificação
(31)
Projetos
41
20%
Arbitragem
9
11% / 89%
Expirado
5
12%
Livre
9
Desenvolvedor 9
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
10
Desenvolvedor 10
Classificação
(574)
Projetos
945
47%
Arbitragem
303
59% / 25%
Expirado
125
13%
Livre
11
Desenvolvedor 11
Classificação
(84)
Projetos
115
70%
Arbitragem
5
80% / 0%
Expirado
11
10%
Trabalhando
12
Desenvolvedor 12
Classificação
(7)
Projetos
6
0%
Arbitragem
5
0% / 100%
Expirado
1
17%
Livre
13
Desenvolvedor 13
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
Pedidos semelhantes
I would like to have an Expert Advisor created with the following parameters. This Expert Advisor should analyze the higher time frame and the medium time frame, and based on that, open positions on the lower time frame. For this reason, I would like to work with developers who have experience in multi-timeframe analysis. I have a PDF file that explains the entire trading logic. In addition, I have compressed the
I'm looking to acquire a ready-made, consistently profitable Expert Advisor (EA) for MetaTrader 5 (MT5). The EA should be well-tested in both backtesting and live trading conditions and based on a clear, logical trading strategy (not a black box). I'm open to a variety of strategies as long as they are stable, explainable, and show consistent results
I am looking for a profitable trading bot (Expert Advisor) for MT5. The bot should have: Consistent performance with proven backtest and preferably live results Strong risk and money management features Easy setup and user-friendly inputs Please share your proposals with details and pricing
Hello, I am looking for an experienced QuantConnect/Lean developer for a trading strategy project on futures (Micro Nasdaq – MNQ) with Interactive Brokers integration (paper + live). The strategy includes several key features: • Multi-timeframe analysis (signal validation across multiple horizons) • Integration of economic news/events into the trading logic • Advanced risk management (daily stop, position sizing
I'm looking for an experienced MQL5 developer and trader to assist with the refinement, backtesting, and live trading optimization of a custom Expert Advisor (EA). The EA is based on a pure breakout strategy on XAUUSD. The main goals are: 1. Compile and straighten the code – ensure error-free, optimized, and professional coding standards. 2. Run and set up backtesting – produce results with gradual positive
The EA will have 3 moving average and trade are executed upon cross over.The EA will finally be in MQL4 and MQL5. The EA will also be protected with a password. Further description will be given after agreement
I need a good programmer who will build a forex EA with exact specifications. The EA parameters should be easily activated by on/off clicks... It's so multiple timeframe filters, monthly, weekly, daily and a H4 entry. Using Moving averages, RSI, %R, and candlestick ranges
I need a trading robot expert advisors/EA on MQL5. With the following strategies. Trend Following and Mean Reversion/Scalping and Range Trading* 1. *Trend Following and Mean Reversion*: Capture trends and profit from mean reversion opportunities. 2. *Scalping and Range Trading*: Profit from short-term price movements and range-bound opportunities. *Trend Following and Mean Reversion* - *Indicators:* - Moving
Hi guys Does anyone have experience with K-Means and MQL5? I would like to get an include file which I can use in my EAs. I would need to work with an ML Engineer who has deep understanding with K-Means. The include file should be used for regime detection. I can drop more information about my EA once I see that you qualify for the job :-) Cheers
Please translate the FX Blue copy trading EA into Chinese EA. Additionally, the software must centrally manage newly installed and uninstalled MT4/MT5 platform directories to uniformly manage the association between multi-terminal login trading accounts and copy trading accounts. Existing program solutions are preferred; candidates with relevant project development experience will be given priority consideration

Informações sobre o projeto

Orçamento
30 - 40 USD
Desenvolvedor
27 - 36 USD
Prazo
de 1 para 31 dias