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
評価
(43)
プロジェクト
66
12%
仲裁
12
58% / 42%
期限切れ
1
2%
2
開発者 2
評価
(15)
プロジェクト
20
35%
仲裁
3
0% / 100%
期限切れ
0
パブリッシュした人: 1 code
3
開発者 3
評価
(85)
プロジェクト
169
44%
仲裁
3
67% / 0%
期限切れ
5
3%
仕事中
パブリッシュした人: 1 code
4
開発者 4
評価
(15)
プロジェクト
17
29%
仲裁
0
期限切れ
1
6%
5
開発者 5
評価
(563)
プロジェクト
651
33%
仲裁
41
41% / 46%
期限切れ
11
2%
多忙
6
開発者 6
評価
(54)
プロジェクト
102
23%
仲裁
12
25% / 17%
期限切れ
13
13%
7
開発者 7
評価
(468)
プロジェクト
486
75%
仲裁
6
67% / 17%
期限切れ
0
仕事中
8
開発者 8
評価
(31)
プロジェクト
41
20%
仲裁
9
11% / 89%
期限切れ
5
12%
9
開発者 9
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
10
開発者 10
評価
(574)
プロジェクト
945
47%
仲裁
309
58% / 27%
期限切れ
125
13%
11
開発者 11
評価
(87)
プロジェクト
121
68%
仲裁
5
80% / 0%
期限切れ
12
10%
仕事中
12
開発者 12
評価
(7)
プロジェクト
6
0%
仲裁
5
0% / 100%
期限切れ
1
17%
13
開発者 13
評価
プロジェクト
0
0%
仲裁
0
期限切れ
0
類似した注文
I need any highly profitable MT5 robot which trades any sythetic indices on deriv very profitably. It should have good risk management and any good strategy The EA should have good risk management and can trade small accounts like 50 - 100USD Developers who have already made robots have higher chance
I'm looking for someone with a 5-star rating and a high number of "Completed Jobs" in MQL5. PLEASE MAKE SURE YOU READ MY DISCRIPTION AND THE UPLOADED CODE BEFOR SPEAKING TO ME. To trade - XAUUSD+ Broker - vantage.com raw account starting balance - £1000 I require a high-level MQL5 developer to build/refine a sophisticated Expert Advisor. I have attached the original source code. The developer must use the attached
Mk 30+ USD
I need a fully automated trading robot designed to generate consistent profits while strictly controlling risk and minimizing losses. The robot should use a combination of strategies, including trend-following, scalping, and price action, and must be able to adapt to different market conditions such as trending and ranging markets. It should analyze the market using indicators like Moving Averages, RSI, MACD, and
Seeking developer service to code an EA. Interested developer must have good experience and understanding on how ORB and FVG works, and agreed to the terms below : 1. Shall demonstrate a fully functional EA that operates as specified in the requirement and function automatically as requested in real-time environment (forward test - demo/live), regardless of good results obtained in strategy-tester. Backtesting
Need trading robot 50 - 70 USD
I need a robot for trading gold and currencies . I need to use it with metatrader 4 and 5 . My budget is not high . Max . 70 USD. I need to be able to start and stop it at any time without restrictions
am looking for an experienced MQL5 developer to build a high-frequency trading Expert Advisor (EA) for XAUUSD (Gold) on M1 and M5 timeframes . The EA must include advanced execution logic, dynamic pending orders, risk management, and news/session filters. Clean, efficient, and well-documented code is required. Strategy type: Scalping (fast trades, quick profit). Very fast execution logic (optimized for speed). Goal
Title: MT5 EA Needed – Prop‑Firm Compliance Tool (SL/TP at Entry, 60‑Second Hold, Daily Profit Cap, 0.5% XAUUSD Risk) Description: I need an MT5 Expert Advisor that enforces prop‑firm compliance rules for Instant Funding accounts. The EA must NOT trade automatically — it should only monitor and control my manual XAUUSD trading. I trade all sessions, so there should be no time restrictions. MY TRADING STYLE (Important
​1. Project Overview ​ Asset: XAUUSD (Gold) ​ Timeframe: M1 (1-Minute) for execution; M5/M15 for trend filtering. ​ Objective: Execute high-frequency scalps during peak liquidity (London/NY overlap) to capture 10–30 pip movements with high precision. ​ Core Logic: The "Poverty Bot" strategy relies on Mean Reversion combined with Momentum Burst (Price Action + RSI/EMA filters). ​2. Strategy Logic (The "Poverty"
Simple MA indicator with buy and sell arrow with a push notification. Conditions for buy or sell should be when price breaks above or below the MA and then retraced back to the MA creating a HH/HL or LH/LL then the buy/sell signal arrow should be at the reversal candle that forms the HL/HH. And on indicator window1 RSI cross over MA and the RSI line
Hi, I hope you doing Greate, Let me share details , so the original EA already working but you can check and verify everything fine.First you verify that all original EA features are working correctly then add a user dashboard showing the number of detected zones, buy sell both none status, and an on off button. also ensure mitigated zones disappear properly and that trades follow the zone rules, and integrate the

プロジェクト情報

予算
30 - 40 USD
締め切り
最低 1 最高 31 日