EA that trails my position

MQL4 Experten

Auftrag beendet

Ausführungszeit 1 Stunde
Bewertung des Kunden
thx for all - very good job

Spezifikation

Hello,


you write an EA the trails the open position. For trailing stop you use "ATRStops" indicator in attachment.

1) If I set the EA to the chart the EA loads and show the indicator on chart
2) The ea checks if there is an open position
3) if there is an open buy position and the close is higher than the line, then you use line for trail (also for sell trades of curse)
4) You create an input that I can say that the position will be closed if the close is under the line,
or we modify the stoploss on broker. Position will be stop out directly on line



//+------------------------------------------------------------------+
//|                                                  ATRStops_v1.mq4 |
//|                                  Copyright © 2006, Forex-TSD.com |
//|                         Written by IgorAD,igorad2003@yahoo.co.uk |  
//|            http://finance.groups.yahoo.com/group/TrendLaboratory |                                      
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Forex-TSD.com "
#property link      "http://www.forex-tsd.com/"
//----
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- input parameters
extern int    Length=8;
extern int    ATRperiod=14;
extern double Kv=3;
//---- indicator buffers
double UpBuffer1[];
double DnBuffer1[];
double smin[];
double smax[];
double trend[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
  int init()
  {
   string short_name;
//---- indicator line
   SetIndexStyle(0,DRAW_LINE);
   SetIndexStyle(1,DRAW_LINE);
   IndicatorBuffers(5);
   SetIndexBuffer(0,UpBuffer1);
   SetIndexBuffer(1,DnBuffer1);
   SetIndexBuffer(2,smin);
   SetIndexBuffer(3,smax);
   SetIndexBuffer(4,trend);
//---- name for DataWindow and indicator subwindow label
   short_name="ATRStops("+Length+")";
   IndicatorShortName(short_name);
   SetIndexLabel(0,"Up");
   SetIndexLabel(1,"Dn");
//----
   SetIndexDrawBegin(0,Length);
   SetIndexDrawBegin(1,Length);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| ATRStops_v1                                                      |
//+------------------------------------------------------------------+
int start()
  {
   int shift,limit, counted_bars=IndicatorCounted();
//----
   if(counted_bars > 0) limit=Bars-counted_bars;
   if(counted_bars < 0) return(0);
   if(counted_bars ==0) limit=Bars-Length-1;
//----
   for(shift=limit;shift>=0;shift--)
     {
      smin[shift]=-100000; smax[shift]=100000;
      for(int i=Length-1;i>=0;i--)
        {
         smin[shift]=MathMax( smin[shift], High[shift+i] - Kv*iATR(NULL,0,ATRperiod,shift+i));
         smax[shift]=MathMin( smax[shift], Low[shift+i] + Kv*iATR(NULL,0,ATRperiod,shift+i));
        }
      trend[shift]=trend[shift+1];
      if(Close[shift] > smax[shift+1])trend[shift]= 1;
      if(Close[shift] < smin[shift+1])trend[shift]=-1;
      if(trend[shift] >0)
        {
         if(smin[shift]<smin[shift+1])smin[shift]=smin[shift+1];
         UpBuffer1[shift]=smin[shift];
         DnBuffer1[shift]=EMPTY_VALUE;
        }
      if(trend[shift] <0)
        {
         if(smax[shift]>smax[shift+1])smax[shift]=smax[shift+1];
         UpBuffer1[shift]=EMPTY_VALUE;
         DnBuffer1[shift]=smax[shift];
        }
     }
   return(0);
  }
//+------------------------------------------------------------------+


Bewerbungen

1
Entwickler 1
Bewertung
(586)
Projekte
918
46%
Schlichtung
31
39% / 29%
Frist nicht eingehalten
93
10%
Frei
2
Entwickler 2
Bewertung
(88)
Projekte
143
39%
Schlichtung
21
19% / 48%
Frist nicht eingehalten
30
21%
Frei
Ähnliche Aufträge
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
Develop a simple trading robot from rainbow oscillator Additional features Include timeframe specification in rainbow oscillator trailing features moving average filter TP (true/false) SL (true/false) Fixed lot Risk percentage Percentage profit lock
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
I need a dashboard that shows my various accounts that shows balance, equity, number of trades open, drawdown and some more information. I want to use it to monitor my accounts in one screen or chart. If there is anyone who can do it please show me the screenshot of your sample
Hi, I need a robot, which wil get instructions to trade in 3 symbols at the same time based on few parameters and calculations. Example: There is 1 symbol called Gold-Near and the rate for it is 1000-1002 If i specify that when the rate reaches 1050, it should sell 1 lot Upon execution it will have to sell 1 lot of cme gold, buy 3 lots of mcx gold and buy currently (lots will be based on calculation). All the
Trading bot 300+ USD
We need bot that trades when medium and low impact news hits It will release pending order both directions few min prior to news impact And will have certain risk management strategy attached Example If Monday and Tuesday news successful clears profits It will reduce risk for next news events until new week starts each week message on tg: Dstatewealthtrading NOTE: 4 YAERS OF EXPERIENCE UPWORD, YOU MUST BE A
Estou a procura de um programador que faça um robo que automatize as análises feitas por ele nas ondas de Elliot e que faça entradas precisas com proteções das mesmas e com proteções também ajustáveis para não entrar em noticias de 2 ou 3 estrelas, e que seja para o mercado B3 Mini Indice ou Mini Dolar

Projektdetails

Budget
30+ USD
MwSt (19%): 5.7 USD
Insgesamt: 35.7 USD
Für die Entwickler
27 USD
Ausführungsfristen
bis 1 Tag(e)