8 ERROR ON THE CODE FOR MY EA

指定

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

      }

   }

}


応答済み

1
開発者 1
評価
(40)
プロジェクト
60
8%
仲裁
12
58% / 42%
期限切れ
1
2%
2
開発者 2
評価
(15)
プロジェクト
19
37%
仲裁
2
0% / 100%
期限切れ
0
3
開発者 3
評価
(56)
プロジェクト
83
22%
仲裁
1
100% / 0%
期限切れ
1
1%
仕事中
4
開発者 4
評価
(14)
プロジェクト
16
31%
仲裁
0
期限切れ
1
6%
5
開発者 5
評価
(419)
プロジェクト
476
34%
仲裁
24
42% / 46%
期限切れ
6
1%
取り込み中
6
開発者 6
評価
(52)
プロジェクト
96
24%
仲裁
9
22% / 22%
期限切れ
12
13%
仕事中
7
開発者 7
評価
(316)
プロジェクト
336
71%
仲裁
4
100% / 0%
期限切れ
1
0%
仕事中
8
開発者 8
評価
(31)
プロジェクト
41
20%
仲裁
9
11% / 89%
期限切れ
5
12%
9
開発者 9
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
10
開発者 10
評価
(557)
プロジェクト
924
48%
仲裁
301
59% / 25%
期限切れ
123
13%
取り込み中
11
開発者 11
評価
(21)
プロジェクト
30
47%
仲裁
1
100% / 0%
期限切れ
3
10%
仕事中
12
開発者 12
評価
(7)
プロジェクト
6
0%
仲裁
5
0% / 100%
期限切れ
1
17%
13
開発者 13
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
類似した注文
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

プロジェクト情報

予算
30 - 40 USD
開発者用
27 - 36 USD
締め切り
最低 1 最高 31 日