8 ERROR ON THE CODE FOR MY EA

Specification

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);

      }

   }

}


Responded

1
Developer 1
Rating
(40)
Projects
60
8%
Arbitration
12
58% / 42%
Overdue
1
2%
Free
2
Developer 2
Rating
(15)
Projects
19
37%
Arbitration
2
0% / 100%
Overdue
0
Free
3
Developer 3
Rating
(53)
Projects
78
21%
Arbitration
1
100% / 0%
Overdue
1
1%
Free
4
Developer 4
Rating
(14)
Projects
16
31%
Arbitration
0
Overdue
1
6%
Free
5
Developer 5
Rating
(407)
Projects
461
34%
Arbitration
24
42% / 46%
Overdue
6
1%
Free
6
Developer 6
Rating
(52)
Projects
96
24%
Arbitration
10
20% / 20%
Overdue
12
13%
Working
7
Developer 7
Rating
(309)
Projects
330
70%
Arbitration
4
100% / 0%
Overdue
1
0%
Working
8
Developer 8
Rating
(31)
Projects
41
20%
Arbitration
9
11% / 89%
Overdue
5
12%
Free
9
Developer 9
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
10
Developer 10
Rating
(555)
Projects
922
48%
Arbitration
300
59% / 25%
Overdue
123
13%
Working
11
Developer 11
Rating
(17)
Projects
24
50%
Arbitration
1
100% / 0%
Overdue
3
13%
Loaded
12
Developer 12
Rating
(7)
Projects
6
0%
Arbitration
5
0% / 100%
Overdue
1
17%
Free
13
Developer 13
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
"I'm on the lookout for a proficient developer to help actualize my tailored NT8 strategy. Your mastery in this field is pivotal for the project's success. Would you be open to partnering for a mutually beneficial collaboration? Let's explore the details together. Thank you for considering!"
Hello I have Order Flow Chart & Software Depends on Ninjatrader I want to EA a trading robot that works on different platforms via API Expert NinjaTrader Programmer for Cross-Platform Trading Robot I'm in need of a skilled NinjaTrader programmer to develop a cutting-edge trading robot that seamlessly operates across various platforms via API integration? I want a customized Expert Advisors (EAs) tailored to your
"I'm in search of a skilled developer to bring my customized NT8 strategy to life. Your expertise is crucial for the success of this project. Would you be interested in joining forces for a fruitful collaboration? Let's connect to delve into the specifics together. Much appreciated!"
I HAVE A FUNCTIONAL MT5 EA (MQL5) THAT IS BASED ON CANDLE OPEN BUT I WOULD LIKE TO AUTOMATE IT WITH OTHER PROFITABLE STRATEGIES REQUIREMENT SPECIFICATION 1. I want an experienced developer to integrate a strategy to analyse the market and open buy only trade or sell only trade according to the direction of the analysis. 2. The modification and strategy should combine many confirmations that ensure high win rates of
I would like you to create an MT5 indicator and apply bollinger bands on a spread buffer. In MT4 we have iBandsOnArray but in MT5 there is nothing like that. Please find a way to create the Bollinger bands and apply them on a buffer. Just keep it simple. My only requirements are: 1. Close price buffer of EURUSD 2. Close price buffer of GBPUSD 3. Spread buffer which is buffer1 minus buffer2 (EURUSD close price -
I am in search of a skilled MQL5 developer with a proven ability to optimize trading robots across various assets, including synthetic indices like V75, Boom and Crash, gold, US30, US100, and more. I'm looking for an experienced developer to enhance my multi-asset trading EA, which was originally developed exclusively for V75 and is based on the smart money concept. The developer must be free in taking up the job
About the file i need I have ea ex4 file but it use to set buystop or sellstop oders etc now what I want is to fit the propfirm am using because the propfirm am using have a lot size consistency rules so what I need is even if the ea set multiple buystop the file will only allow the ea to pick 2 positions and automatically delete the nearest limit Oder it can only allow the ea buystop or new position once the two
Objective: To Create an EA based on an EMA cross Strategy that utilizes martingale account management strategy with multiple profiles to better manage risk and scale safely Strategy Concept: This strategy was created around Volatility Index 75 on the 5 minute chart. It was Observed that this Index tends to frequently form very strong trends with short periods of consolidation. On applying a 10 period
Hello, I'm looking for a trade copier from MT5 to NT8. The copier should be able to: 1.) Open/closed trade based on the position in MT5. 2.) Fast executions of trades. 3.) Adjustable Lot Size
Buenos días, estoy buscando desarrollar una EA que utilice los retrocesos de fibonacci. y sus extensiones ya que operando manualmente me ha dado buenos resultados, las condiciones son las siguientes: dibujar fibonacci entrada entre el nivel 78.60% y 88.00% stop loss en el nivel 120.00 % take profit entre el 0.00% y el -27.00% lotaje basado en los pips de distancia entre la entrada y el stop loss, siempre arriesgando

Project information

Budget
30 - 40 USD
For the developer
27 - 36 USD
Deadline
from 1 to 31 day(s)