Ea creation from indicator

Spezifikation

i need a robot based on this indicator with the possibility to add hours and choose the days to trade, also when the new signal appears close the last position and open the new one, there must be only one trade per time, leave the indicator attached to the symbol.

code: 

//+----------------------------------------------+
//|  Parameters of drawing the bearish indicator |
//+----------------------------------------------+
//---- drawing the indicator 1 as a symbol
#property indicator_type1   DRAW_ARROW
//---- Magenta color is used as the color of the bearish indicator line
#property indicator_color1  Magenta
//---- thickness of line of the indicator 1 is equal to 4
#property indicator_width1  4
//---- displaying of the bearish label of the indicator
#property indicator_label1  "Brain1Sell"
//+----------------------------------------------+
//|  Parameters of drawing the bullish indicator |
//+----------------------------------------------+
//---- drawing the indicator 2 as a line
#property indicator_type2   DRAW_ARROW
//---- lime color is used as the color of the bullish line of the indicator
#property indicator_color2  Lime
//---- thickness of line of the indicator 2 is equal to 4
#property indicator_width2  4
//---- displaying of the bullish label of the indicator
#property indicator_label2 "Brain1Buy"

//+----------------------------------------------+
//| Input parameters of the indicator            |
//+----------------------------------------------+
input int ATR_Period=7; //Period of ATR
input int STO_Period=9; //Period of Stochastic
input ENUM_MA_METHOD MA_Method = MODE_SMA; //Method of averaging
input ENUM_STO_PRICE STO_Price = STO_LOWHIGH; //Method of prices calculation
//+----------------------------------------------+

//---- declaration of dynamic arrays that further
// will be used as indicator buffers
double SellBuffer[];
double BuyBuffer[];
//----
double d,s;
int p,x1,x2,P_,StartBars,OldTrend;
int ATR_Handle,STO_Handle;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
void OnInit()
  {
//--- initialization of global variables
   d=2.3;
   s=1.5;
   x1 = 53;
   x2 = 47;
   StartBars=MathMax(ATR_Period,STO_Period)+2;
//---- getting handle of the ATR indicator
   ATR_Handle=iATR(NULL,0,ATR_Period);
   if(ATR_Handle==INVALID_HANDLE)Print(" Failed to get handle of the ATR indicator");
//---- getting handle of the Stochastic indicator
   STO_Handle=iStochastic(NULL,0,STO_Period,STO_Period,1,MA_Method,STO_Price);
   if(STO_Handle==INVALID_HANDLE)Print(" Failed to get handle of the Stochastic indicator");

//---- turning a dynamic array into an indicator buffer
   SetIndexBuffer(0,SellBuffer,INDICATOR_DATA);
//---- shifting the start of drawing of the indicator 1
   PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,StartBars);
//---- Create label to display in DataWindow
   PlotIndexSetString(0,PLOT_LABEL,"Brain1Sell");
//---- indicator symbol
   PlotIndexSetInteger(0,PLOT_ARROW,108);
//---- indexing elements in the buffer as in timeseries
   ArraySetAsSeries(SellBuffer,true);

//---- turning a dynamic array into an indicator buffer
   SetIndexBuffer(1,BuyBuffer,INDICATOR_DATA);
//---- shifting the start of drawing of the indicator 2
   PlotIndexSetInteger(1,PLOT_DRAW_BEGIN,StartBars);
//---- Create label to display in DataWindow
   PlotIndexSetString(1,PLOT_LABEL,"Brain1Buy");
//---- indicator symbol
   PlotIndexSetInteger(1,PLOT_ARROW,108);
//---- indexing elements in the buffer as in timeseries
   ArraySetAsSeries(BuyBuffer,true);

//---- Setting the format of accuracy of displaying the indicator
   IndicatorSetInteger(INDICATOR_DIGITS,_Digits);
//---- name for the data window and for the label of sub-windows
   string short_name="BrainTrend1Sig";
   IndicatorSetString(INDICATOR_SHORTNAME,short_name);
//----  
  }
//+------------------------------------------------------------------+
//| 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[])
  {
//---- checking the number of bars to be enough for the calculation
   if(BarsCalculated(ATR_Handle)<rates_total
      || BarsCalculated(STO_Handle)<rates_total
      || rates_total<StartBars)
      return(0);

//---- declaration of local variables
   int to_copy,limit,bar;
   double value2[],Range[],range,range2,val1,val2,val3;

//---- calculations of the necessary amount of data to be copied and
//the limit starting number for loop of bars recalculation
   if(prev_calculated>rates_total || prev_calculated<=0)// checking for the first start of calculation of an indicator
     {
      to_copy=rates_total; // calculated number of all bars
      limit=rates_total-StartBars; // starting number for calculation of all bars
     }
   else
     {
      to_copy=rates_total-prev_calculated+1; // calculated number of new bars
      limit=rates_total-prev_calculated; // starting number for calculation of new bars
     }

//---- copy the newly appeared data into the Range[] and value2[] arrays
   if(CopyBuffer(ATR_Handle,0,0,to_copy,Range)<=0) return(0);
   if(CopyBuffer(STO_Handle,0,0,to_copy,value2)<=0) return(0);

//---- indexing elements in arrays, as in timeseries  
   ArraySetAsSeries(Range,true);
   ArraySetAsSeries(value2,true);
   ArraySetAsSeries(open,true);
   ArraySetAsSeries(high,true);
   ArraySetAsSeries(low,true);
   ArraySetAsSeries(close,true);

//---- restore values of the variables
   p=P_;

//---- main cycle of calculation of the indicator
   for(bar=limit; bar>=0; bar--)
     {
      //---- memorize values of the variables before running at the current bar
      if(rates_total!=prev_calculated && bar==0)
         P_=p;

      range=Range[bar]/d;
      range2=Range[bar]*s/4;
      val1 = 0.0;
      val2 = 0.0;
      SellBuffer[bar]=0.0;
      BuyBuffer[bar]=0.0;

      val3=MathAbs(close[bar]-close[bar+2]);
      if(value2[bar] < x2 && val3 > range) p = 1;
      if(value2[bar] > x1 && val3 > range) p = 2;

      if(val3<=range) continue;

      if(value2[bar]<x2 && (p==1 || p==0))
        {
         if(OldTrend>0) SellBuffer[bar]=high[bar]+range2;
         if(bar!=0)OldTrend=-1;
        }
      if(value2[bar]>x1 && (p==2 || p==0))
        {
         if(OldTrend<0) BuyBuffer[bar]=low[bar]-range2;
         if(bar!=0)OldTrend=+1;
        }
     }
//----    
   return(rates_total);
  }
//+------------------------------------------------------------------+


Dateien:

Bewerbungen

1
Entwickler 1
Bewertung
(21)
Projekte
20
10%
Schlichtung
2
50% / 50%
Frist nicht eingehalten
0
Frei
2
Entwickler 2
Bewertung
(97)
Projekte
120
39%
Schlichtung
9
89% / 0%
Frist nicht eingehalten
0
Frei
3
Entwickler 3
Bewertung
(164)
Projekte
234
22%
Schlichtung
17
65% / 18%
Frist nicht eingehalten
1
0%
Überlastet
4
Entwickler 4
Bewertung
(206)
Projekte
336
16%
Schlichtung
23
39% / 30%
Frist nicht eingehalten
18
5%
Überlastet
5
Entwickler 5
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Arbeitet
6
Entwickler 6
Bewertung
(25)
Projekte
33
15%
Schlichtung
6
33% / 50%
Frist nicht eingehalten
5
15%
Arbeitet
7
Entwickler 7
Bewertung
(354)
Projekte
416
34%
Schlichtung
2
100% / 0%
Frist nicht eingehalten
0
Frei
8
Entwickler 8
Bewertung
(89)
Projekte
112
24%
Schlichtung
11
45% / 18%
Frist nicht eingehalten
8
7%
Frei
9
Entwickler 9
Bewertung
(2440)
Projekte
3075
66%
Schlichtung
77
48% / 14%
Frist nicht eingehalten
340
11%
Frei
10
Entwickler 10
Bewertung
(20)
Projekte
26
46%
Schlichtung
0
Frist nicht eingehalten
0
Arbeitet
11
Entwickler 11
Bewertung
(402)
Projekte
707
49%
Schlichtung
57
16% / 49%
Frist nicht eingehalten
130
18%
Frei
12
Entwickler 12
Bewertung
(309)
Projekte
394
21%
Schlichtung
44
59% / 23%
Frist nicht eingehalten
48
12%
Beschäftigt
13
Entwickler 13
Bewertung
(356)
Projekte
562
33%
Schlichtung
24
67% / 8%
Frist nicht eingehalten
17
3%
Frei
14
Entwickler 14
Bewertung
(18)
Projekte
24
38%
Schlichtung
0
Frist nicht eingehalten
2
8%
Arbeitet
15
Entwickler 15
Bewertung
(158)
Projekte
175
43%
Schlichtung
6
0% / 67%
Frist nicht eingehalten
8
5%
Frei
16
Entwickler 16
Bewertung
(6)
Projekte
10
0%
Schlichtung
0
Frist nicht eingehalten
2
20%
Arbeitet
17
Entwickler 17
Bewertung
(1134)
Projekte
1436
62%
Schlichtung
21
57% / 10%
Frist nicht eingehalten
43
3%
Frei
18
Entwickler 18
Bewertung
(62)
Projekte
192
73%
Schlichtung
4
100% / 0%
Frist nicht eingehalten
1
1%
Frei
19
Entwickler 19
Bewertung
(186)
Projekte
189
76%
Schlichtung
2
100% / 0%
Frist nicht eingehalten
0
Frei
20
Entwickler 20
Bewertung
(478)
Projekte
541
33%
Schlichtung
27
41% / 44%
Frist nicht eingehalten
8
1%
Überlastet
21
Entwickler 21
Bewertung
(11)
Projekte
11
27%
Schlichtung
0
Frist nicht eingehalten
0
Frei
22
Entwickler 22
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
23
Entwickler 23
Bewertung
(379)
Projekte
407
70%
Schlichtung
3
100% / 0%
Frist nicht eingehalten
2
0%
Beschäftigt
Ähnliche Aufträge
Hello, I am highly in need of a professional and expert developer who is capable to convert my tradingview indicator to MT5, if you can perfectly do this project kindly meet me at the comment section to proceed
I am seeking an experienced and skilled developer to code an Expert Advisor (EA) for the MetaTrader platform based on a specific trading strategy. The developer must have expertise in building EAs, understanding complex trading strategies, and ensuring the final product is efficient and reliable. If you have the expertise and experience to successfully handle this project, looking forward to your proposal and your
The requirements for the order of robots XAUUSD and XAGUSD EURUSD forex in the STOP loss TAKE profit signal in this order, you can bring benefits to the changes in the market, that is, when the market changes frequently, it will also help to prevent losses and bring great profits
Craet and indicator which has 15 price source and set a T/F tick for each price source then make Bollinger bands and Rsi with BollingerBands just for true sorces and plot buy and sell signals on main chart based on some conditions and strategy.... i explained every thing clear in the zip file ... theres no need to display those indicators i just need to see their value for testing how indicator works inside chart
I'm seeking a C# developer with Quantower experience to assist me in exporting data from the Option Analytic panel in real-time via an API. This data will be exported based on a window app, not a web app. You can review the document at the following link : . https://github.com/Quantower/Examples/blob/master/IndicatorExamples/GetOptionsInfo.cs Please check it before bidding NOTE : - Quantower is an app, not web
Hi Would you be able to decompile and/or create a scalper EA with the option I do ask. I had somebody built a EA called Drawdown manager for me that I do use to manage risk of any EA that I test and I have the built code. My problem is that I cannot backtest this EA Fast M1 Gold Scalper and/or cobra adrenaline with the protection that I do include in my Drawdown Manager. To backtest a EA, you can only backtest 1 at
I have an indicator that give signals. I would like an EA to automate the strategy. the Indicator gives an arrow in the direction the trade needs to open. Attached is a picture of the indicator. I have also attached the Indicator as well as a word document of what I would like be able to select on the EA
My idea _Anna. 50+ USD
I'm looking for a strategy where I can specify two points, such as Point A and Point B, which could be based on today's high/low or yesterday’s high/low, etc. I should have the option to define these points. The system should execute a buy order when the price goes above Point A, with the ability to set a target in percentage or points, as well as a stop-loss. Similarly, when the price drops below Point B, it should
THE IDEA OF THE INDICATOR Create A Standard ZigZag Auto Fibo Indicator Combined With A ZigZag Fibonacci Time Zone Indicator Which Has The Specified Levels Written In The Indicator Strategy TEXT FILE/DOCUMENT HOW DOES THE INDICATOR KNOW AN UPTREND MOVEMENT? If Price Hasn't Touched The 123.6% Level Of The Recent Static Uptrend Zig Zag Fibo Retracement Tool Then The Indicator Knows That The Market Is In An Uptrend And
no order will be given until you prove that you are capable to code , so at least make a basic demo first to take the final order from me. and i can not afford to pay more than 30 usd. so its final offer EA should work with any pair like jpy , oil and Gold pairs along with EURUSD , GBPUSD etc and GBPJPY and too Lot size … its fixed for all. So which ever size client set . it will set for all the trades Gap between

Projektdetails

Budget
45+ USD
MwSt (22%): 9.9 USD
Insgesamt: 55 USD
Für die Entwickler
40.5 USD

Kunde

Veröffentlichte Aufträge1
Anzahl der Schlichtungen0