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

MQL4 지표 전문가

작업 종료됨

실행 시간 2 시간
고객의 피드백
Hit a few hitches along the way however the developer was able to provide a good solution. Will use his services again thanks...
피고용인의 피드백
A kind, easy and nice person.. 100% recommended

명시

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


응답함

1
개발자 1
등급
(153)
프로젝트
224
58%
중재
3
100% / 0%
기한 초과
45
20%
로드됨
2
개발자 2
등급
(167)
프로젝트
192
11%
중재
37
38% / 35%
기한 초과
5
3%
로드됨
3
개발자 3
등급
(14)
프로젝트
23
17%
중재
3
0% / 100%
기한 초과
5
22%
무료
4
개발자 4
등급
(26)
프로젝트
41
24%
중재
3
33% / 67%
기한 초과
12
29%
무료
5
개발자 5
등급
(356)
프로젝트
632
26%
중재
89
73% / 13%
기한 초과
12
2%
무료
6
개발자 6
등급
(586)
프로젝트
1047
49%
중재
39
28% / 41%
기한 초과
49
5%
무료
7
개발자 7
등급
(277)
프로젝트
334
55%
중재
14
36% / 29%
기한 초과
1
0%
무료
비슷한 주문
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

프로젝트 정보

예산
30+ USD
개발자에게
27 USD
기한
에서 1  2 일