Ea creation from indicator

Trabalho concluído

Tempo de execução 2 minutos
Comentário do desenvolvedor
Всё прошло успешно! Я рад сотрудничеству!!!
Comentário do cliente
great help this guy knows very well coding i advise

Termos de Referência

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


Arquivos anexados:

Respondido

1
Desenvolvedor 1
Classificação
(22)
Projetos
21
10%
Arbitragem
4
25% / 75%
Expirado
0
Livre
2
Desenvolvedor 2
Classificação
(154)
Projetos
193
58%
Arbitragem
10
80% / 0%
Expirado
0
Livre
Publicou: 1 código
3
Desenvolvedor 3
Classificação
(272)
Projetos
401
27%
Arbitragem
39
41% / 49%
Expirado
1
0%
Livre
4
Desenvolvedor 4
Classificação
(325)
Projetos
506
19%
Arbitragem
33
42% / 30%
Expirado
34
7%
Carregado
5
Desenvolvedor 5
Classificação
(1)
Projetos
2
0%
Arbitragem
0
Expirado
0
Livre
6
Desenvolvedor 6
Classificação
(60)
Projetos
87
29%
Arbitragem
24
13% / 58%
Expirado
7
8%
Trabalhando
7
Desenvolvedor 7
Classificação
(579)
Projetos
653
41%
Arbitragem
2
100% / 0%
Expirado
1
0%
Livre
Publicou: 9 códigos
8
Desenvolvedor 8
Classificação
(93)
Projetos
115
23%
Arbitragem
21
29% / 52%
Expirado
8
7%
Livre
9
Desenvolvedor 9
Classificação
(2642)
Projetos
3357
68%
Arbitragem
77
48% / 14%
Expirado
342
10%
Livre
Publicou: 1 código
10
Desenvolvedor 10
Classificação
(47)
Projetos
67
37%
Arbitragem
5
40% / 40%
Expirado
1
1%
Livre
11
Desenvolvedor 11
Classificação
(456)
Projetos
794
49%
Arbitragem
71
17% / 54%
Expirado
139
18%
Trabalhando
12
Desenvolvedor 12
Classificação
(375)
Projetos
481
23%
Arbitragem
59
54% / 25%
Expirado
55
11%
Carregado
13
Desenvolvedor 13
Classificação
(442)
Projetos
698
34%
Arbitragem
33
70% / 9%
Expirado
22
3%
Livre
14
Desenvolvedor 14
Classificação
(31)
Projetos
41
41%
Arbitragem
2
100% / 0%
Expirado
4
10%
Livre
15
Desenvolvedor 15
Classificação
(171)
Projetos
195
42%
Arbitragem
13
8% / 54%
Expirado
9
5%
Livre
Publicou: 3 códigos
16
Desenvolvedor 16
Classificação
(6)
Projetos
10
0%
Arbitragem
0
Expirado
2
20%
Trabalhando
17
Desenvolvedor 17
Classificação
(1156)
Projetos
1462
63%
Arbitragem
21
57% / 10%
Expirado
43
3%
Livre
18
Desenvolvedor 18
Classificação
(77)
Projetos
243
74%
Arbitragem
7
100% / 0%
Expirado
1
0%
Livre
Publicou: 1 artigo
19
Desenvolvedor 19
Classificação
(304)
Projetos
310
69%
Arbitragem
2
100% / 0%
Expirado
0
Livre
Publicou: 1 código
20
Desenvolvedor 20
Classificação
(549)
Projetos
635
33%
Arbitragem
41
39% / 46%
Expirado
11
2%
Carregado
21
Desenvolvedor 21
Classificação
(102)
Projetos
105
60%
Arbitragem
0
Expirado
0
Livre
22
Desenvolvedor 22
Classificação
Projetos
0
0%
Arbitragem
0
Expirado
0
Livre
23
Desenvolvedor 23
Classificação
(450)
Projetos
477
69%
Arbitragem
6
67% / 0%
Expirado
2
0%
Livre
24
Desenvolvedor 24
Classificação
Projetos
0
0%
Arbitragem
1
0% / 0%
Expirado
0
Trabalhando
25
Desenvolvedor 25
Classificação
(39)
Projetos
54
61%
Arbitragem
2
50% / 50%
Expirado
0
Livre
26
Desenvolvedor 26
Classificação
(3)
Projetos
2
50%
Arbitragem
2
0% / 100%
Expirado
0
Livre
Pedidos semelhantes
Adapt existing MT5 EA to trade directly on crypto exchange (BingX/Bitmart/Bitget/XT.com) instead of forex broker. Required Work: 1. Market Data DLL WebSocket connection for real-time exchange prices Custom symbol in MT5 (e.g., FIGHTUSDT) Live OHLCV data feed to chart 2. Trading Library DLL Functions: SendOrder, GetPositions, GetBalance, ClosePosition, ModifyOrder API authentication (HMAC-SHA256) Support for
2 FX pairs M15 execution with higher timeframe bias Session-based trading (UK time) Fixed % risk per trade Controlled pyramiding (add to winners only) Strict daily loss limits (FTMO-style) Proper order handling (SL always set) Basic logging (CSV) Strategy logic will be provided in detail after NDA / agreement. Must deliver: Source code (.mq5) Compiled file (.ex5) Clean, well-commented code Short support window for
Hi, are you able to create a script/indicator on tradingview that displays a chart screener and it allows me to input multiple tickers on the rows. then the colums with be like "premarket high, premarket low, previous day high, previous day low" . When each or both of the levels break, there will pop up a circle on the chart screener, signaling to me what names are above both PM high and previous day high or maybe
I need an Expert Advisor for MetaTrader 5 (MQL5) to trade XAUUSD based on a simple price movement cycle. Strategy logic: • The EA opens a Buy and a Sell at the same time (one pair per cycle). • Only ONE Sell position must exist at any time. • Every Buy must be opened together with a Sell. Cycle rules: • Step movement = 10 USD in gold price. • CycleEntryPrice = the OPEN PRICE of the last cycle BUY order. • If price
I am looking for a professional MQL5 developer to build a MetaTrader 5 Expert Advisor from scratch. The EA will be called LadyKiller EA. It must trade only the following instruments: • XAUUSD (Gold) • US30 / Dow Jones Index Requirements: • Strong and reliable buy and sell entry logic • Stop Loss and Take Profit system • Risk management (lot size control) • Maximum trades protection • Drawdown protection • Trend
I need an mql5 EA which can be used with 100$ capital very low drawdown The EA should be high frequency trading special for XAUUSD and btcusd or binary options but also the EA should be testable via strategy tester and demo test for five days is needed NO SELECTION CAN BE DONE WITHOUT TESTING when applying make sure you send the backtester results with demo EA testable via strategy tester
Hello, I'm looking to find out the cost of creating a mobile trading robot. I've tried to describe it as thoroughly as possible in the following document. I look forward to your response. I'd like to know the costs, delivery time, and how you plan to implement it before making a decision
I have an existing MT5 Expert Advisor (“E-Core”). I need an experienced MQL5 developer to integrate a structured risk management upgrade and a higher timeframe trend filter into the current code. Two files will be provided: 1️⃣ E-Core Source Code (Current Version) 2️⃣ Update Instructions File (contains exact inputs, functions, and logic to integrate) The developer must: Integrate the update logic
DO NOT RESPOND TO WORK WITH ANY AI. ( I CAN ALSO DO THAT ) NEED REAL DEVELOPING SKILL Hedge Add-On Rules for Existing EA Core Idea SL becomes hypothetical (virtual) for the initial basket and for the hedge basket . When price hits the virtual SL level , EA does not close the losing trades. Instead, EA opens one hedge basket in the opposite direction. Original basket direction Hedge basket direction (opposite) Inputs
Billionflow 30 - 100 USD
Trading specifications: Indicators: Bollinger band ( Period 40, Deviation 1 apply to close) Moving Average (Exponential ) Period 17 applied to high Moving Average ( Exponential ) Period 17 applied to low But Signal enter a buy trade when prices crosses the lower band of the bollinger band up and also crosses the moving average channel of high and low the reverse is true for sell signal

Informações sobre o projeto

Orçamento
45+ USD