getting errors need help

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

//|                                                     DCFX RSI.mq5 |

//|                                  Copyright 2023, MetaQuotes Ltd. |

//|                                             https://www.mql5.com |

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

#property copyright "Copyright 2023, MetaQuotes Ltd."

#property link      "https://www.mql5.com"

#property version   "1.00"



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

//| Include                                                          |

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

#include<Trade\Trade.mqh>



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

//| Inputs                                                           |

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

static input long    InpMagicnumber = 546812;  // magic number

static input double  InpLotsize     = 0.01;    // lot size

input  int           InpRSIPeriod   = 21;      // rsi period

input  int           InpRSILevel    = 70;      // rsi level (upper)

input  int           InpStopLoss    = 200;     // stop loss in points (0=off)

input  int           InpTakeProfit  = 100;     // take profit in points (0=off)

input  bool          InpCloseSignal = false    // close trades by opposite signal



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

//| Global variables                                                 |

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

int handle;

double buffer[];

MqlTick currentTick;

CTrade trade;

datetime openTimeBuy = 0;

datetime openTimeSell = 0;



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

//| Expert initialization function                                   |

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

int OnInit()

{

    // check user inputs

    if(InpMagicnumber<=0){ 

       Alert("Magicnumber <= 0");

       return INIT_PARAMETERS_INCORRECT;

   }

    if(InpLotsize<=0 || InpLotsize>10){

       Alert("Lot size <= 0 or 10");

       return INIT_PARAMETERS_INCORRECT;

   }

    if(InpRSIPeriod<=1){

       Alert("RSI Period <= 1");

       return INIT_PARAMETERS_INCORRECT;

   }

    if(InpRSILevel>=100 || InpRSILevel<=50){

       Alert("RSI Level >= 100 or <= 50");

       return INIT_PARAMETERS_INCORRECT;

   }

    if(InpStopLoss<0){

       Alert("Stop Lose < 0");

       return INIT_PARAMETERS_INCORRECT;

   }

    if(InpTakeProfit<0){

       Alert("Take profit < 0");

       return INIT_PARAMETERS_INCORRECT;

   }



   return(INIT_SUCCEEDED);

  

}



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

//| Expert deinitialization function                                 |

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

void OnDeinit(const int reason)

{



   

}



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

//| Expert tick function                                             |

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

void OnTick()

{



   

}

Hi Guys need help

am getting errors 

'handle' - unexpected token DCFX RSI.mq5 29 8

';' - unexpected token DCFX RSI.mq5 29 14

'buffer' - unexpected token DCFX RSI.mq5 30 8

'[' - unexpected token DCFX RSI.mq5 30 14

']' - unexpected token DCFX RSI.mq5 30 15

']' - semicolon expected DCFX RSI.mq5 30 15

']' - expressions are not allowed on a global scope DCFX RSI.mq5 30 15

Discover new MetaTrader 5 opportunities with MQL5 community and services
Discover new MetaTrader 5 opportunities with MQL5 community and services
  • 2023.04.15
  • www.mql5.com
MQL5: language of trade strategies built-in the MetaTrader 5 Trading Platform, allows writing your own trading robots, technical indicators, scripts and libraries of functions
 

Please edit your post to use the CODE button (Alt-S)!

Use the CODE button

 


Sergey Golubev #:

Please edit your post to use the CODE button (Alt-S)!


done

 
Abbas Mussa #:

done

InpCloseSignal = false;

semicolon(;) missing.

 
Yashar Seyyedin #:

semicolon(;) missing.

Simple fix 
 

Semicolon (;) is missing.

input  bool          InpCloseSignal = false;    // close trades by opposite signal
 
Thank you Guys
Reason: