8 ERROR ON THE CODE FOR MY EA

Specifiche

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

      }

   }

}


Con risposta

1
Sviluppatore 1
Valutazioni
(42)
Progetti
62
8%
Arbitraggio
12
58% / 42%
In ritardo
1
2%
Gratuito
2
Sviluppatore 2
Valutazioni
(15)
Progetti
19
37%
Arbitraggio
2
0% / 100%
In ritardo
0
Gratuito
3
Sviluppatore 3
Valutazioni
(63)
Progetti
101
31%
Arbitraggio
1
100% / 0%
In ritardo
2
2%
In elaborazione
4
Sviluppatore 4
Valutazioni
(14)
Progetti
16
31%
Arbitraggio
0
In ritardo
1
6%
Gratuito
5
Sviluppatore 5
Valutazioni
(468)
Progetti
530
33%
Arbitraggio
28
39% / 43%
In ritardo
7
1%
Occupato
6
Sviluppatore 6
Valutazioni
(52)
Progetti
97
24%
Arbitraggio
10
20% / 20%
In ritardo
12
12%
In elaborazione
7
Sviluppatore 7
Valutazioni
(344)
Progetti
363
71%
Arbitraggio
4
100% / 0%
In ritardo
0
Caricato
8
Sviluppatore 8
Valutazioni
(31)
Progetti
41
20%
Arbitraggio
9
11% / 89%
In ritardo
5
12%
Gratuito
9
Sviluppatore 9
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
10
Sviluppatore 10
Valutazioni
(563)
Progetti
932
47%
Arbitraggio
302
59% / 25%
In ritardo
124
13%
Occupato
11
Sviluppatore 11
Valutazioni
(35)
Progetti
51
55%
Arbitraggio
1
100% / 0%
In ritardo
6
12%
Caricato
12
Sviluppatore 12
Valutazioni
(7)
Progetti
6
0%
Arbitraggio
5
0% / 100%
In ritardo
1
17%
Gratuito
13
Sviluppatore 13
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
Ordini simili
I need a dashboard that contains: highs and lows of the previous days cot report with indication of bought and sold positions currency strength option to switch between pairs (e.g.: eurusd - usdjpy - gbpusd etc.) market sentiment bank report with short-term buy and sell positions currency strength
I need ea that based on point and finger chart formula point and finger chart does not follow time frame only price based and point and finger chart has same functions as given below source > HL/close box size assignment method > traditional reversal > 1 or given as request box size > 0.00 lot size > 0.00 trailing stop in box > one box behind or as given must not follow time only price based X
I need two trading view indicators to be on Mt4 .i want them to work the same way that they do on trading view if possible.i will send the indicators
Here are the paragraphs for the robot's settings to trade on various instruments: *US30 (Dow Jones)* - Symbol: US30 - Timeframe: H1 (1-hour chart) - Lot size: 0.1 - Take profit: 200 points - Stop loss: 150 points *Gold (XAUUSD)* - Symbol: XAUUSD - Timeframe: H4 (4-hour chart) - Lot size: 0.1 - Take profit: 1000 points - Stop loss: 800 points *Nas 100 (US Tech 100)* - Symbol: NQ100 - Timeframe: H1 (1-hour chart) - Lot
hi , i am looking for a Grid EA with some basic type of EA but fully functional and final one. so anyone who can do perfect EA should contact. plan is discussed as below. start and end time, and days of active deactive button should be added in dashboard or else like if we want to close EA for any future day or days in coming week so before time we should be able to set. when EA starts. it opens one buy or sell and
Busco crear un indicador que marque todos los Order Blocks en una temporalidad concreta. Quiero que distinga order blocks tocados de los no tocados, que se pueda configurar color y estética del Ordee block y Que marque el 50% de los Ordwr blocks marcados
Together with a source code (in MQl4 and MQL5) of an EA which I will supply, I need the Hedging_Wedger to be recopied several times as series in form of MT4, MT5
The EA is in below VPS Server: 176.57.188.42 User: administrator Password: Test123! Kindly access the vps to check out the EA, the name of the EA I'm referring to is called TOPGUN 2.0 The job is to replicate the same EA in the server and code a very similar one based on the exact functionality in that existing EA. if u can do it kindly reach out
Around 3,000 lines of code. This is NOT for a newbie or someone who will just try to figure it out and waste each other's time. Need a PRO who can work fast, smart, and follow the instructions exactly. NO creativity, NO improvising, NO doing what you feel is best. NO scatter brain working on 5 projects at once. Finish mine carefully and promptly then you take another job. If I say candle body it means the close price
hello everyone I need to create an ea that creates signals based on the indicator on trading view and transmits it directly to mt5, so that the signals are created on trading view and orders are opened in mt5

Informazioni sul progetto

Budget
30 - 40 USD
Per lo sviluppatore
27 - 36 USD
Scadenze
da 1 a 31 giorno(i)