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
(40)
Progetti
60
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
(56)
Progetti
83
22%
Arbitraggio
1
100% / 0%
In ritardo
1
1%
In elaborazione
4
Sviluppatore 4
Valutazioni
(14)
Progetti
16
31%
Arbitraggio
0
In ritardo
1
6%
Gratuito
5
Sviluppatore 5
Valutazioni
(419)
Progetti
474
34%
Arbitraggio
24
42% / 46%
In ritardo
6
1%
Caricato
6
Sviluppatore 6
Valutazioni
(52)
Progetti
96
24%
Arbitraggio
9
22% / 22%
In ritardo
12
13%
In elaborazione
7
Sviluppatore 7
Valutazioni
(316)
Progetti
336
71%
Arbitraggio
4
100% / 0%
In ritardo
1
0%
In elaborazione
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
(557)
Progetti
924
48%
Arbitraggio
301
59% / 25%
In ritardo
123
13%
Caricato
11
Sviluppatore 11
Valutazioni
(21)
Progetti
30
47%
Arbitraggio
1
100% / 0%
In ritardo
3
10%
In elaborazione
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
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

Informazioni sul progetto

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