8 ERROR ON THE CODE FOR MY EA

Spécifications

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

      }

   }

}


Répondu

1
Développeur 1
Évaluation
(40)
Projets
60
8%
Arbitrage
12
58% / 42%
En retard
1
2%
Gratuit
2
Développeur 2
Évaluation
(15)
Projets
19
37%
Arbitrage
2
0% / 100%
En retard
0
Gratuit
3
Développeur 3
Évaluation
(56)
Projets
83
22%
Arbitrage
1
100% / 0%
En retard
1
1%
Travail
4
Développeur 4
Évaluation
(14)
Projets
16
31%
Arbitrage
0
En retard
1
6%
Gratuit
5
Développeur 5
Évaluation
(419)
Projets
476
34%
Arbitrage
24
42% / 46%
En retard
6
1%
Chargé
6
Développeur 6
Évaluation
(52)
Projets
96
24%
Arbitrage
9
22% / 22%
En retard
12
13%
Travail
7
Développeur 7
Évaluation
(316)
Projets
336
71%
Arbitrage
4
100% / 0%
En retard
1
0%
Travail
8
Développeur 8
Évaluation
(31)
Projets
41
20%
Arbitrage
9
11% / 89%
En retard
5
12%
Gratuit
9
Développeur 9
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
10
Développeur 10
Évaluation
(557)
Projets
924
48%
Arbitrage
301
59% / 25%
En retard
123
13%
Chargé
11
Développeur 11
Évaluation
(21)
Projets
30
47%
Arbitrage
1
100% / 0%
En retard
3
10%
Travail
12
Développeur 12
Évaluation
(7)
Projets
6
0%
Arbitrage
5
0% / 100%
En retard
1
17%
Gratuit
13
Développeur 13
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
Commandes similaires
G.X.L indicator 50 - 100 USD
I want an indicator that will generate signal based on technical analysis/market analysis, order blocks (demand and supply), and should be able to show arrows for buy and sell after analyzing the direction of the market. It should also be able to show if a signal is strong or weak. In case the signal is rejected, it should show an X sign
Requiero agregar una funcion que limite el uso del bot dependiendo de la cuenta que yo determine, actualmente se limita por fecha unicamente. Adicionalmente es necesario eliminar uno de los tres EA que integra el codigo. Si es posible elegir cual EA desactivar
The task is as follows: Create and EA, preferably in python, that can connect to MT5 (via API), with the following criteria: -Scans a multitude of triangular currency pairs (EUR/USD, USD/JPY, EUR/JPY as an example), and finds differences between the implied rate via the use of two currencies, ie in the example case EUR/USD*USD/JPY, and the actual rate. -Takes positions in a market neutral nature (short/long postions)
I need you to convert my tradingview pinescript to mt4, I have just $10 for it now, But i am going to give you more work later on cause i still have more work i am going to need you to work on for me, and i will be paying with crypto, Thank You
Hi, I need a programmer that could build an EA for me, based on Fib and indicators, The entry and exit will be determine by the Fibs and confirm by the indicators
Hello developer, I just wanted to know if you have made a profitable Supply and Demand indicator Contact me let discuss and start fully immediately .i will be looking for great developer soon Best regards
Hi, I would like to have some functionality of an existing trade manager amended, and some new functionality added in order to suit my needs. The existing trade manager is free, so there are no licensing issues to worry about. However, I only have the .ex4 file, so you would need to decompile it first. I have attached the file here for you to see. This original manager was written for the exact strategy I trade by
Hello, I am in need of an expert to help me convert my tradingview pinescript to mt4, I will attach the file, But for now, I only got $15 for this project and the only payment method I can use right now is crypto, I will send it to you through crypto, Also I need someone that is ready to work because I still have lot of projects I will need him to do for me
THE GOAL OF THIS PROJECT IS TO DEVELOP AN EXPERT ADVISOR THAT OPERATES AUTOMATICALLY DURING MARKET OPENING SESSIONS,FOCUS EN FOREX ,CRYPTOCURRENCIES ,STOCKS, AND GOLD. BELOW ARE THE SPECIFIC REQUIREMENTS the EA should be able to analyze the 20 period and 200 period moving averages as part of its entry and exit estategy implementation of an order blockis required to allow the EA to open and close positions efficiently
EA for MT4 SUMMARY: The robot uses a Moving Average (MA) with 6 Levels (3 Levels above the MA and 3 Levels below the MA). It does not use other indicators. The robot will make transactions only when the price reaches these Levels, under certain conditions. No trades are made when the price reaches the MA. MA period and distance for Levels are adjustable! It is a semi-adjustable robot with many variables, which will

Informations sur le projet

Budget
30 - 40 USD
Pour le développeur
27 - 36 USD
Délais
de 1 à 31 jour(s)