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

MQL4 Indicators Experts

Job finished

Execution time 2 hours
Feedback from customer
Hit a few hitches along the way however the developer was able to provide a good solution. Will use his services again thanks...
Feedback from employee
A kind, easy and nice person.. 100% recommended

Specification

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


Responded

1
Developer 1
Rating
(153)
Projects
224
58%
Arbitration
3
100% / 0%
Overdue
45
20%
Loaded
2
Developer 2
Rating
(167)
Projects
192
11%
Arbitration
37
38% / 35%
Overdue
5
3%
Loaded
3
Developer 3
Rating
(14)
Projects
23
17%
Arbitration
3
0% / 100%
Overdue
5
22%
Free
4
Developer 4
Rating
(26)
Projects
41
24%
Arbitration
3
33% / 67%
Overdue
12
29%
Free
5
Developer 5
Rating
(356)
Projects
632
26%
Arbitration
89
73% / 13%
Overdue
12
2%
Free
6
Developer 6
Rating
(586)
Projects
1047
49%
Arbitration
39
28% / 41%
Overdue
49
5%
Free
7
Developer 7
Rating
(277)
Projects
334
55%
Arbitration
14
36% / 29%
Overdue
1
0%
Free
Similar orders
"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
Seeking an experienced MQL5 developer to create a sophisticated Expert Advisor focused on harmonic pattern trading . The EA will be designed to identify and trade based on popular harmonic patterns in the forex market. Entry and Exit Logic: Develop smart entry and exit rules based on pattern completions and price action confirmations. Risk Management: Incorporate adjustable risk-per-trade settings and position sizing
preciso de um robô com duas médias móveis, uma exponencial high e uma exponencial low. preciso também ter a opção de utilizar e todos os tempos gráficos e alterar os parâmetros das médias. entrada de compra será feita quando um candle de alta romper e fechar a cima da média high e fechará a posição quando um candle de baixa romper e fechar a baixo da média low. a venda será feita quando o candle de baixa romper e
Description - An expert advisor(s), placing sell trades in EUR/USD, based on the close price of the previous two candles, as shown in the figure below. The trades would be made in the 5 minute, 1 hour, and 1 day timeframes. In the 5 minute and 1 hour timeframes the market orders would be placed at the start of a new candle, at specific times EST. The order would be cancelled at the close of that candle, i.e after 5
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link

Project information

Budget
30+ USD
For the developer
27 USD
Deadline
from 1 to 2 day(s)