Open by MA Cross and Close by ATR

MQL5 Experts

Tâche terminée

Temps d'exécution 3 heures

Spécifications

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

Répondu

1
Développeur 1
Évaluation
(5)
Projets
9
11%
Arbitrage
5
40% / 60%
En retard
1
11%
Gratuit
2
Développeur 2
Évaluation
(230)
Projets
406
33%
Arbitrage
53
36% / 40%
En retard
147
36%
Chargé
3
Développeur 3
Évaluation
(1118)
Projets
1420
62%
Arbitrage
21
57% / 10%
En retard
43
3%
Gratuit
4
Développeur 4
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
5
Développeur 5
Évaluation
(6)
Projets
8
25%
Arbitrage
1
100% / 0%
En retard
3
38%
Gratuit
6
Développeur 6
Évaluation
(87)
Projets
131
22%
Arbitrage
7
57% / 0%
En retard
33
25%
Gratuit
7
Développeur 7
Évaluation
(74)
Projets
121
43%
Arbitrage
12
33% / 50%
En retard
17
14%
Gratuit
8
Développeur 8
Évaluation
(5)
Projets
9
0%
Arbitrage
1
100% / 0%
En retard
3
33%
Gratuit
9
Développeur 9
Évaluation
(22)
Projets
25
4%
Arbitrage
0
En retard
5
20%
Gratuit
10
Développeur 10
Évaluation
(1)
Projets
1
0%
Arbitrage
0
En retard
0
Gratuit
11
Développeur 11
Évaluation
(356)
Projets
380
70%
Arbitrage
3
100% / 0%
En retard
2
1%
Travail
12
Développeur 12
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
13
Développeur 13
Évaluation
(558)
Projets
925
48%
Arbitrage
301
59% / 25%
En retard
123
13%
Chargé
14
Développeur 14
Évaluation
(86)
Projets
114
26%
Arbitrage
7
29% / 57%
En retard
5
4%
Gratuit
Commandes similaires
I need an indicator or ea for detecting of spike in boom abd crash market. I need a consistant indi. Or ea and developer should provide its demo for test purposes
I need to backtest my strategy so I need m1 history of 28 currency pairs on oanda exchange. can be updated to the present time . I need 1min historical canfle data based on Tradingviwe UI from Oanda broker. for gold, bitcoin, ……). Tradingviwe only show 20000 candle but i need far further data Who can help me
I need someone to convert my tradingview Indicator to MT5, Its very smiple for Buying and Selling Indicator working fine in TradingView, After the Indicator ready we need to build EA to take the Buy and Sell Value and Open trade automatically in MT5, with all basic input setting including lot size, Automated SL and TP Management: The EA automatically manages the Stop Loss (SL) and Take Profit (TP) levels of open
Looking for a MT5 HFT with no losses to be made orginal. Needs to be able to trade forex, metals, indices or what can be most volatility. It’s being used on live cash accounts so must have capability to increase lots sizes. Prefer tick. If interested to discuss and build let me know
Hi All, I have the following specification for changes to my MT5 EA: 1. Replace existing strategy for entry with another one, using fibo based indicator I will provide. 2. Fix an issue with strategy where EA does not open trades as expected (it should enter both buy and sell simultaneously if (adds position in loss)EnterStepPoints > 0 and (adds position in profit)EnterNewinProfit_Step_Point > 0, and separate each
Hi dear How are you doin?? I like to convert this mql4 indicator to Tradingview pin script Can you do it ?? Are you available for it ?? Thanks very much And waiting for your response
Hello, I've an indicator in TradingView, I need help in creating a strategy using that, strategy is simple - Buy when it turns green, sell when it turns red. Can you help
MA based EA. 1. EA convert to mt5 2. add in Input setting (choose option ) Trailing method -Trailing sl method -Limited price method . (already EA working on this .just make a option and add limited method form other version of same ea .) +++++++++++++++++++++++++++++++++++++++++++++++++ 2. Add EA starting mode - Automatic entry mode - Manual entry mode
Breakout trading EA 30 - 50 USD
I need an EA to mark the high and the low of a certain period, and EA to place pending orders upon breakout. Parameters will include chart settings, time filter, position settings (lot size, TP / SL management), and few other simple settings. This strategy is very simple but I'd like to have it automated so that I don't have to be in front of the chart all day. Will share further info, illustrations, strategy
Hello guys, Iam an investor in an account that runs Arbitrage EA on one broker and it works just fantastic.. The guy who runs the EA obviously doesnt want to sell the EA because he profits from that. I would like to find someone that can develop me one Arbitrage (HFT) EA that works perfect on MT5 and trades XAUUSD (gold) specifically. If you would like and can help me i would appriciate it! Best regards

Informations sur le projet

Budget
30+ USD
Pour le développeur
27 USD