Hi, I need someone who can create an EA that trades by RSI divergence (Zigzag included preferred)

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

Время выполнения 10 дней
Отзыв от заказчика
Hooman is a great programmer, he is patient and professional, will work with him again in the future.
Отзыв от исполнителя
He is so responsible and I had a good job I hope to work with you in another job.

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

Hi, I am trying to create an EA that trades by RSI divergence, I tried coding it as below but when I run it in backtest, the backtest ends in less than a second. I would like a functional EA based on this code that all I need was to change the numerical parameters to make it work for me. My trade logic is simple, I would like to be able to trend when the latest PeakPrice > last PeakPrice (note: latest doesn't have to be current, but last means the one before the latest) && rsi(latest_peak)<rsi(last_peak) and when the latest TroughPrice< last TroughPrice && rsi(latest_trough)>rsi(last_trough). It would be great if you can include Zigzag in finding the Peak and Trough. Attached is the technical indicators I would like my EA to base on (it didn't include a Zigzag though).

//+------------------------------------------------------------------+
//|                                                       RSI EA.mq4 |
//|                        Copyright 2015, MetaQuotes Software Corp. |
//|                           http://free-bonus-deposit.blogspot.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, dXerof"
#property link      "http://free-bonus-deposit.blogspot.com"
#property version   "1.00"
#property strict

#define arrowsDisplacement 0.0003

input bool   OpenBUY=True;
input bool   OpenSELL=True;
input bool   CloseBySignal=True;
input double StopLoss=0;
input double TakeProfit=0;
input double TrailingStop=0;
input int    RSIperiod=14;
input double BuyLevel=30;
input double SellLevel=70;
input bool   AutoLot=True;
input double Risk=1;
input double ManualLots=0.1;
input int    MagicNumber=123;
input string Koment="RSIea";
input int    Slippage=10;

input ENUM_APPLIED_PRICE    RSI_applied_price                = 0;

//---- buffers

double rsi[];


//----

//---
int OrderBuy,OrderSell;
int ticket;
int LotDigits;

double Trail,iTrailingStop;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {

   double stoplevel=MarketInfo(Symbol(),MODE_STOPLEVEL);
   OrderBuy=0;
   OrderSell=0;
   for(int cnt=0; cnt<OrdersTotal(); cnt++)
     {
      if(OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES))
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber && OrderComment()==Koment)
           {
            if(OrderType()==OP_BUY) OrderBuy++;
            if(OrderType()==OP_SELL) OrderSell++;
            if(TrailingStop>0)
              {
               iTrailingStop=TrailingStop;
               if(TrailingStop<stoplevel) iTrailingStop=stoplevel;
               Trail=iTrailingStop*Point;
               double tsbuy=NormalizeDouble(Bid-Trail,Digits);
               double tssell=NormalizeDouble(Ask+Trail,Digits);
               if(OrderType()==OP_BUY && Bid-OrderOpenPrice()>Trail && Bid-OrderStopLoss()>Trail)
                 {
                  ticket=OrderModify(OrderTicket(),OrderOpenPrice(),tsbuy,OrderTakeProfit(),0,Blue);
                 }
               if(OrderType()==OP_SELL && OrderOpenPrice()-Ask>Trail && (OrderStopLoss()-Ask>Trail || OrderStopLoss()==0))
                 {
                  ticket=OrderModify(OrderTicket(),OrderOpenPrice(),tssell,OrderTakeProfit(),0,Blue);
                 }
              }
           }
     }
   double rsim1=iRSI(Symbol(),1,RSIperiod,PRICE_CLOSE,1);
   double rsim5=iRSI(Symbol(),5,RSIperiod,PRICE_CLOSE,1);
   double rsim15=iRSI(Symbol(),15,RSIperiod,PRICE_CLOSE,1);
   double rsim30=iRSI(Symbol(),30,RSIperiod,PRICE_CLOSE,1);
   double rsim60=iRSI(Symbol(),60,RSIperiod,PRICE_CLOSE,1);
   double rsid1=iRSI(Symbol(),1440,RSIperiod,PRICE_CLOSE,0);
   double rsid2=iRSI(Symbol(),1440,RSIperiod,PRICE_CLOSE,1);
// double HTb=iCustom(Symbol(),0,"HalfTrend-1.02",0,0); //buy
// double HTs=iCustom(Symbol(),0,"HalfTrend-1.02",1,0); //buy
//--- open position
   int shift=4;
   if(IsTrough(shift) == true) 
   {
    int currentTrough = shift;
    int lastTrough = GetLastTrough(shift);
    if(OpenBUY && OrderBuy<3 && rsi[currentTrough] > rsi[lastTrough] && Low[currentTrough] < Low[lastTrough])OPBUY(); 
   } 
   if(IsPeak(shift) == true)
   {
    int currentPeak = shift;
    int lastPeak = GetLastPeak(shift);
    if(OpenSELL  && OrderSell<3  && rsi[currentPeak] < rsi[lastPeak] && High[currentPeak] > High[lastPeak])OPSELL(); 
   }
//--- close position by signal
   if(CloseBySignal)
     {
      if(OrderSell>0  && rsim30>70 && rsim60>70) CloseSell();
      if(OrderBuy>0 && rsim30<30  && rsim60<30)  CloseBuy();
     }
//---
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OPBUY()
  {
   double StopLossLevel;
   double TakeProfitLevel;
   if(StopLoss>0) StopLossLevel=Bid-StopLoss*Point; else StopLossLevel=0.0;
   if(TakeProfit>0) TakeProfitLevel=Ask+TakeProfit*Point; else TakeProfitLevel=0.0;

   ticket=OrderSend(Symbol(),OP_BUY,LOT(),Ask,Slippage,StopLossLevel,TakeProfitLevel,Koment,MagicNumber,0,DodgerBlue);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OPSELL()
  {
   double StopLossLevel;
   double TakeProfitLevel;
   if(StopLoss>0) StopLossLevel=Ask+StopLoss*Point; else StopLossLevel=0.0;
   if(TakeProfit>0) TakeProfitLevel=Bid-TakeProfit*Point; else TakeProfitLevel=0.0;
//---
   ticket=OrderSend(Symbol(),OP_SELL,LOT(),Bid,Slippage,StopLossLevel,TakeProfitLevel,Koment,MagicNumber,0,DeepPink);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void CloseSell()
  {
   int  total=OrdersTotal();
   for(int y=OrdersTotal()-1; y>=0; y--)
     {
      if(OrderSelect(y,SELECT_BY_POS,MODE_TRADES))
         if(OrderSymbol()==Symbol() && OrderType()==OP_SELL && OrderMagicNumber()==MagicNumber)
           {
            ticket=OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),5,Black);
           }
     }
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void CloseBuy()
  {
   int  total=OrdersTotal();
   for(int y=OrdersTotal()-1; y>=0; y--)
     {
      if(OrderSelect(y,SELECT_BY_POS,MODE_TRADES))
         if(OrderSymbol()==Symbol() && OrderType()==OP_BUY && OrderMagicNumber()==MagicNumber)
           {
            ticket=OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),5,Black);
           }
     }
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
double LOT()
  {
   double lotsi;
   double ilot_max =MarketInfo(Symbol(),MODE_MAXLOT);
   double ilot_min =MarketInfo(Symbol(),MODE_MINLOT);
   double tick=MarketInfo(Symbol(),MODE_TICKVALUE);
//---
   double  myAccount=AccountBalance();
//---
   if(ilot_min==0.01) LotDigits=2;
   if(ilot_min==0.1) LotDigits=1;
   if(ilot_min==1) LotDigits=0;
//---
   if(AutoLot)
     {
      lotsi=NormalizeDouble((myAccount*Risk)/10000,LotDigits);
        } else { lotsi=ManualLots;
     }
//---
   if(lotsi>=ilot_max) { lotsi=ilot_max; }
//---
   return(lotsi);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void CalculateRSI(int x1)
{
    rsi[x1] = iRSI(Symbol(),PERIOD_CURRENT,RSIperiod,RSI_applied_price,x1);             
}
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
bool IsPeak(int shift)
{
    
    if(iHigh(NULL,0,shift)>=iHigh(NULL,0,shift+1) && iHigh(NULL,0,shift+1)>=iHigh(NULL,0,shift+2) && iHigh(NULL,0,shift+2)>=iHigh(NULL,0,shift+3)
       && iHigh(NULL,0,shift)>=iHigh(NULL,0,shift-1) && iHigh(NULL,0,shift-1)>=iHigh(NULL,0,shift-2) && iHigh(NULL,0,shift-2)>=iHigh(NULL,0,shift-3))
        return(true);
    else 
        return(false);
}
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
bool IsTrough(int shift)
{
    if(iLow(NULL,0,shift)<=iLow(NULL,0,shift+1) && iLow(NULL,0,shift+1)<=iLow(NULL,0,shift+2) && iLow(NULL,0,shift+2)<=iLow(NULL,0,shift+3)
       && iLow(NULL,0,shift)<=iLow(NULL,0,shift-1) && iLow(NULL,0,shift-1)<=iLow(NULL,0,shift-2) && iLow(NULL,0,shift-2)<=iLow(NULL,0,shift-3))
        return(true);
    else 
        return(false);
}
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int GetLastPeak(int shift)
{
    for(int j = shift + 5; j < Bars; j++)
    {
        if(iHigh(NULL,0,j)>=iHigh(NULL,0,j+1) && iHigh(NULL,0,j+1)>=iHigh(NULL,0,j+2) && iHigh(NULL,0,j+2)>=iHigh(NULL,0,j+3) &&
           iHigh(NULL,0,j)>=iHigh(NULL,0,j-1) && iHigh(NULL,0,j-1)>=iHigh(NULL,0,j-2) && iHigh(NULL,0,j-2)>=iHigh(NULL,0,j-3))
            return(j);
    }
    return(-1);
}
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int GetLastTrough(int shift)
{
    for(int j = shift + 5; j < Bars; j++)
    {
        if(iLow(NULL,0,j)<=iLow(NULL,0,j+1) && iLow(NULL,0,j+1)<=iLow(NULL,0,j+2) && iLow(NULL,0,j+2)<=iLow(NULL,0,j+3) &&
           iLow(NULL,0,j)<=iLow(NULL,0,j-1) && iLow(NULL,0,j-1)<=iLow(NULL,0,j-2) && iLow(NULL,0,j-2)<=iLow(NULL,0,j-3))
            return(j);
    }
    return(-1);
}

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+


Файлы:

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

1
Разработчик 1
Оценка
(365)
Проекты
412
36%
Арбитраж
35
26% / 57%
Просрочено
63
15%
Свободен
2
Разработчик 2
Оценка
(468)
Проекты
703
56%
Арбитраж
45
29% / 31%
Просрочено
115
16%
Работает
3
Разработчик 3
Оценка
(119)
Проекты
127
41%
Арбитраж
3
33% / 67%
Просрочено
0
Свободен
4
Разработчик 4
Оценка
(4)
Проекты
12
0%
Арбитраж
0
Просрочено
3
25%
Свободен
5
Разработчик 5
Оценка
(49)
Проекты
134
27%
Арбитраж
62
13% / 53%
Просрочено
58
43%
Свободен
6
Разработчик 6
Оценка
(117)
Проекты
138
41%
Арбитраж
30
7% / 77%
Просрочено
17
12%
Свободен
7
Разработчик 7
Оценка
(17)
Проекты
24
33%
Арбитраж
5
20% / 40%
Просрочено
8
33%
Свободен
Похожие заказы
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
Здравствуйте. Я новичок в трейдинге. Ищу робота для торговли золотом и валютными парами. Так как я новичок в этом деле, то хотелось бы найти хорошего робота, который бы сам определял прибыльную сделку (неважно валютная пара это или золото) и сам бы ее совершал, хотя бы с точностью 90%. О цене поговорим позже. Жду ваших предложений
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 need to fix the alerts of my SMC Order Blocks indicator, which is a custom indicator created for me some time ago. This custom indicator already has several types of alerts built-in, but I need to fix specific ones while keeping the other existing alerts unchanged, as those do not have any errors. The alert is for a specific Order Blocks pattern. This indicator graphically provides a zigzag, and from there, CHoCH
Mobile robot 50 - 100 USD
I want a profitable scalping EA robot for mt5 and mobile phones (licence key should be provided).the video link attached below indicates how the EA robot should operate it.it analyses the market before taking trades and it trades candle to candle .also coding samples are provided on the video .it should be applicable to all timeframes.it should trade indices(Nas100,US30,S&p500,GER30,)
Martingale EA for MT5 30 - 100 USD
Criteria: Only one trade at a time. Cannot open another trade if one is running Trade on EURUSD only, once job is completed I will be happy to schedule more for other pairs You choose entry strategy and criteria win rate must be above 50% in long term backtest of EURUSD Every trade has got TP and SL Trades to last about a day, few trades a week, at least 10 pips gain per trade, so that it can be launched on normal
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
I want grate robot for making profits that know when to start a good trade and close a trade and must be active all time to avoid lost of money

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

Бюджет
35+ USD
Исполнителю
31.5 USD
Сроки выполнения
до 3 дн.