8 ERROR ON THE CODE FOR MY EA

İş Gereklilikleri

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

      }

   }

}


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(40)
Projeler
60
8%
Arabuluculuk
12
58% / 42%
Süresi dolmuş
1
2%
Ücretsiz
2
Geliştirici 2
Derecelendirme
(15)
Projeler
19
37%
Arabuluculuk
2
0% / 100%
Süresi dolmuş
0
Ücretsiz
3
Geliştirici 3
Derecelendirme
(56)
Projeler
83
22%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
1
1%
Çalışıyor
4
Geliştirici 4
Derecelendirme
(14)
Projeler
16
31%
Arabuluculuk
0
Süresi dolmuş
1
6%
Ücretsiz
5
Geliştirici 5
Derecelendirme
(419)
Projeler
476
34%
Arabuluculuk
24
42% / 46%
Süresi dolmuş
6
1%
Yüklendi
6
Geliştirici 6
Derecelendirme
(52)
Projeler
96
24%
Arabuluculuk
9
22% / 22%
Süresi dolmuş
12
13%
Çalışıyor
7
Geliştirici 7
Derecelendirme
(316)
Projeler
336
71%
Arabuluculuk
4
100% / 0%
Süresi dolmuş
1
0%
Çalışıyor
8
Geliştirici 8
Derecelendirme
(31)
Projeler
41
20%
Arabuluculuk
9
11% / 89%
Süresi dolmuş
5
12%
Ücretsiz
9
Geliştirici 9
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Ücretsiz
10
Geliştirici 10
Derecelendirme
(557)
Projeler
924
48%
Arabuluculuk
301
59% / 25%
Süresi dolmuş
123
13%
Yüklendi
11
Geliştirici 11
Derecelendirme
(21)
Projeler
30
47%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
3
10%
Çalışıyor
12
Geliştirici 12
Derecelendirme
(7)
Projeler
6
0%
Arabuluculuk
5
0% / 100%
Süresi dolmuş
1
17%
Ücretsiz
13
Geliştirici 13
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Ücretsiz
Benzer siparişler
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
Liquidity sweep reversal EA based on Williams fractal with risk & trade management parameters build in should include following section in EA: entry parameters risk management trade management all based on given instructions
High I’m looking for someone to create a simple EA for MT4 that trades in 2 timeframes the 5 min and the 15 min chart with the trend and enters on pin bars with some conditions that I will specify if the job is taken but nothing complicated. Timeframe 5 min Chart and 15min chart simultaneously It looks to enter on the 5 min or in the 15 min chart it does not look for higher timeframe, they are the same condition for
I'm looking for someone who will take the source code of an existing trading bot and make some adjustments and tweaks to it. Mostly is about changing the UI and basic default parameters. No need to change the algorithm itself. The result must be a file that I can install as any other expert advisor in the MT4 terminal. For now I can share the more detailed task in my video

Proje bilgisi

Bütçe
30 - 40 USD
Geliştirici için
27 - 36 USD
Son teslim tarihi
from 1 to 31 gün