Open by MA Cross and Close by ATR

MQL5 Эксперты

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

Время выполнения 3 часа

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

Need an EA for MT5 (including source code) : 

MT5 EA with Adaptive ATR


  1. The EA is based on 2 MA cross & close positions by ATR indicator
  2. Sample
  3. Fast MA cross slow MA to above and atr adaptive MA is green then open buy
  4. Close Buy order after the ATR indicator turns red
  5. sell fast MA cross slow MA to below and adaptive MA is red then open sell
  6. Close Sell order after the ATR indicator turns green
  7. Order execution on the best possible rates
  8. The Adaptive ATR indicator code already provided with the order
  9. All indicator input parameters should be user modifiable like MA period, MA type, ATR period etc
  10. It should work with any _Symbol & current chart time period & all times 24*5 no restrictions
  11. Expect default SL TP applicable as 0 and should be user modifiable
  12.           Needed the source code for the EA


//------------------------------------------------------------------
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_plots   1
#property indicator_label1  "EMA"
#property indicator_type1   DRAW_COLOR_LINE
#property indicator_color1  clrDarkGray,clrDeepPink,clrLimeGreen
#property indicator_width1  2
//--- input parameters
input int                inpEmaPeriod = 25;          // EMA period
input ENUM_APPLIED_PRICE inpPrice     = PRICE_CLOSE; // Price
//--- indicator buffers
double val[],valc[],atr[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,val,INDICATOR_DATA);
   SetIndexBuffer(1,valc,INDICATOR_COLOR_INDEX);
   SetIndexBuffer(2,atr,INDICATOR_CALCULATIONS);
//--- indicator short name assignment
   IndicatorSetString(INDICATOR_SHORTNAME,"ATR adaptive EMA ("+(string)inpEmaPeriod+")");
//---
   return (INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator de-initialization function                      |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,const int prev_calculated,const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   if(Bars(_Symbol,_Period)<rates_total) return(prev_calculated);
   for(int i=(int)MathMax(prev_calculated-1,0); i<rates_total && !IsStopped(); i++)
     {
      atr[i] = 0;
         for (int k=0; k<inpEmaPeriod && (i-k-1)>=0; k++)
            atr[i] += MathMax(high[i-k],close[i-k-1])-MathMin(low[i-k],close[i-k-1]);
            atr[i] /= inpEmaPeriod;
      int _start = MathMax(i-inpEmaPeriod+1,0);
      double _max = atr[ArrayMaximum(atr,_start,inpEmaPeriod)];            
      double _min = atr[ArrayMinimum(atr,_start,inpEmaPeriod)];            
      double _coeff = (_min!=_max) ? 1-(atr[i]-_min)/(_max-_min) : 0.5;
      double _alpha = 2.0 / (1+inpEmaPeriod*(_coeff+1.0)/2.0);
      double _price = getPrice(inpPrice,open,close,high,low,i,rates_total);
      val[i]  = (i>0) ? val[i-1]+_alpha*(_price-val[i-1]) : _price;
      valc[i] = (i>0) ?(val[i]>val[i-1]) ? 2 :(val[i]<val[i-1]) ? 1 : valc[i-1]: 0;
     }
   return(rates_total);
  }
//+------------------------------------------------------------------+
//| Custom functions                                                 |
//+------------------------------------------------------------------+
double getPrice(ENUM_APPLIED_PRICE tprice,const double &open[],const double &close[],const double &high[],const double &low[],int i,int _bars)
  {
   if(i>=0)
      switch(tprice)
        {
         case PRICE_CLOSE:     return(close[i]);
         case PRICE_OPEN:      return(open[i]);
         case PRICE_HIGH:      return(high[i]);
         case PRICE_LOW:       return(low[i]);
         case PRICE_MEDIAN:    return((high[i]+low[i])/2.0);
         case PRICE_TYPICAL:   return((high[i]+low[i]+close[i])/3.0);
         case PRICE_WEIGHTED:  return((high[i]+low[i]+close[i]+close[i])/4.0);
        }
   return(0);
  }
//+------------------------------------------------------------------+

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

1
Разработчик 1
Оценка
(5)
Проекты
9
11%
Арбитраж
5
40% / 60%
Просрочено
1
11%
Свободен
2
Разработчик 2
Оценка
(243)
Проекты
430
34%
Арбитраж
54
37% / 39%
Просрочено
157
37%
Загружен
3
Разработчик 3
Оценка
(1130)
Проекты
1432
62%
Арбитраж
21
57% / 10%
Просрочено
43
3%
Свободен
4
Разработчик 4
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
5
Разработчик 5
Оценка
(6)
Проекты
8
25%
Арбитраж
1
100% / 0%
Просрочено
3
38%
Свободен
6
Разработчик 6
Оценка
(87)
Проекты
131
22%
Арбитраж
7
57% / 0%
Просрочено
33
25%
Свободен
7
Разработчик 7
Оценка
(74)
Проекты
121
43%
Арбитраж
12
33% / 50%
Просрочено
17
14%
Свободен
8
Разработчик 8
Оценка
(5)
Проекты
9
0%
Арбитраж
1
100% / 0%
Просрочено
3
33%
Свободен
9
Разработчик 9
Оценка
(22)
Проекты
25
4%
Арбитраж
0
Просрочено
5
20%
Свободен
10
Разработчик 10
Оценка
(1)
Проекты
1
0%
Арбитраж
0
Просрочено
0
Свободен
11
Разработчик 11
Оценка
(368)
Проекты
398
70%
Арбитраж
3
100% / 0%
Просрочено
2
1%
Загружен
12
Разработчик 12
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
13
Разработчик 13
Оценка
(563)
Проекты
932
47%
Арбитраж
302
59% / 25%
Просрочено
124
13%
Занят
14
Разработчик 14
Оценка
(87)
Проекты
114
26%
Арбитраж
7
29% / 57%
Просрочено
5
4%
Свободен
Похожие заказы
Creating of an expert advisor or trading bot that uses a Top Down analysis (using monthly, weekly, daily, hourly, minutes ( 30, 15, 5, 1) to determine trade direction or trend direction and makes multiple trade decisions for mt4. You can use or combine accurate trend indicators
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
I am looking forward to automate my trading strategy where I use renko bars on Tradingview. I really want to use unirenkos too, but unfortunately I couldn't figure out how to use ninjatrader on my MacBook and Tradingview does not offer unirenkos. As far as I see from your offered services you are very familiar with ninjatrader. I wanted to ask you if you could code me an Indicator for unirenkos for Tradingview so I
I am looking forward to automate my trading strategy where I use renko bars on Tradingview. I really want to use unirenkos too, but unfortunately I couldn't figure out how to use ninjatrader on my MacBook and Tradingview does not offer unirenkos. As far as I see from your offered services you are very familiar with ninjatrader. I wanted to ask you if you could code me an Indicator for unirenkos for Tradingview so I
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
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 2 lines to determine the trend of the market and afterwards take bids towards the correct direction. It will also be able to use a distance between the bids for the direction of the trend and plan a reverse bid when the price of the extreme doesn’t change again. The
Gradient boosting and L2 100 - 200 USD
I am looking for a well experienced programmer to put/implement a gradient boosting algorithm and an L2 to reduce overfitting in my ea which l already have which uses indicators . If you are experienced please adhere
Hello, I'm looking for a developer for repair calendar in EA MT4/MT5 (News Filter - https://ec.forexprostools.com ) for all windows servers. Note: EA MT4/MT5 works with calendar on PC Win 10, 11 but not on all windows servers. I have the source code and will post within the comments section for review. If you are able to do this and quality. Please apply. Thanks
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
SCALP MARTINCALE SPY TIMEFRAME 1MIN CANDLE - SHORT SIDE ONLY 1-SET RISK : A IS A VARIABLE (HOW MUCH $) 2-SET ATR(3) : SET THE TIME AT WHICH THE ATR SHOULD BE TAKEN, IF SET 933AM THEN THE ATR OF THE 1MIN CANDLE AT 933AM CANDLE WILL BE USED (ROUND AT 0.25 UP OR DOWN) *USE NEW YORK TIME 3-SET MAX NUMBER OF ENTRY : B IS A VARIABLE 4-SET RSI(14) / C IS A VARIABLE, IF RSI(14) > C = ORDERS OPEN 5-IF RSI(14) > C IS TRIGGERED

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

Бюджет
30+ USD
Исполнителю
27 USD