Modify an Expert Advisor so it will trade

İş tamamlandı

Tamamlanma süresi: 3 dakika
Müşteri tarafından geri bildirim
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.
Geliştirici tarafından geri bildirim
Thank you very much!

İş Gereklilikleri

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", "");
     }
  }

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(192)
Projeler
232
30%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
9
4%
Serbest
Yayınlandı: 2 kod
2
Geliştirici 2
Derecelendirme
(139)
Projeler
181
24%
Arabuluculuk
23
22% / 39%
Süresi dolmuş
13
7%
Serbest
3
Geliştirici 3
Derecelendirme
(174)
Projeler
199
12%
Arabuluculuk
38
37% / 34%
Süresi dolmuş
5
3%
Çalışıyor
Yayınlandı: 2 kod
4
Geliştirici 4
Derecelendirme
(246)
Projeler
253
30%
Arabuluculuk
0
Süresi dolmuş
3
1%
Serbest
Yayınlandı: 2 kod
5
Geliştirici 5
Derecelendirme
(188)
Projeler
212
58%
Arabuluculuk
9
11% / 89%
Süresi dolmuş
8
4%
Serbest
6
Geliştirici 6
Derecelendirme
Projeler
0
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
7
Geliştirici 7
Derecelendirme
(126)
Projeler
151
48%
Arabuluculuk
6
83% / 17%
Süresi dolmuş
2
1%
Serbest
8
Geliştirici 8
Derecelendirme
(54)
Projeler
53
17%
Arabuluculuk
7
0% / 100%
Süresi dolmuş
5
9%
Serbest
9
Geliştirici 9
Derecelendirme
(33)
Projeler
49
12%
Arabuluculuk
16
0% / 88%
Süresi dolmuş
10
20%
Serbest
10
Geliştirici 10
Derecelendirme
(69)
Projeler
146
34%
Arabuluculuk
13
8% / 62%
Süresi dolmuş
26
18%
Serbest
Yayınlandı: 6 kod
11
Geliştirici 11
Derecelendirme
(294)
Projeler
469
39%
Arabuluculuk
101
41% / 24%
Süresi dolmuş
77
16%
Yüklendi
Yayınlandı: 2 kod
12
Geliştirici 12
Derecelendirme
(23)
Projeler
45
20%
Arabuluculuk
25
28% / 48%
Süresi dolmuş
12
27%
Serbest
13
Geliştirici 13
Derecelendirme
(59)
Projeler
81
43%
Arabuluculuk
27
11% / 70%
Süresi dolmuş
8
10%
Serbest
14
Geliştirici 14
Derecelendirme
(2622)
Projeler
3328
67%
Arabuluculuk
77
48% / 14%
Süresi dolmuş
342
10%
Çalışıyor
Yayınlandı: 1 kod
15
Geliştirici 15
Derecelendirme
(772)
Projeler
1039
44%
Arabuluculuk
50
8% / 50%
Süresi dolmuş
116
11%
Serbest
16
Geliştirici 16
Derecelendirme
(22)
Projeler
30
20%
Arabuluculuk
8
63% / 13%
Süresi dolmuş
9
30%
Serbest
17
Geliştirici 17
Derecelendirme
(87)
Projeler
114
26%
Arabuluculuk
7
29% / 57%
Süresi dolmuş
5
4%
Serbest
18
Geliştirici 18
Derecelendirme
(52)
Projeler
89
25%
Arabuluculuk
8
75% / 13%
Süresi dolmuş
44
49%
Serbest
19
Geliştirici 19
Derecelendirme
(7)
Projeler
8
63%
Arabuluculuk
1
0% / 100%
Süresi dolmuş
1
13%
Serbest
20
Geliştirici 20
Derecelendirme
(33)
Projeler
46
59%
Arabuluculuk
0
Süresi dolmuş
6
13%
Serbest
21
Geliştirici 21
Derecelendirme
(574)
Projeler
945
47%
Arabuluculuk
309
58% / 27%
Süresi dolmuş
125
13%
Serbest
Benzer siparişler
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

Proje bilgisi

Bütçe
100+ USD
Son teslim tarihi
to 1 gün