solve '*' - open parenthesis expected error

 

i have only 2 error on this code .. can help to fix it? 

thanks


v//+------------------------------------------------------------------+

//|                                                  FractalPatterns.mq5 |

//|              Adaptado de MetaTrader 4 a MetaTrader 5                   |

//+------------------------------------------------------------------+

#property indicator_chart_window

#property indicator_buffers 2

#property indicator_plots   2



// Definición de las flechas de compra y venta

#property indicator_type1   DRAW_ARROW

#property indicator_color1  Lime

#property indicator_width1  1

#property indicator_label1  "Buy Signal"



#property indicator_type2   DRAW_ARROW

#property indicator_color2  Red

#property indicator_width2  1

#property indicator_label2  "Sell Signal"



// Buffers para las flechas de compra y venta

double BuyBuffer[];

double SellBuffer[];



// Parámetros de entrada

input int len = 10;         // Longitud del Patrón

input int lookback = 100;   // Rango de Búsqueda

input double similarityThreshold = 0.95;  // Umbral de Similitud



// Función de inicialización del indicador

int OnInit() {

    // Asignación de buffers a las señales de compra y venta

    SetIndexBuffer(0, BuyBuffer, INDICATOR_DATA);

    SetIndexBuffer(1, SellBuffer, INDICATOR_DATA);



    PlotIndexSetInteger(0, PLOT_ARROW, 233); // Flecha hacia arriba

    PlotIndexSetInteger(1, PLOT_ARROW, 234); // Flecha hacia abajo



    return(INIT_SUCCEEDED);

}



// Función para encontrar el patrón en los precios

void FindPattern(const double &src[], int start, int length, double &pattern[]) {

    for (int i = 0; i < length; i++) {

        pattern[i] = src[start - i];

    }

}



// Función principal de cálculo

int OnCalculate(const int rates_total,      // Número de barras disponibles

                const int prev_calculated,  // Número de barras calculadas anteriormente

                const datetime &time[],     // Tiempo de las barras

                const double &open[],       // Precios de apertura

                const double &high[],       // Precios máximos

                const double &low[],        // Precios mínimos

                const double &close[],      // Precios de cierre

                const long &tick_volume[],  // Volumen de ticks

                const long &volume[],       // Volumen de las barras

                const int &spread[])        // Spread de las barras

{

    // Asegurarse de tener suficientes barras

    if (rates_total < lookback + len) return(0);



    // Declaración de patrones actuales y pasados

    double currentPattern[];

    ArrayResize(currentPattern, len);



    double pastPattern[];

    ArrayResize(pastPattern, len);



    // Variables para la similitud y la posición del patrón

    double similarity;

    int similarPatternStart = -1;



    // Buscar el patrón actual

    FindPattern(close, 0, len, currentPattern);



    // Buscar patrones similares en el pasado

    for (int i = len; i <= lookback; i++) {

        FindPattern(close, i, len, pastPattern);

        similarity = 0.0;



        for (int j = 0; j < len; j++) {

            similarity += MathAbs((currentPattern[j] - pastPattern[j]) / pastPattern[j]);

        }



        similarity /= len;

        if (similarity < (1 - similarityThreshold)) {

            similarPatternStart = i;

            break;

        }

    }



    // Generar señales de compra y venta

    if (similarPatternStart != -1) {

        if (close[0] < close[similarPatternStart]) {

            BuyBuffer[0] = low[0] - Point * 10; // Flecha de compra debajo del precio actual

            SellBuffer[0] = EMPTY_VALUE;       // No mostrar venta

        } else if (close[0] > close[similarPatternStart]) {

            SellBuffer[0] = high[0] + Point * 10; // Flecha de venta encima del precio actual

            BuyBuffer[0] = EMPTY_VALUE;           // No mostrar compra

        }

    } else {

        // Sin señales

        BuyBuffer[0] = EMPTY_VALUE;

        SellBuffer[0] = EMPTY_VALUE;

    }



    return(rates_total);

}


 
Either _Point or Point(), but not Point
 
Vladislav Boyko #:
Either _Point or Point(), but not Point

can fix please i cant run it

 
Gustavo Adolfo Ortega Osorio #:

can fix please i cant run it

Sorry, but I can't fix the code you generated using AI.

 
Gustavo Adolfo Ortega Osorio #:

can fix please i cant run it

he mentioned the fix

do you see? https://www.mql5.com/en/docs/check/point

Documentation on MQL5: Checkup / Point
Documentation on MQL5: Checkup / Point
  • www.mql5.com
Returns the point size of the current symbol in the quote currency. Return Value The value of the _Point variable which stores the point size of...
 
Gustavo Adolfo Ortega Osorio #: can fix please
  1. MT4: Learn to code it.
    MT5: Begin learning to code it.

    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.
              I need HEEEELP, please, it's URGENT...really ! - General - MQL5 programming forum (2017)

  2. Or pay (Freelance) someone to code it. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2019)

We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
          No free help (2017)