Modify an Expert Advisor so it will trade

MQL4 Indikatoren Experten Forex

Auftrag beendet

Ausführungszeit 3 Minuten
Bewertung des Kunden
I am fairly new to all this and was amazed with the skill and patience from my developer. I will always use him in the future.
Bewertung des Entwicklers
Thank you very much!

Spezifikation

I created an EA online through EA Builder.com, but it will not initiate any trades. I keep receiving an error stating:  "OrderSend error #4051 invalid function parameter value" and "invalid lots amount for OrderSend function".I have tried every lot size I can think of, but I still get this same error message.

Here is what I want this EA to be able to do:

1.  I want to be able for it to initiate a trade, long and/or short in the lot size I can specify.

2.  I want to be able to set trading times of day in 30 minute intervals.  For example, I can turn the system on at 4pm and stop initiating trades at 6pm.

3.  That's All!


Here is the current EA that I am using that will not initiate any trades:

//+------------------------------------------------------------------+
//|                                         Strategy: RJS QQE EA.mq4 |
//|                                       Created with EABuilder.com |
//|                                        https://www.eabuilder.com |
//+------------------------------------------------------------------+
#property copyright "Created with EABuilder.com"
#property link      "https://www.eabuilder.com"
#property version   "1.00"
#property description ""

#include <stdlib.mqh>
#include <stderror.mqh>

int LotDigits; //initialized in OnInit
int MagicNumber = 1532634;
extern double TradeSize = 0.1;
int MaxSlippage = 3; //adjusted in OnInit
bool crossed[1]; //initialized to true, used in function Cross
bool Push_Notifications = true;
int MaxOpenTrades = 1;
int MaxLongTrades = 1;
int MaxShortTrades = 1;
int MaxPendingOrders = 1;
int MaxLongPendingOrders = 1;
int MaxShortPendingOrders = 1;
bool Hedging = false;
int OrderRetry = 5; //# of retries if sending order returns error
int OrderWait = 5; //# of seconds to wait if sending order returns error
double myPoint; //initialized in OnInit

bool Cross(int i, bool condition) //returns true if "condition" is true and was false in the previous call
  {
   bool ret = condition && !crossed[i];
   crossed[i] = condition;
   return(ret);
  }

void myAlert(string type, string message)
  {
   if(type == "print")
      Print(message);
   else if(type == "error")
     {
      Print(type+" | RJS QQE EA @ "+Symbol()+","+IntegerToString(Period())+" | "+message);
      if(Push_Notifications) SendNotification(type+" | RJS QQE EA @ "+Symbol()+","+IntegerToString(Period())+" | "+message);
     }
   else if(type == "order")
     {
      Print(type+" | RJS QQE EA @ "+Symbol()+","+IntegerToString(Period())+" | "+message);
      if(Push_Notifications) SendNotification(type+" | RJS QQE EA @ "+Symbol()+","+IntegerToString(Period())+" | "+message);
     }
   else if(type == "modify")
     {
     }
  }

int TradesCount(int type) //returns # of open trades for order type, current symbol and magic number
  {
   int result = 0;
   int total = OrdersTotal();
   for(int i = 0; i < total; i++)
     {
      if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) == false) continue;
      if(OrderMagicNumber() != MagicNumber || OrderSymbol() != Symbol() || OrderType() != type) continue;
      result++;
     }
   return(result);
  }

int myOrderSend(int type, double price, double volume, string ordername) //send order, return ticket ("price" is irrelevant for market orders)
  {
   if(!IsTradeAllowed()) return(-1);
   int ticket = -1;
   int retries = 0;
   int err = 0;
   int long_trades = TradesCount(OP_BUY);
   int short_trades = TradesCount(OP_SELL);
   int long_pending = TradesCount(OP_BUYLIMIT) + TradesCount(OP_BUYSTOP);
   int short_pending = TradesCount(OP_SELLLIMIT) + TradesCount(OP_SELLSTOP);
   string ordername_ = ordername;
   if(ordername != "")
      ordername_ = "("+ordername+")";
   //test Hedging
   if(!Hedging && ((type % 2 == 0 && short_trades + short_pending > 0) || (type % 2 == 1 && long_trades + long_pending > 0)))
     {
      myAlert("print", "Order"+ordername_+" not sent, hedging not allowed");
      return(-1);
     }
   //test maximum trades
   if((type % 2 == 0 && long_trades >= MaxLongTrades)
   || (type % 2 == 1 && short_trades >= MaxShortTrades)
   || (long_trades + short_trades >= MaxOpenTrades)
   || (type > 1 && type % 2 == 0 && long_pending >= MaxLongPendingOrders)
   || (type > 1 && type % 2 == 1 && short_pending >= MaxShortPendingOrders)
   || (type > 1 && long_pending + short_pending >= MaxPendingOrders)
   )
     {
      myAlert("print", "Order"+ordername_+" not sent, maximum reached");
      return(-1);
     }
   //prepare to send order
   while(IsTradeContextBusy()) Sleep(100);
   RefreshRates();
   if(type == OP_BUY)
      price = Ask;
   else if(type == OP_SELL)
      price = Bid;
   else if(price < 0) //invalid price for pending order
     {
      myAlert("order", "Order"+ordername_+" not sent, invalid price for pending order");
   return(-1);
     }
   int clr = (type % 2 == 1) ? clrRed : clrBlue;
   while(ticket < 0 && retries < OrderRetry+1)
     {
      ticket = OrderSend(Symbol(), type, NormalizeDouble(volume, LotDigits), NormalizeDouble(price, Digits()), MaxSlippage, 0, 0, ordername, MagicNumber, 0, clr);
      if(ticket < 0)
        {
         err = GetLastError();
         myAlert("print", "OrderSend"+ordername_+" error #"+IntegerToString(err)+" "+ErrorDescription(err));
         Sleep(OrderWait*1000);
        }
      retries++;
     }
   if(ticket < 0)
     {
      myAlert("error", "OrderSend"+ordername_+" failed "+IntegerToString(OrderRetry+1)+" times; error #"+IntegerToString(err)+" "+ErrorDescription(err));
      return(-1);
     }
   string typestr[6] = {"Buy", "Sell", "Buy Limit", "Sell Limit", "Buy Stop", "Sell Stop"};
   myAlert("order", "Order sent"+ordername_+": "+typestr[type]+" "+Symbol()+" Magic #"+IntegerToString(MagicNumber));
   return(ticket);
  }

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {  
   //initialize myPoint
   myPoint = Point();
   if(Digits() == 5 || Digits() == 5)
     {
      myPoint *= 10;
      MaxSlippage *= 10;
     }
   //initialize LotDigits
   double LotStep = MarketInfo(Symbol(), MODE_LOTSTEP);
   if(NormalizeDouble(LotStep, 5) == round(LotStep))
      LotDigits = 0;
   else if(NormalizeDouble(10*LotStep, 5) == round(10*LotStep))
      LotDigits = 1;
   else if(NormalizeDouble(100*LotStep, 5) == round(100*LotStep))
      LotDigits = 5;
   else LotDigits = 5;
   int i;
   //initialize crossed
   for (i = 0; i < ArraySize(crossed); i++)
      crossed[i] = true;
   return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
  }

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   int ticket = -1;
   double price;  
  
  
   //Open Buy Order, instant signal is tested first
   if(Cross(0, iCustom(NULL, PERIOD_CURRENT, "QQE averages histo + alerts + arrows", 1, 5, 14, 0, 4.236, 70, 30, "Alerts Settings", false, false, true, false, false, false, true, false, "alert2.wav", true, "qqe Arrows1", 1.5, false, DeepSkyBlue, Red, 233, 234, 1, 1, true, DeepSkyBlue, Red, 233, 234, 3, 3, 3, 0) > iCustom(NULL, PERIOD_CURRENT, "QQE averages histo + alerts + arrows", 1, 5, 14, 0, 4.236, 70, 30, "Alerts Settings", false, false, true, false, false, false, true, false, "alert2.wav", true, "qqe Arrows1", 1.5, false, DeepSkyBlue, Red, 233, 234, 1, 1, true, DeepSkyBlue, Red, 233, 234, 3, 3, 4, 0)) //QQE averages histo + alerts + arrows crosses above QQE averages histo + alerts + arrows
   )
     {
      RefreshRates();
      price = Ask;  
      if(IsTradeAllowed())
        {
         ticket = myOrderSend(OP_BUY, price, TradeSize, "");
         if(ticket <= 0) return;
        }
      else //not autotrading => only send alert
         myAlert("order", "");
     }
  }

Bewerbungen

1
Entwickler 1
Bewertung
(192)
Projekte
232
30%
Schlichtung
1
100% / 0%
Frist nicht eingehalten
9
4%
Frei
Veröffentlicht: 2 Beispiele
2
Entwickler 2
Bewertung
(139)
Projekte
181
24%
Schlichtung
23
22% / 39%
Frist nicht eingehalten
13
7%
Frei
3
Entwickler 3
Bewertung
(174)
Projekte
199
12%
Schlichtung
38
37% / 34%
Frist nicht eingehalten
5
3%
Arbeitet
Veröffentlicht: 2 Beispiele
4
Entwickler 4
Bewertung
(246)
Projekte
253
30%
Schlichtung
0
Frist nicht eingehalten
3
1%
Frei
Veröffentlicht: 2 Beispiele
5
Entwickler 5
Bewertung
(188)
Projekte
212
58%
Schlichtung
9
11% / 89%
Frist nicht eingehalten
8
4%
Frei
6
Entwickler 6
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
7
Entwickler 7
Bewertung
(126)
Projekte
151
48%
Schlichtung
6
83% / 17%
Frist nicht eingehalten
2
1%
Frei
8
Entwickler 8
Bewertung
(54)
Projekte
53
17%
Schlichtung
7
0% / 100%
Frist nicht eingehalten
5
9%
Frei
9
Entwickler 9
Bewertung
(33)
Projekte
49
12%
Schlichtung
16
0% / 88%
Frist nicht eingehalten
10
20%
Frei
10
Entwickler 10
Bewertung
(69)
Projekte
146
34%
Schlichtung
13
8% / 62%
Frist nicht eingehalten
26
18%
Frei
Veröffentlicht: 6 Beispiele
11
Entwickler 11
Bewertung
(294)
Projekte
469
39%
Schlichtung
101
41% / 24%
Frist nicht eingehalten
77
16%
Beschäftigt
Veröffentlicht: 2 Beispiele
12
Entwickler 12
Bewertung
(23)
Projekte
45
20%
Schlichtung
25
28% / 48%
Frist nicht eingehalten
12
27%
Frei
13
Entwickler 13
Bewertung
(59)
Projekte
81
43%
Schlichtung
27
11% / 70%
Frist nicht eingehalten
8
10%
Frei
14
Entwickler 14
Bewertung
(2622)
Projekte
3328
67%
Schlichtung
77
48% / 14%
Frist nicht eingehalten
342
10%
Arbeitet
Veröffentlicht: 1 Beispiel
15
Entwickler 15
Bewertung
(772)
Projekte
1039
44%
Schlichtung
50
8% / 50%
Frist nicht eingehalten
116
11%
Frei
16
Entwickler 16
Bewertung
(22)
Projekte
30
20%
Schlichtung
8
63% / 13%
Frist nicht eingehalten
9
30%
Frei
17
Entwickler 17
Bewertung
(87)
Projekte
114
26%
Schlichtung
7
29% / 57%
Frist nicht eingehalten
5
4%
Frei
18
Entwickler 18
Bewertung
(52)
Projekte
89
25%
Schlichtung
8
75% / 13%
Frist nicht eingehalten
44
49%
Frei
19
Entwickler 19
Bewertung
(7)
Projekte
8
63%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
1
13%
Frei
20
Entwickler 20
Bewertung
(33)
Projekte
46
59%
Schlichtung
0
Frist nicht eingehalten
6
13%
Frei
21
Entwickler 21
Bewertung
(574)
Projekte
945
47%
Schlichtung
309
58% / 27%
Frist nicht eingehalten
125
13%
Frei
Ähnliche Aufträge
Im looking for an EA with Code. An EA that can capture big impulsive move on any instrument. Open trades only with multiple confirmation and a very high probability setup intraday or swing trading That can do top down/multi time frame analysis like D1 H4 H1 and then implement the trade on shorter time frame to catch the moves from the start. As i want to catch only the impulsive moves so there must be a Volume
I am looking for an experienced MT5 Expert Advisor developer. Goal: Create a custom MT5 EA that replicates the behavior of a profitable copy trading strategy (behavior-based, not code copying). Specifications: - Symbol: XAUUSD only - Max 1 trade at a time - Fixed risk per trade: 1% - Trades per week: 2–4 - Trading days: Monday to Thursday only - No trading during high-impact USD news (news filter required) - No
Up down trader 40+ USD
Create an expert advisor for meta trader 5 which trades buy and sell alternatively. First trade buy, next trade sell. For example. If a trade of 0.01 lot is placed on a buy and the trade is won, then the next trade is 0.01 on a sell. If the sell trade is won, then the next trade is a buy at 0.01. If there is a loss, then the lot sizes increase by a specified value. eg. 0.025. If there is yet another loss, then the
Looking for a reliable Expert Advisor with a proven track record? I'm seeking an EA with source code that meets the following criteri *Requirements:* - .mq5 source code (well-commented and readable) - 4-year backtest (Jan 2022 - Dec 2025) with tick/data quality details - 1-month demo test on live/demo broker - ~15% monthly average returns (medium risk) - Max drawdown ≤15% (equity/drawdown report) - No grid
I need a custom MT5 Expert Advisor named “Dark Venus”. Strategy details: - Timeframe: M5 / M15 - Market: Forex (all major pairs) - Strategy type: Trend + Scalping - Indicators: • EMA (Fast & Slow) • RSI filter • ATR for Stop Loss & Take Profit - Trades only during low-spread sessions (London & New York) Trade Rules: - Buy when fast EMA crosses above slow EMA + RSI confirmation - Sell when fast EMA crosses below
Acquire existing profitable Expert Advisor with source code for client investment portfolio - Full .mq5 code (clean & commented) - 4+ years backtest (Jan 2022 - Dec 2025, 100% tick data) - ~10% monthly return - Max DD ≤15% - No grid/martingale (strictly enforced) - 1-month forward test required - Send trade history + EA details for review - Demo EA file needed for backtest replication - Open to any currency
i need the multi-chain dex bot with set up and installation i need you to help me set the copy reading wallet on binance or phantom with capital for 100 Euro to 1 Million in one year
Greetings, I'm seeking a price quote for the following EA description. 1) Short positions are opened after trades that have closed below the open of the trade. 2) Long positions are opened after trades that have closed above the open of the trade. 3) The base lot size plus the spread is applied for every trade that opens after the take profit has been reached. 4) Double the lot size of the previous trade plus
I have an issue with my ninja script and i would like you to help me straighten things I wanted to create an indicator and i have the source code already but i am getting compiling errors on my NinjaTrader And i tried fixing the error it still same I sent 3 images here for you to understand the errors and i would like to ask if you can help me fix it so i can go ahead and compile my source code. Thanks
Good day, I would like to build an automated trading system for Ninjatrader using 2 MACD, a Supertrend, and a moving average indicator. I want the option to adjust the indicator settings, the ability to trade at three different times, and the option to receive alerts. I want to get an idea of what that will cost me. It will enter trades on all blue take one contract out at a fixed point, move the stop to break even

Projektdetails

Budget
100+ USD
Ausführungsfristen
bis 1 Tag(e)