Expert Advisor based on moving average and RSI crossovers

MQL4 专家

工作已完成

执行时间7 小时
客户反馈
Great to work with, helpful and patient. Did everything i asked
员工反馈
Thanks for your job.

指定

Hi there, i have never coded before and have no idea where to start on creating this advisor. I am aware this is a simple EA but would appreciate some help.
The EA is a custom indicator im using along with another rule i have to enter my trades.

I want the advisor to enter a trade when the 5MA crosses over the 10MA and the RSI 10 (applied to median price HL/2) cross above or below 50 respectively

Would also like to be able to easily change my lot sizes, SL's and profit targets.

Will need some help once the Ea is made on how to edit these things

Could any coders help with this? Would be greatful for any advice whatsoever. Thanks!

This is the moving average crossover alert indicator im using but would like to implement the rsi crossover rule to enter the trade also

#property copyright "Copyright © 2005, Jason Robinson (jnrtrading)"
#property link      "http://www.jnrtrading.co.uk"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 LawnGreen
#property indicator_color2 Red

extern bool SoundON=true;
extern bool EmailON=false;

extern int FastMA_Mode = 1; //0=sma, 1=ema, 2=smma, 3=lwma, 4=lsma
extern int FastMA_Period =   5;
extern int FastPriceMode = 0;//0=close, 1=open, 2=high, 3=low, 4=median(high+low)/2, 5=typical(high+low+close)/3, 6=weighted(high+low+close+close)/4
extern int SlowMA_Mode = 1; //0=sma, 1=ema, 2=smma, 3=lwma, 4=lsma
extern int SlowMA_Period =   20;
extern int SlowPriceMode = 0;//0=close, 1=open, 2=high, 3=low, 4=median(high+low)/2, 5=typical(high+low+close)/3, 6=weighted(high+low+close+close)/4
double CrossUp[];
double CrossDown[];
int flagval1 = 0;
int flagval2 = 0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0, DRAW_ARROW, EMPTY, 1);
   SetIndexArrow(0, 233);
   SetIndexBuffer(0, CrossUp);
   SetIndexStyle(1, DRAW_ARROW, EMPTY, 1);
   SetIndexArrow(1, 234);
   SetIndexBuffer(1, CrossDown);
   GlobalVariableSet("AlertTime"+Symbol()+Period(),CurTime());
   GlobalVariableSet("SignalType"+Symbol()+Period(),OP_SELLSTOP);
//   GlobalVariableSet("LastAlert"+Symbol()+Period(),0);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   GlobalVariableDel("AlertTime"+Symbol()+Period());
   GlobalVariableDel("SignalType"+Symbol()+Period());
//   GlobalVariableDel("LastAlert"+Symbol()+Period());

//----
   return(0);
  }

//+------------------------------------------------------------------+
//| LSMA with PriceMode                                              |
//| PrMode  0=close, 1=open, 2=high, 3=low, 4=median(high+low)/2,    |
//| 5=typical(high+low+close)/3, 6=weighted(high+low+close+close)/4  |
//+------------------------------------------------------------------+

double LSMA(int Rperiod, int prMode, int shift)
{
   int i;
   double sum, pr;
   int length;
   double lengthvar;
   double tmp;
   double wt;

   length = Rperiod;
 
   sum = 0;
   for(i = length; i >= 1  ; i--)
   {
     lengthvar = length + 1;
     lengthvar /= 3;
     tmp = 0;
     switch (prMode)
     {
     case 0: pr = Close[length-i+shift];break;
     case 1: pr = Open[length-i+shift];break;
     case 2: pr = High[length-i+shift];break;
     case 3: pr = Low[length-i+shift];break;
     case 4: pr = (High[length-i+shift] + Low[length-i+shift])/2;break;
     case 5: pr = (High[length-i+shift] + Low[length-i+shift] + Close[length-i+shift])/3;break;
     case 6: pr = (High[length-i+shift] + Low[length-i+shift] + Close[length-i+shift] + Close[length-i+shift])/4;break;
     }
     tmp = ( i - lengthvar)*pr;
     sum+=tmp;
    }
    wt = sum*6/(length*(length+1));
   
    return(wt);
}


//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start() {
   int limit, i, counter;
   double tmp=0;
   double fastMAnow, slowMAnow, fastMAprevious, slowMAprevious;
   double Range, AvgRange;
   int counted_bars=IndicatorCounted();
//---- check for possible errors
   if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;

   limit=Bars-counted_bars;
  
   for(i = 0; i <= limit; i++) {
  
      counter=i;
      Range=0;
      AvgRange=0;
      for (counter=i ;counter<=i+9;counter++)
      {
         AvgRange=AvgRange+MathAbs(High[counter]-Low[counter]);
      }
      Range=AvgRange/10;
      
      if (FastMA_Mode == 4)
      {
         fastMAnow = LSMA(FastMA_Period, FastPriceMode, i);
         fastMAprevious = LSMA(FastMA_Period, FastPriceMode,  i+1);
        
      }
      else
      {
         fastMAnow = iMA(NULL, 0, FastMA_Period, 0, FastMA_Mode, FastPriceMode, i);
         fastMAprevious = iMA(NULL, 0, FastMA_Period, 0, FastMA_Mode, FastPriceMode, i+1);
      }

      if (SlowMA_Mode == 4)
      {
         slowMAnow = LSMA( SlowMA_Period, SlowPriceMode, i);
         slowMAprevious = LSMA( SlowMA_Period, SlowPriceMode, i+1);
      }
      else
      {
         slowMAnow = iMA(NULL, 0, SlowMA_Period, 0, SlowMA_Mode, SlowPriceMode, i);
         slowMAprevious = iMA(NULL, 0, SlowMA_Period, 0, SlowMA_Mode, SlowPriceMode, i+1);
      }
     
      if ((fastMAnow > slowMAnow) && (fastMAprevious < slowMAprevious))
      {
         if (i == 1 && flagval1==0){  flagval1=1; flagval2=0; }
         CrossUp[i] = Low[i] - Range*0.75;
      }
      else if ((fastMAnow < slowMAnow) && (fastMAprevious > slowMAprevious))
      {
         if (i == 1 && flagval2==0) { flagval2=1; flagval1=0; }
         CrossDown[i] = High[i] + Range*0.75;
      }
   }
  
   if (flagval1==1 && CurTime() > GlobalVariableGet("AlertTime"+Symbol()+Period()) && GlobalVariableGet("SignalType"+Symbol()+Period())!=OP_BUY)
   {
//      if (GlobalVariableGet("LastAlert"+Symbol()+Period()) < 0.5)
//      {
      if (SoundON) Alert("BUY signal at Ask=",Ask,"\n Bid=",Bid,"\n Time=",TimeToStr(CurTime(),TIME_DATE)," ",TimeHour(CurTime()),":",TimeMinute(CurTime()),"\n Symbol=",Symbol()," Period=",Period());
      if (EmailON) SendMail("BUY signal alert","BUY signal at Ask="+DoubleToStr(Ask,4)+", Bid="+DoubleToStr(Bid,4)+", Date="+TimeToStr(CurTime(),TIME_DATE)+" "+TimeHour(CurTime())+":"+TimeMinute(CurTime())+" Symbol="+Symbol()+" Period="+Period());
//      }
      tmp = CurTime() + (Period()-MathMod(Minute(),Period()))*60;
      GlobalVariableSet("AlertTime"+Symbol()+Period(),tmp);
      GlobalVariableSet("SignalType"+Symbol()+Period(),OP_SELL);
//      GlobalVariableSet("LastAlert"+Symbol()+Period(),1);
   }
  
   if (flagval2==1 && CurTime() > GlobalVariableGet("AlertTime"+Symbol()+Period()) && GlobalVariableGet("SignalType"+Symbol()+Period())!=OP_SELL) {
//      if (GlobalVariableGet("LastAlert"+Symbol()+Period()) > -0.5)
//      {
      if (SoundON) Alert("SELL signal at Ask=",Ask,"\n Bid=",Bid,"\n Date=",TimeToStr(CurTime(),TIME_DATE)," ",TimeHour(CurTime()),":",TimeMinute(CurTime()),"\n Symbol=",Symbol()," Period=",Period());
      if (EmailON) SendMail("SELL signal alert","SELL signal at Ask="+DoubleToStr(Ask,4)+", Bid="+DoubleToStr(Bid,4)+", Date="+TimeToStr(CurTime(),TIME_DATE)+" "+TimeHour(CurTime())+":"+TimeMinute(CurTime())+" Symbol="+Symbol()+" Period="+Period());
//      }
      tmp = CurTime() + (Period()-MathMod(Minute(),Period()))*60;
      GlobalVariableSet("AlertTime"+Symbol()+Period(),tmp);
      GlobalVariableSet("SignalType"+Symbol()+Period(),OP_BUY);
//      GlobalVariableSet("LastAlert"+Symbol()+Period(),-1);
   }

   return(0);
}


反馈

1
开发者 1
等级
(620)
项目
680
57%
仲裁
25
16% / 60%
逾期
228
34%
空闲
2
开发者 2
等级
(53)
项目
79
18%
仲裁
13
15% / 54%
逾期
5
6%
空闲
3
开发者 3
等级
(34)
项目
80
34%
仲裁
13
31% / 54%
逾期
19
24%
空闲
4
开发者 4
等级
(769)
项目
1033
44%
仲裁
50
8% / 50%
逾期
117
11%
空闲
5
开发者 5
等级
(339)
项目
809
73%
仲裁
30
33% / 37%
逾期
194
24%
空闲
6
开发者 6
等级
(16)
项目
18
44%
仲裁
1
0% / 100%
逾期
1
6%
空闲
相似订单
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
Hello, I need a martingale and grid bot. The programmer must provide a test of about 5 minutes for the EA to see how it works and if everything is fine, it will be selected to make some modifications for personal use to that EA that you provide. If it has a lot of graphics or buttons. better It doesn't matter if the robot is bad, I'm more interested in its functionalities to use with my strategy
Hi Developer, I would like to create the Scalping EA based for Mt4 on the investing.com data https://www.investing.com/currencies/eur-usd-technical EA have timing to adjust time to trade. follow the broker time. From starting time to end time EA have a adjustable Lot size (0.01 incremental to 0.01) EA have a adjustable TP (1pip to 100pip incremental 1pip) EA have a adjustable SL (1pip to 100pip incremental 1pip) EA
Here is the Idea: I want a Semi Auto Trade Panel Manager EA that only activates when I press the BUY or SELL or BUY LIMIT or SELL LIMIT then the EA will do the rest : that includes the BUY STOP 0r SELL STOP and the hedging calculations according to below diagram. So overall , my only intervention is entering the lot size , hedge zone distance and TP ratio or entering the price for buy limit/sell limit then pressing
Hi, I'm looking for a martingale MT4 EA that performs a lot of trading volume per day. If you have the robot, you'll need to send me the demo so I can backtest it. Thank you very much
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
Hello, I want to create an EA that can be able to take and optimise trade bids using the trend tracker concept I have developed. The tracker will monitor the 2 lines in the below pictures and then start to activate bids once they cross each other and then be able to manage all bids afterwards towards the direction of the market by opening and closing them intermittently and profitably until the position at the other
Hi man, How are u? I have an EA and I need to check few aspects of the code, if It works fine? I am looking for an expert coder, who can understand mt4 language and help us to solve this out. This job will hardly take about 3-4 hours max for an experienced coder, when explained detail. Also, I would like to give this to someone, who can understand and speak English well. Also, the coder should be able to come via
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. THREE TYPES OF ENTRIES 1: AGGRESSIVE 2: DIVERGENCE 3
Indicator in use: Bollinger Bands Mechanism: (See diagrams provided for help) Sells: 1. Trigger candle: When candle low is above the top Bollinger band - accurate to the point scale (e.g. On EURUSD if candle low is 1.07915 and the value of top bollinger is 1.07914 - this is a sell signal) 2. Enter sell ONLY on the next candle if price breaks below the trigger candle LOW (using the e.g. above- if next candle price

项目信息

预算
30+ USD
开发人员
27 USD