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

Auftrag beendet

Ausführungszeit 10 Tage
Bewertung des Kunden
Hooman is a great programmer, he is patient and professional, will work with him again in the future.
Bewertung des Entwicklers
He is so responsible and I had a good job I hope to work with you in another job.

Spezifikation

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

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


Dateien:

Bewerbungen

1
Entwickler 1
Bewertung
(365)
Projekte
412
36%
Schlichtung
35
26% / 57%
Frist nicht eingehalten
63
15%
Frei
2
Entwickler 2
Bewertung
(470)
Projekte
706
56%
Schlichtung
45
31% / 31%
Frist nicht eingehalten
115
16%
Arbeitet
3
Entwickler 3
Bewertung
(119)
Projekte
127
41%
Schlichtung
3
33% / 67%
Frist nicht eingehalten
0
Frei
4
Entwickler 4
Bewertung
(4)
Projekte
12
0%
Schlichtung
0
Frist nicht eingehalten
3
25%
Frei
5
Entwickler 5
Bewertung
(49)
Projekte
134
27%
Schlichtung
62
13% / 53%
Frist nicht eingehalten
58
43%
Frei
6
Entwickler 6
Bewertung
(117)
Projekte
138
41%
Schlichtung
30
7% / 77%
Frist nicht eingehalten
17
12%
Frei
7
Entwickler 7
Bewertung
(17)
Projekte
24
33%
Schlichtung
5
20% / 40%
Frist nicht eingehalten
8
33%
Frei
Ähnliche Aufträge
Develop a multi-strategies EA that makes entries based on selectable indicator-based criteria. Each can be toggled on/off, and trades can also be placed using a selectable combination of signals. Each trade position shall be entered on the bar and managed as a modified martingale. Position management will include partial close, variable grid increase as grid number increases, News stops, and a Dashboard for manual
Hello, In need an expert advisor that can copy my CFD (GBPUSD) into Futures 6B, along with AUDUSD. & that whenever I close the position, it closes it aswell. Also if there is limited broker API access, I don't mind getting a broker recommendation
I need an EA that opens trades according to the crossover of Moving Averages. The EA is based on two Moving Averages MA1 and MA2: For every new candle the EA attempts to open a new position, according to the MA crossover direction: If MA1>MA2, open a BUY position If MA1<MA2, open a SELL position There is a limit for current open trades which is also set in the settings. If the number of open trades reaches that
The job is simple, I want a custom indicator which consist of a combination of 3 indicators in separate window as I will show you in the screenshot of my mt5 trading platform. The indicators are RSI(period 14, Apply to close) Level 10 Buy, Level 50 Take profit, level 90 Sell) MA( Period 200, Method Exponential, Apply to Median price, Shift 0) BB (Period 25, Apply to close, Deviation 0.035, Shift 0) Ideally on a 1
the code wasn't mine, i have got it somewhere on the web, but i like the performance of the EA, so i want to use it on mt5 platform. the given code based on price movements with ladder entry concept
Good Day I would like to order a trading robot. Pairs: XAUUSD (GOLD) EUR/USD USD/JPY The robot should be trading daily with TP/SL build in, would like to have trailing and stop loss, should execute up to 5 trades (preffarable setting choice) up to 10 trades Los sizes to be choise setting, must also trade major US vews events Like:US- PPI, CPI, NFP, Sales m/m and so on Must also show/display alert when opening
Hello Guys, I need a trading bot for the MT5 to place order based on my trading strategy which is based on - >> entry based on EMA with rejection from specific levels like support and resistance area - levels and time frame i will apply into the robot manually on daily basis. also need - trailing stoploss , shift to breakeven after gaining some points. need a highly expert developer
I have a full strategy based on indicator and candle based on . i would like to make it into a robot which will trade for me on a specific time and specific rules. i need a person who can do this project for me. If you have done this type of job . you are most welcome for this. Apply only if you know binary trading option and binomo trading platform well and how it works
I want to make AI based on Attached Picture Swing High low. If you have experience can share demo first. Stop loss, take profit, trailing , break even ,DD etc. also amiable
Hello, I’m looking for a TradingView indicator that fits my forex trading needs. If you can create or customize one for me, please reach out. I'd appreciate your help! Thanks in advance."

Projektdetails

Budget
35+ USD
Für die Entwickler
31.5 USD
Ausführungsfristen
bis 3 Tag(e)