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
(40)
Projetos
60
8%
Arbitragem
12
58% / 42%
Expirado
1
2%
Livre
2
Desenvolvedor 2
Classificação
(15)
Projetos
19
37%
Arbitragem
2
0% / 100%
Expirado
0
Livre
3
Desenvolvedor 3
Classificação
(56)
Projetos
83
22%
Arbitragem
1
100% / 0%
Expirado
1
1%
Trabalhando
4
Desenvolvedor 4
Classificação
(14)
Projetos
16
31%
Arbitragem
0
Expirado
1
6%
Livre
5
Desenvolvedor 5
Classificação
(419)
Projetos
474
34%
Arbitragem
24
42% / 46%
Expirado
6
1%
Carregado
6
Desenvolvedor 6
Classificação
(52)
Projetos
96
24%
Arbitragem
9
22% / 22%
Expirado
12
13%
Trabalhando
7
Desenvolvedor 7
Classificação
(316)
Projetos
336
71%
Arbitragem
4
100% / 0%
Expirado
1
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
(557)
Projetos
924
48%
Arbitragem
301
59% / 25%
Expirado
123
13%
Carregado
11
Desenvolvedor 11
Classificação
(21)
Projetos
30
47%
Arbitragem
1
100% / 0%
Expirado
3
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
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
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
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
I want a bot developer deriv He has experience and I want a profitable robot, the profit is higher than the loss Or I want someone to sue with me. I have a profitable robot, but I want another robot or to improve another robot I have
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, are you able to convert TOS thinkscript to Tradingview pinescript? I will be looking for great developer to bid for this project https://docs.google.com/document/d/1V8rxS1JG_hfcXqBIChJ9GXdVQ11fxBrlpAxwNA9zhZA/edit The code is already attached to the project Best regards
Hello great developer can you help me with MT5 indicator developing? Here is a document that describes the filters that will need to be added to my existing custom indicator. let me know if you have any questions or if anything in the document is unclear I will be looking for great developer to bid for this project Best regards
Trade Entry Rule : 1 . New Arrow Higher or Lower Appear : Entry . (Range: {Input}) After Entry Trailing Stop Trails { Trail Step (Input) } 2 . Lot Size { Input } 3 . Take Profit { Input } 4 . Max Number of Trades { Input } 5 . Total Number of Trades per Entry { Input } ---------------------------------------------------------------------------- 6 . Spread Filter { Input }
Hello how are you doing? Can you help me with a projects connecting trend lines to pivot points on a wave, for trendlines, color detention, and dynamic visualization? I have a project I’d like you to look at. I need a pine script code to capture the different Trendline colors that cross both above and below horizontal lines on the wave indicator
Hi, I want a custom indicator to be coded based on 2 default Indicators. Add alerts for signals and news filter alerts to be sent through metaquotes id, email and phone. Popup alerts for pc/laptop as well. I would like it to have a display panel that logs the trade history and a buy/sell button with risk % based on balance and equity, fixed lots and some other features

Informações sobre o projeto

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