Upgrading EA with 2 new variables

MQL4 Uzman Danışmanlar Forex

İş tamamlandı

Tamamlanma süresi: 3 gün
Geliştirici tarafından geri bildirim
Has been a pleasure working with you, looking forward to work with you again.
Müşteri tarafından geri bildirim
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!

İş Gereklilikleri

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


Yanıtlandı

1
Geliştirici 1
Derecelendirme
(10)
Projeler
9
11%
Arabuluculuk
5
0% / 60%
Süresi dolmuş
1
11%
Serbest
2
Geliştirici 2
Derecelendirme
(63)
Projeler
68
25%
Arabuluculuk
12
42% / 42%
Süresi dolmuş
4
6%
Serbest
3
Geliştirici 3
Derecelendirme
(42)
Projeler
62
8%
Arabuluculuk
12
58% / 42%
Süresi dolmuş
1
2%
Serbest
4
Geliştirici 4
Derecelendirme
(56)
Projeler
65
29%
Arabuluculuk
5
0% / 60%
Süresi dolmuş
1
2%
Çalışıyor
5
Geliştirici 5
Derecelendirme
(568)
Projeler
641
41%
Arabuluculuk
21
57% / 29%
Süresi dolmuş
47
7%
Çalışıyor
6
Geliştirici 6
Derecelendirme
(1)
Projeler
2
0%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
Benzer siparişler
I want to decompile an ea file and get the source code, i need it really quick as fast as possible. the file must be delivered alongside the source code
Dear Developers, I would have a very simple request. I have a ML model developed in Python for EURUSD daily trading. I would like to backtest it in Meta Trader 5 using the Strategy Tester tool. For that I would need an Expert Advisor program. The input would be a csv file that contains two columns: - dates (going back for a few years on a daily basis) - trading signal (it can have only 2 values, either 1: Buy, or -1
Hello The EA will work on particular zone choose by the user and can mark it on any TF and with some rules can open trades and mange the trade by some unique rules. the EA need to check the difference by RSI as well and with some extra rules . developer should have good attitude and good communication (englsih) with high performence and knowledge with coding EA
Hi I have the code in pinescript for an indicator that I need done in Ninja Trader 1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and
Hello The EA will work on particular zone choose by the user and can mark it on any TF and with some rules can open trades and mange the trade by some unique rules. the EA need to check the difference by RSI as well and with some extra rules . developer should have good attitude and good communication (englsih) with high performence and knowledge with coding EA
1. The Trading View indicator code needs to be converted into and adapted for Ninja Trader 8 2. An indicator and Automated Trading Strategy needs to be developed. 3. Any parts of the Trading View Indicator that can't be replicated needs to be discussed with me and agreed before excluding. (there should not be any) 4. Trailing stop and Trailing Draw Down options need to be implemented 5. Risk needs to be in % of
Create mt4 ea 50+ USD
To convert the provided MT4 indicator script into an Expert Advisor (EA) and implement prompt functionality for user input, we need to modify the code to handle external parameters and provide a user-friendly interface. Below is the EA code that incorporates prompts for user inputs
I WRITE a code i want to conect this for automatic trading through vps .and als advanced features for this code .i attached afile please watch .and give me perfect ea
Hi I have the code in pinescript for an indicator that I need done in Ninja Trader, I wanted this indicator in NT bcs I chart in NT, and if the indicator could also have been an automated strategy even better. Please confirm that it will be an indicator and Automated Trading Strategy
Hello potential Freelancers I’m very new to trading so please bear with me as I try to explain what ‘m looking for. I'm currently getting signals ( XAUUSD )sent to me and I’m looking to find a person who can look at the data either watch account live, or I send the trade history. The bot my provider is using makes 100’s of trades a day and does very well on average. I’m also looking to have the following features

Proje bilgisi

Bütçe
30+ USD
Geliştirici için
27 USD
Son teslim tarihi
from 1 to 3 gün