Upgrading EA with 2 new variables

MQL4 Experts Forex

Trabalho concluído

Tempo de execução 3 dias
Comentário do desenvolvedor
Has been a pleasure working with you, looking forward to work with you again.
Comentário do cliente
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!

Termos de Referência

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));
  }
  
//+------------------------------------------------------------------+


Respondido

1
Desenvolvedor 1
Classificação
(10)
Projetos
9
11%
Arbitragem
5
0% / 60%
Expirado
1
11%
Livre
2
Desenvolvedor 2
Classificação
(63)
Projetos
68
25%
Arbitragem
12
42% / 42%
Expirado
4
6%
Livre
3
Desenvolvedor 3
Classificação
(42)
Projetos
62
8%
Arbitragem
12
58% / 42%
Expirado
1
2%
Livre
4
Desenvolvedor 4
Classificação
(58)
Projetos
67
28%
Arbitragem
6
0% / 50%
Expirado
2
3%
Trabalhando
5
Desenvolvedor 5
Classificação
(568)
Projetos
641
41%
Arbitragem
21
57% / 29%
Expirado
47
7%
Trabalhando
6
Desenvolvedor 6
Classificação
(1)
Projetos
2
0%
Arbitragem
0
Expirado
0
Livre
Pedidos semelhantes
Personnal programmer 30 - 31 USD
Hey there! I’m looking for a talented NinjaTrader programmer to partner with on some exciting projects. If you have a knack for NinjaScript and a passion for trading tech, let’s team up! What You Can Expect: A friendly collaboration on diverse projects Fair pay—50/50 split on all earnings An opportunity to dive deep into innovative trading strategies What I’m Hoping You Bring: Experience with NinjaTrader and
MT5 中运行的 EA 的主要任务 : 1 EA 将同时选择两对货币进行交易,包括 AUDUSD 、 EURUSD 、 GBPUSD 、 NZDUSD 、 USDCAD 、 USDCHF 、 USDJPY 、 AUDJPY 、 EURAUD 、 EURJPY 、 GBPJPY 、 GBPNZD 和 GBPCHF ,默认设置 GBPUSD 、 EURAUD 。 2 蜡烛图 的时间 区间 包括 15M 、 30M 、 1H 、 2H 、 4H 或 1D 。对于两对货币中的 每一对而言, 将同时密切观察两个 时间区间图。 也就是说,两对 货币 同时 打开 四个窗口,每对默认设置 15M 和 4H 。 如果 您 不肯定如何 为同一货币对打开两个窗口,请不要考虑接受这项工作 。 3 将使用自主开发的指标 CMA 结合 CCI 预测走势。 在某些特殊情况下 ,将使用 马丁格尔策略进行操作。因此,如果您已经拥有基于 Martingale
Required to develop expert advisory which will work on any pair including crypto , forex, gold, silver, oil, simple stragy which will work on RSI,GRID, take profit, grid distance, start and stop button, only buy and only sell, filter for time frame Like 5m to 4 hr. stop loss and take profit .Detail will be shared once you except order
I have a indicator, mql file. The signals are seen below on a EURNZD H1 chart. Very important to get accurate entries. The signal to trade is the first tic after the the indicator signal paints. I've tried to demonstrate that below. Other than that the EA will have a lot size escalation, an on-screen pip counter, a button to stop taking new trades, SL/TP, and magic number. I would like the indicator to be within the
I would like to create an EA based on the Shved Supply and Demand indicator. you can find the Shved Supply and Demand v1.7 indicator in the following link https://www.mql5.com/en/code/29395 NB: Checks the trading robot must pass before publication in the Market ( https://www.mql5.com/en/articles/2555 ) MQ5 file to be provided
Hi Guys, I am looking to someone that can generate an indicator for MT4 as explained below. Basically I would need that the indicator point out the price that will close my position in stop out/margin call. The indicator should pick automatically the level of trade out for the broker (which can be different from a broker to another broker) It should write (ideally on the bottom on the left) the following information
Mbeje fx 50+ USD
I like to own my robot that why I want to build my own.i like to be a best to every robot ever in the life to be have more money
I need an MT5 EA that can do the following: I have to give the EA a price in advance, when the price is reached the EA has to automatically place a buy stop or sell stop order 0.5 pips below or above the price. Is this possible
Good day, I want someone to help me create a universal news filter with on/off switch, with start and end settings, and drawdown control with magic number of EAs, etc. Thanks
Hello, I am looking for a professional programmer to optimize my existing EA integrating it with ChatGPT to analyze currencies using various methods to make the right trading decisions. i want it to be an EA that can be trusted to carry trade with the help of chat gpt and also have a very low drawdown

Informações sobre o projeto

Orçamento
30+ USD
Desenvolvedor
27 USD
Prazo
de 1 para 3 dias