Trend line code fixed and fucnting right

Tarea técnica


void 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[]) (

  int begin = trendlinePeriod + 1;
  int end = rates_total - 1;
  
  for (int i = begin; i <= end; i++) {
    if (Close[i - 1] <= Close[i - trendlinePeriod]) {
      if (IsPriceOnTrendline(i - 1, 0.0) && IsPriceOnTrendline(i, -1.0) && Close[i] < prevClose - minPriceDiff) {
        trendline[i] = (Close[i - trendlinePeriod] - Close[i]) / trendlinePeriod;
        trendline_start_bar = i - trendlinePeriod;
        ColorSetIndex(trendline_start_bar + 4, downtrendColor);
      } else {
        trendline[i] = 0.0;
      }
    } else if (Close[i - 1] >= Close[i - trendlinePeriod]) {
      if (IsPriceOnTrendline(i - 1, 0.0) && IsPriceOnTrendline(i, 1.0) && Close[i] > prevClose + minPriceDiff) {
        trendline[i] = (Close[i] - Close[i - trendlinePeriod]) / trendlinePeriod;
        trendline_start_bar = i - trendlinePeriod;
        ColorSetIndex(trendline_start_bar + 4, uptrendColor);
      } else {
        trendline[i] = 0.0;
      }
    } else {
      trendline[i] = 0.0;
    }

    if (trendline[i] != 0.0) 
      int count = 1;
      for (int j = i + 1; j <= end && count < minPointsForExtendedTrendline; j++) {
        if (IsPriceOnTrendline(j, trendline[i])) {
          count++;
        }
      }
      if (count >= minPointsForExtendedTrendline)
        // Extend trendline logic goes here
      

      

Han respondido

1
Desarrollador 1
Evaluación
(161)
Proyectos
192
26%
Arbitraje
8
25% / 38%
Caducado
5
3%
Trabajando
2
Desarrollador 2
Evaluación
(75)
Proyectos
127
53%
Arbitraje
5
20% / 60%
Caducado
20
16%
Trabaja
3
Desarrollador 3
Evaluación
(38)
Proyectos
40
25%
Arbitraje
23
13% / 74%
Caducado
8
20%
Trabaja
4
Desarrollador 4
Evaluación
(13)
Proyectos
16
19%
Arbitraje
0
Caducado
2
13%
Libre
5
Desarrollador 5
Evaluación
(1)
Proyectos
5
0%
Arbitraje
1
100% / 0%
Caducado
2
40%
Trabaja
6
Desarrollador 6
Evaluación
(261)
Proyectos
426
38%
Arbitraje
86
44% / 19%
Caducado
71
17%
Trabajando
7
Desarrollador 7
Evaluación
(67)
Proyectos
144
34%
Arbitraje
10
10% / 60%
Caducado
26
18%
Libre
Solicitudes similares
Need to modify the ea to take trades based on an indicator. indicator and ea source code available. Variable inputs of indicator to be added. Buy Amount for Profit (+ve $value ) Buy Amount for Loss (-ve $value ) Sell Amount for Profit (+ve $value ) Sell Amount for Loss (-ve $value )
am looking for great developer that can help me on this project, I have an Indicator on Tradingview and want to convert that to an EA for Metatrader 4. Can you help me? peace be unto you
Good programmer need to use 1 indicator convert to expert advisor. kennel Kennel indicator-- upper channel signal = Sell Kennel indicator-- Lower channel signal = Buy Entry on New candle or Bar after close of Signal candle lot size-- Take profit--- Stoploss--- Trail start--- Trail step--- Max spread = 200 Hedge of signal = true/false multiplier = percentage Risk = percentage. magic-- CHECK OUT THE LINK
Necesito un desarrollador con experiencia para crear un robot para cfds para mt5 con entorno windows, el cual abra y cierre posiciones condicionalmente al movimiento del precio e indicador, se incluye crear un indicador personalizado
Hi there, I have a currency strength EA for MT5 that I would like to use as the base for an EA that will enter trades based on: 3 EMA's being aligned in the right direction (9, 20, 200) on the 5m, 15m and 1hr timeframes. Stochastic Indicator crossing back up above the 20 level for a buy and crossing below the 80 level for a sell. The difference between the currency strength on the 2 pairs being above a specified
CORREÇÃO NOTIFICAÇÕES Ø O indicador muda a cor dos candles e da MA200 quando ocorre as entradas e é somente nesse momento que ele deve enviar notificação de entrada porem está enviando em outros momentos que não atende as condições conforme imagem abaixo. Ø Sempre que abro o MT5, mudo o time frame ou a plataforma perde conexão o indicador me envia notificações de entradas passadas, o indicador deve enviar
Hello, I'm seeking for an experienced developer that can convert a simple MQL4 EA (which is about 1000 lines of code, but with simple logic) to MQL5. Furthermore I need him to optimize the EA for better performance and faster backtest speed (all optional backtest features to speed up the process must be enabled optionally with input parameters, like Enter/Exit on new bar only for example). Finaly, I want to add an
Seb’s EA 2024/25 200 - 500 USD
Primary Agreement Description Details: This EA Strategy is to run on MT4. It has parameters for 2 MA's and 3 momentum indicators along with 22 "variable / constant rules & settings" on 1 time-frame (5 Min). There are 3 versions required to cater for 3 different Instruments (3 US Indexes). The only differences will be the position sizes, Stop levels & Macd bands. There are 3 entry conditions with 3 exit conditions
i am looking for experienced programmers who can help me out make my expert with zero lags and run smoothly and develop it in any possible way that make the accuracy way higher i need in addition to make this expert advisor linked on mt4 and mt5 also link the ea to WhatsApp and telegram bot where it giveS signals of the expert on it
Tenho um EA que preciso: Desde correções como conectar filtros existentes à lógica já inserida no sistema. insira novos filtros no ea com nova lógica e conecte-se com a lógica existente. Há várias pequenas tarefas a serem concluídas, gosto de fazê-las em partes para que haja uma avaliação adequada e depois passar para a próxima etapa. ea contém +6k linhas de código e está em português. Embora eu não entenda de

Información sobre el proyecto

Presupuesto
30+ USD
Para el ejecutor
27 USD
Plazo límite de ejecución
a 1 día(s)