Upgrading EA with 2 new variables

MQL4 Эксперты Forex

Работа завершена

Время выполнения 3 дня
Отзыв от исполнителя
Has been a pleasure working with you, looking forward to work with you again.
Отзыв от заказчика
Hany is the best developer I've subcontracted for his programming skills but also for suggesting improvements to the initial specs but also for timely execution of all tasks. I highly recommend him!

Техническое задание

Hi everyone!
I have a working EA based on SMAs and need someone to code the following,

A. Conditions
- The programmer must allow me to do backtesting before making the payment.
- Upon payment, the programmer must provide the .mq4 file.
- The .mq4 file must compile without any "Warning".
- The EA will be tested and used on ICMarkets raw account using MetaTrader 4.
- The intellectual property of the EA belongs to the contractor.
- The programmer has no responsibility for the effectiveness of the EA.
- The EA must only place one order (BUY or SELL) at a time.
- The EA must be capable of backtesting on the following pairs - EURUSD,GBPUSD,USDCAD,EURGBP,EURAUD,AUDCAD,AUDUSD,EURCAD,NZDUSD,AUDNZD.

B. Required Coding (please adapt as required)
1. When placing a BUY order, I wish to retain the price at which the order was placed - variable "initial_price_buy" (e.g. using iOpen);
2. When placing a SELL order, I wish to retain the price at which the order was placed - variable "initial_price_sell" (e.g. using iOpen);
3. When closing a BUY, besides the provided SMA logic, the order will only close if "close_buy" is ABOVE " initial_price_buy ";
4. When closing a SELL, besides the provided SMA logic, the order will only close if "close_sell" is BELOW " initial_price_sell ";

NOTE
I've attempted to code items 1,2 and 3 above but could not manage. My code is commented in the sample code I'm attaching and is provided in the following lines..
24;25;26;27;63;64;65;66;88;93;99 and 108.

//+------------------------------------------------------------------+
//|                                            droid_top_sma_v00.mq4 |
//|                                Copyright 2022, Mario Vasconcelos |
//|                                             https://www.none.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, Mario Vasconcelos"
#property link      "https://www.none.com"
#property version   "1.00"
#property strict

input string  iNote_1    = " --== EA Settings ==-- ";
input ENUM_TIMEFRAMES      iTF                     = PERIOD_CURRENT; //TimeFrame)
input int                  iRC                     = 60;             //RANGING_CANDLES
input int                  iRL                     = 150;            //RANGING_LIMIT
input double               iLot                    = 0.01;           //Lot
input int                  iMagic                  = 201159;         //Mag

double sma_7;   //magenta
double sma_14;  //cyan
double sma_25;  //green
double sma_75;  //dash white
double sma_200; //dash orange

//static initial_price_sell;
//static initial_price_buy;
//double close_buy;
//double close_sell;

int Ranging;
int ticket;

datetime gBarTime;

string _PR = "EAO_";
int _ae[4] = {6,136,138,129};
datetime _TimeInit = 0;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
      sma_7  = iMA (_Symbol,_Period,7,0,MODE_SMA,PRICE_OPEN,0);   //magenta
      sma_14 = iMA (_Symbol,_Period,14,0,MODE_SMA,PRICE_OPEN,0);  //cyan
      sma_25 = iMA (_Symbol,_Period,25,0,MODE_SMA,PRICE_OPEN,0);  //green
      sma_75 = iMA (_Symbol,_Period,75,0,MODE_SMA,PRICE_OPEN,0);  //dash white
      sma_200 = iMA (_Symbol,_Period,200,0,MODE_SMA,PRICE_OPEN,0);  //dash orange

//      initial_price_buy = iOpen(NULL,0,0);
//      initial_price_sell = iOpen(NULL,0,0);
//      close_buy = iOpen(NULL,0,0);
//      close_sell = iOpen(NULL,0,0);
    
      int HighestCandle = iHighest(_Symbol,iTF,MODE_CLOSE,iRC,0);
      ObjectDelete(_PR+"LH");
      ObjectCreate(_PR+"LH",OBJ_HLINE,0,_Time(0),_High(HighestCandle));
      int LowestCandle = iLowest(_Symbol,iTF,MODE_CLOSE,iRC,0);
      ObjectDelete(_PR+"LL");
      ObjectCreate(_PR+"LL",OBJ_HLINE,0,_Time(0),_Low(LowestCandle));

      Ranging = 0;
      double diff = _High(HighestCandle)-_Low(LowestCandle);
      if(diff<=iRL*_Point)
      {
      Ranging = 1;
      }

    if(Ranging == 0){
        if(ticket <= 0){
        
        // placing SELL
          if((sma_75 > sma_200) && (sma_7 > sma_75) && (sma_7 < sma_14) && (sma_7 < sma_25))
             ticket = OrderSend(Symbol(),OP_SELL,iLot,Bid,10,0,0,NULL,iMagic,0,clrRed);
//           initial_price_sell = iOpen(NULL,0,0);
                 
        // placing BUY
          if((sma_75 > sma_200) && (sma_7 < sma_75) && (sma_7 < sma_25) && (sma_14 < sma_75))
             ticket = OrderSend(Symbol(),OP_BUY,iLot,Ask,10,0,0,NULL,iMagic,0,clrGreen);
//           initial_price_buy = iOpen(NULL,0,0);

        }     
    }
      // exit SELL //
        if((sma_75 < sma_200) && (sma_7 < sma_75) && (sma_14 < sma_75) && (sma_14 < sma_25)) 
//         if(close_sell < initial_price_sell) "close_sell" is the price at the moment the SMA logic above is met.
           if(OrderSelect(ticket, SELECT_BY_TICKET) && OrderType() == OP_SELL){ 
             if(OrderClose(OrderTicket(),OrderLots(),Ask,10,clrOrange)){
                ticket = 0;
             }
           }
           
      // exit BUY //
        if((sma_75 > sma_200) && (sma_7 > sma_75) && (sma_14 > sma_75) && (sma_7 < sma_25)) 
//         if(close_buy > initial_price_buy) "close_buy" is the price at the moment the SMA logic above is met.
          if(OrderSelect(ticket, SELECT_BY_TICKET) && OrderType() == OP_BUY){ 
            if(OrderClose(OrderTicket(),OrderLots(),Bid,10,clrWhite)){
              ticket = 0;
            }
          }   
  }
  
double _Close(int i)
  {
   return(iClose(_Symbol,iTF,i));
  }
double _Open(int i)
  {
   return(iOpen(_Symbol,iTF,i));
  }
double _High(int i)
  {
   return(iHigh(_Symbol,iTF,i));
  }
double _Low(int i)
  {
   return(iLow(_Symbol,iTF,i));
  }
datetime _Time(int i)
  {
   return(iTime(_Symbol,iTF,i));
  }
  
//+------------------------------------------------------------------+


Откликнулись

1
Разработчик 1
Оценка
(10)
Проекты
9
11%
Арбитраж
5
0% / 60%
Просрочено
1
11%
Свободен
2
Разработчик 2
Оценка
(64)
Проекты
68
25%
Арбитраж
12
42% / 42%
Просрочено
4
6%
Свободен
3
Разработчик 3
Оценка
(43)
Проекты
66
12%
Арбитраж
12
58% / 42%
Просрочено
1
2%
Свободен
4
Разработчик 4
Оценка
(83)
Проекты
97
32%
Арбитраж
9
22% / 56%
Просрочено
5
5%
Работает
5
Разработчик 5
Оценка
(568)
Проекты
641
41%
Арбитраж
25
48% / 36%
Просрочено
46
7%
Работает
6
Разработчик 6
Оценка
(1)
Проекты
2
0%
Арбитраж
0
Просрочено
0
Свободен
Похожие заказы
I’m looking for an experienced MT5/MQL5 freelancer to help install and configure several existing EAs on IC Markets MT5 accounts using a Windows VPS. The work will include setting up the EAs on separate demo accounts and later running several together on one account with different risk settings. I also need help with MT5 backtesting and strategy optimisation, including comparing different risk levels and reviewing
Ea which is based on the price returning to the open or close of a 1-minute candle or zone of candles. panel on chart need too have buttons : trainding on/off close all close profit add buy stop add buy limit add sell stop add sell limit ( all to existing setups) calculating profit/loss for a single open setup and in total in account currency calculating profit/loss for a single open setup and in total in percentage
Olá! Preciso de um indicador/alerta personalizado para MT5. Quero que ele compare: • Média móvel de 200 períodos do M1 (1 minuto) • Média móvel de 20 períodos do M15 (15 minutos) O objetivo é receber um alerta quando a MA 200 do M1 estiver próxima da MA 20 do M15. Gostaria que tivesse uma configuração para eu definir a distância considerada “próxima”. Por exemplo: Distância máxima: X pontos Quando: ABS(MA200 do M1 −
I need an MT5 Expert Advisor (EA) specifically for NFP news trading. Strategy: - Trade EURUSD during the US Non-Farm Payroll (NFP) release. - Automatically identify the NFP release time. - Place a Buy Stop above the current price and a Sell Stop below the current price shortly before NFP. - Adjustable distance from current price for both pending orders. - When one order is triggered, automatically cancel the opposite
Bonjour ! Je vous ai contacté pour le développement de mon EA sur MetaTrader. Je souhaite intégrer une stratégie précise avec une gestion stricte des règles du courtier Exness. J'ai déjà préparé le cahier des charges complet sous format PDF avec toutes les spécifications techniques
SKBOT 35+ USD
want an MQL5 Expert Advisor (EA) for MetaTrader 5, mainly for XAUUSD (Gold). Strategy: The EA should trade based on market structure, Break of Structure (BOS), Fair Value Gaps (FVG), Order Blocks (OB), and Fibonacci retracement levels. BUY setup: Detect bullish market structure. Detect a bullish Break of Structure (BOS). Identify the relevant bullish FVG and/or Order Block created around the structure move. Use
Chciał bym w tej grze poznać dużo i zrozumieć ciężko bez języka mam tylko sms na gry nie mam kieszonkowych i kiepsko się trzymam finansowo żeby czasem myślę gdzie będę
​ Indicators: Fast MA (Period 10, Exponential) and Slow MA (Period 50, Exponential). ​ Buy Signal: When Fast MA crosses above Slow MA. ​ Sell Signal: When Fast MA crosses below Slow MA. ​ Risk Management & Parameters: ​Customizable Lot Size (Default: 0.01). ​Stop Loss (SL) and Take Profit (TP) in pips. ​Trailing Stop options. ​Max Spread filter. ​ Platform: MetaTrader 5 (MQL5)
​ Indicators: Fast MA (Period 10, Exponential) and Slow MA (Period 50, Exponential). ​ Buy Signal: When Fast MA crosses above Slow MA. ​ Sell Signal: When Fast MA crosses below Slow MA. ​ Risk Management & Parameters: ​Customizable Lot Size (Default: 0.01). ​Stop Loss (SL) and Take Profit (TP) in pips. ​Trailing Stop options. ​Max Spread filter. ​ Platform: MetaTrader 5 (MQL5)
I am looking for an experienced MQL5/MT5 developer to develop a custom Expert Advisor based on a complete technical architecture already prepared by the client. This is not a request to design a trading strategy from scratch . The strategy architecture, entry/exit concepts, filters, risk-management requirements and testing requirements are already documented. The main responsibility will be MQL5 development

Информация о проекте

Бюджет
30+ USD
Сроки выполнения
от 1 до 3 дн.