Take trigger code from an existing indicator and place inside trigger functionality of an existing EA.

MQL4 Indicadores Experts

Trabalho concluído

Tempo de execução 2 horas
Comentário do cliente
Hit a few hitches along the way however the developer was able to provide a good solution. Will use his services again thanks...
Comentário do desenvolvedor
A kind, easy and nice person.. 100% recommended

Termos de Referência

Hi,

I need someone to add code from an indicator and place it inside my EA.

The indicator code contains draw & delete trend line functions and secondary filter functions to produce buy and sell signals.

The freelancer will need to adjust the EA in the same format, due to my understanding of coding.

Basically take this code format from the indicator:

int counted_bars=IndicatorCounted();
   int limit=Bars-counted_bars;
   if(bars<Bars)
     {
      DeleteLines();
      for(int i=1; i<MaxBars-1; i++)
        {
         double Sar=iSAR(NULL,0,0.02,0.2,i);
         double SarBack=iSAR(NULL,0,0.02,0.2,i+1);
         //---
         double Price=(High[i]+Low[i])/2;
         double PriceBack=(High[i+1]+Low[i+1])/2;

         bool flag=true;
         //---Paramters for drawing green buy down line
         if(High[i+1]>High[i])
            if(SarBack<PriceBack && Sar>Price)
              {
               line_name_green[line_green]="Line_"+(string)i;
               flag=DrawLine("Line_"+(string)i,Time[i+1],High[i+1],Time[i],High[i],clrGreen);
               line_green++;
              }
        }
      for(int u=1; u<line_green; u++)
        {
         double line_price;
         for(int i=1; i<MaxBars-1; i++)
            //---Parameters for buy signal
           {
            line_price=ObjectGetValueByShift(line_name_green[u],i);
            double PriceMedian=(High[i]+Low[i])/2;
            double PriceMedianBack=(High[i+1]+Low[i+1])/2;
            double Ema5=iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,i);
            double Ema10=iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,i);
            //---
            if(Ema5>Ema10)
               if(PriceMedianBack<line_price && PriceMedian>line_price)
                  UpArrow[i]=Open[i];
           }
        }
      //Loops for green lines and UpArrow end here.

      //---   Down Arrow
      for(int i=1; i<MaxBars-1; i++)
        {
         bool flag=true;
         double Sar=iSAR(NULL,0,0.02,0.2,i);
         double SarBack=iSAR(NULL,0,0.02,0.2,i+1);
         //---
         double Price=(High[i]+Low[i])/2;
         double PriceBack=(High[i+1]+Low[i+1])/2;

         //---Paramters for drawing red up line

         if(Low[i+1]<Low[i])
            if(SarBack>PriceBack && Sar<Price)
               //---
              {
               line_name_red[line_red]="Line_"+(string)i; //Save name of red line
               flag=DrawLine("Line_"+(string)i,Time[i+1],Low[i+1],Time[i],Low[i],clrRed);
               line_red++;              //Icrement number of red lines
              }
        }
      //-----
      for(int n=1; n<line_red; n++)
        {
         double line_priceA;
         for(int i=1; i<MaxBars-1; i++)
            //---Parameters for buy signal
           {
            line_priceA=ObjectGetValueByShift(line_name_red[n],i);
            //---
            double PriceMedian=(High[i]+Low[i])/2;
            double PriceMedianBack=(High[i+1]+Low[i+1])/2;
            double Ema5=iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,i);
            double Ema10=iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,i);
            //---
            if(Ema5<Ema10)
               if(PriceMedianBack>line_priceA && PriceMedian<line_priceA)
                  //---
                  DownArrow[i]=Open[i];
           }
        }
     }

   bars=Bars;

and place it in this section of the EA:

//+------------------------------------------------------------------+
//|       TRIGGER FUNCTION                                           |
//+------------------------------------------------------------------+
void CheckForSignal()
  {
   static datetime candletime=0;
   if(candletime!=Time[0])
     {
      //---Insert Trendline V1 buy code here
      
      double Ema200=iMA(NULL,0,200,0,MODE_SMMA,PRICE_MEDIAN,1);
      double Price=(High[1]+Low[1])/2;

      //Did it make an up arrow on candle 1?
      if(Price>Ema200)

        {
         if(CloseOnOppositeSignal)
            exitsells();
         if(TotalOpenOrders()<MaxAmountOfTrades)
            if((HedgingAllowed) || (!HedgingAllowed && OpenOrders(OP_SELL)==0))
               EnterTrade(OP_BUY);
            else
               Print("Hedging did not allow this trade.");
        }
      //---Insert Trendline V1 sell code here
      
      //Did it make a down arrow on candle 1?
      if(Price<Ema200)

        {
         if(CloseOnOppositeSignal)
            exitbuys();
         if(TotalOpenOrders()<MaxAmountOfTrades)
            if((HedgingAllowed) || (!HedgingAllowed && OpenOrders(OP_BUY)==0))
               EnterTrade(OP_SELL);
            else
               Print("Hedging did not allow this trade.");
        }
      candletime=Time[0];
     }
  }

I will be happy to pass the EA and indicator on confirmed work agreement. Also it would be great if we could talk the job through on skype as I am learning to improve my coding.

I of course will only sign the job off on my testing the functionality on both tester and live trades. I have said 2 days to do the job but it may take another day for me to test fully. 

Regards Mike


Respondido

1
Desenvolvedor 1
Classificação
(153)
Projetos
224
58%
Arbitragem
3
100% / 0%
Expirado
45
20%
Carregado
2
Desenvolvedor 2
Classificação
(167)
Projetos
192
11%
Arbitragem
37
38% / 35%
Expirado
5
3%
Carregado
3
Desenvolvedor 3
Classificação
(14)
Projetos
23
17%
Arbitragem
3
0% / 100%
Expirado
5
22%
Livre
4
Desenvolvedor 4
Classificação
(26)
Projetos
41
24%
Arbitragem
3
33% / 67%
Expirado
12
29%
Livre
5
Desenvolvedor 5
Classificação
(356)
Projetos
632
26%
Arbitragem
89
73% / 13%
Expirado
12
2%
Livre
6
Desenvolvedor 6
Classificação
(586)
Projetos
1047
49%
Arbitragem
39
28% / 41%
Expirado
49
5%
Livre
7
Desenvolvedor 7
Classificação
(277)
Projetos
334
55%
Arbitragem
14
36% / 29%
Expirado
1
0%
Livre
Pedidos semelhantes
NEW FUNCTION 50+ USD
La idea es la siguiente, sería un EA semi automático. Yo como trader opero en zonas. En adelante las vamos a denominar ``zonas calientes´´. El EA debe que necesito debe operar conforme a 4 zonas calientes que yo configure en el mismo. ¿Qué hará el EA en cada una de esas zonas calientes que yo he configurado? En cada una de estas zonas el EA debe realizar hedging (crear un rango en el cual el EA entrara en sell o en
I have the bot just over half made, from another developer who let me down and decided they no longer wished to finish the project, so I have a basic example of the fundamentals of what it could look like, although multiple functions I require do not work, but I can show this to you on request. There are multiple features that I require, so please read the in depth requirement sheet on the attachment. Function: To
I need EA that works on MT5 to be able to do the following: - Can recognize Support/Resistance area - Can recognize VWAP direction. - Can recognize RSI. - Can recognize Double Top/bottom, Bullish/Bearish hammer candle, Bullish/bearish engulfing candle. - Ability to set Stoploss below/above support/resistance, but risk must be fixed at a certain price. - Stoploss
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5
"I need an expert advisor (EA) based on stochastic divergence and candlestick formation. It should be able to identify both hidden and regular divergences. The EA should also include modified risk-reward ratios, modified timeframes, and a trailing stop loss. It is important that the EA is 100% accurate. Once an experienced developer applies, I will share the complete strategy."
I am seeking a highly skilled and experienced developer to assist with an important project. I need a development of an automated trading bot for NinjaTrader, utilizing a 4 SMA (Simple Moving Average) crossing strategy, with additional custom diversions for trade entries. The bot needs to be based on a strategy involving the crossing of four different SMAs. The exact periods for these SMAs and the conditions for
I need someone that can make expert advisor for backtesting purpose. The input file is History trade report export file from MQl5 the expert advisor should open position the exact time of open trade on the report. The same as the close time
So i have copier EA. The idea is the EA will triggered through manual OP by user via mobile or whatever platform. Let's say 0.01 lot to trigger it. After the EA takes master's position, the EA will be standby mode. If the master take more OP, the EA still not take the master's position (OP) until the user input manually once again via mobile for another 0.01 lot. Since this is a MT4 EA, Whenever user want to close
Hello, send robot models with a solid strategy (to trade forex), I want to use it to make money for the week. It is important that you present me with your profitability graph and a test. I also want to hire him for future jobs
I am looking to develop an automated trading bot based on a strategy involving the crossing of four Simple Moving Averages (SMA). The bot should be capable of entering trades based on this strategy. Additionally, I would like to incorporate some custom diversions tailored for NinjaTrader

Informações sobre o projeto

Orçamento
30+ USD
Desenvolvedor
27 USD
Prazo
de 1 para 2 dias