errors in code some please helpe me UT BOT

 
// Include necessary libraries
#include <Trade\Trade.mqh>

// Declare global variables
CTrade trade;
input double LotSize = 0.01;       // Lot size
input int Slippage = 2;            // Slippage
input int UT_Period = 8;           // UT Bot Period
input double UT_Multiplier = 600.0;// UT Bot Multiplier
input int MagicNumber = 123456;    // Magic Number

// Global variables
double utUpperBand, utLowerBand;
double lastUTSignal = 0; // 1 for buy, -1 for sell, 0 for no signal

// OnInit function
int OnInit() {
    Print("UT Bot EA Initialized");
    return INIT_SUCCEEDED;
}

// OnTick function
void OnTick() {
    // Calculate the UT Bot signal
    CalculateUTBot();

    // Get current price
    double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
    double bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);

    // Trading logic
    if (lastUTSignal == 1) { // Buy signal
        if (PositionsTotal() == 0) {
            // Prepare trade request for buy order
            MqlTradeRequest request = {};
            MqlTradeResult result = {};
            request.action   = TRADE_ACTION_DEAL;
            request.symbol   = _Symbol;
            request.volume   = LotSize;
            request.type     = ORDER_BUY;
            request.price    = ask;
            request.slippage = Slippage;
            request.deviation = 10;
            request.magic    = MagicNumber;
            request.comment  = "Buy order";

            // Send trade request
            if (trade.OrderSend(request, result)) {
                Print("Buy order placed successfully.");
            } else {
                Print("Error placing buy order: ", GetLastError());
            }
        } else if (PositionsTotal() > 0) {
            // Close all existing positions and open a new buy position
            ClosePositions();
            MqlTradeRequest request = {};
            MqlTradeResult result = {};
            request.action   = TRADE_ACTION_DEAL;
            request.symbol   = _Symbol;
            request.volume   = LotSize;
            request.type     = ORDER_BUY;
            request.price    = ask;
            request.slippage = Slippage;
            request.deviation = 10;
            request.magic    = MagicNumber;
            request.comment  = "Buy order";

            // Send trade request
            if (trade.OrderSend(request, result)) {
                Print("Buy order placed successfully.");
            } else {
                Print("Error placing buy order: ", GetLastError());
            }
        }
    } else if (lastUTSignal == -1) { // Sell signal
        if (PositionsTotal() == 0) {
            // Prepare trade request for sell order
            MqlTradeRequest request = {};
            MqlTradeResult result = {};
            request.action   = TRADE_ACTION_DEAL;
            request.symbol   = _Symbol;
            request.volume   = LotSize;
            request.type     = ORDER_SELL;
            request.price    = bid;
            request.slippage = Slippage;
            request.deviation = 10;
            request.magic    = MagicNumber;
            request.comment  = "Sell order";

            // Send trade request
            if (trade.OrderSend(request, result)) {
                Print("Sell order placed successfully.");
            } else {
                Print("Error placing sell order: ", GetLastError());
            }
        } else if (PositionsTotal() > 0) {
            // Close all existing positions and open a new sell position
            ClosePositions();
            MqlTradeRequest request = {};
            MqlTradeResult result = {};
            request.action   = TRADE_ACTION_DEAL;
            request.symbol   = _Symbol;
            request.volume   = LotSize;
            request.type     = ORDER_SELL;
            request.price    = bid;
            request.slippage = Slippage;
            request.deviation = 10;
            request.magic    = MagicNumber;
            request.comment  = "Sell order";

            // Send trade request
            if (trade.OrderSend(request, result)) {
                Print("Sell order placed successfully.");
            } else {
                Print("Error placing sell order: ", GetLastError());
            }
        }
    }
}

// Close all positions
void ClosePositions() {
    for (int i = PositionsTotal() - 1; i >= 0; i--) {
        if (PositionSelect(_Symbol)) {
            ulong ticket = PositionGetTicket(i);
            MqlTradeRequest request = {};
            MqlTradeResult result = {};
            request.action   = TRADE_ACTION_CLOSE;
            request.symbol   = _Symbol;
            request.volume   = PositionGetDouble(POSITION_VOLUME);
            request.type     = PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY ? ORDER_SELL : ORDER_BUY;
            request.price    = PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY ? SymbolInfoDouble(_Symbol, SYMBOL_BID) : SymbolInfoDouble(_Symbol, SYMBOL_ASK);
            request.slippage = Slippage;
            request.deviation = 10;
            request.magic    = MagicNumber;
            request.comment  = "Close position";

            // Send trade request
            if (trade.OrderSend(request, result)) {
                Print("Position closed successfully.");
            } else {
                Print("Error closing position: ", GetLastError());
            }
        }
    }
}

// UT Bot calculation
void CalculateUTBot() {
    // Calculate Simple Moving Average and ATR
    double sma = iMA(_Symbol, PERIOD_M5, UT_Period, 0, MODE_SMA, PRICE_CLOSE, 0);
    double atr = iATR(_Symbol, PERIOD_M5, UT_Period, 0);

    utUpperBand = sma + UT_Multiplier * atr;
    utLowerBand = sma - UT_Multiplier * atr;

    double currentPrice = iClose(_Symbol, PERIOD_M5, 0);

    // Determine signal
    if (currentPrice > utUpperBand) {
        lastUTSignal = 1; // Buy signal
    } else if (currentPrice < utLowerBand) {
        lastUTSignal = -1; // Sell signal
    } else {
        lastUTSignal = 0; // No signal
    }
}




errors 

'Test1.mq5' Test1.mq5 1 1

'Trade.mqh' Trade.mqh 1 1

'Object.mqh' Object.mqh 1 1

'StdLibErr.mqh' StdLibErr.mqh 1 1

'OrderInfo.mqh' OrderInfo.mqh 1 1

'HistoryOrderInfo.mqh' HistoryOrderInfo.mqh 1 1

'PositionInfo.mqh' PositionInfo.mqh 1 1

'DealInfo.mqh' DealInfo.mqh 1 1

'ORDER_BUY' - undeclared identifier Test1.mq5 40 32

'slippage' - undeclared identifier Test1.mq5 42 21

'ORDER_BUY' - undeclared identifier Test1.mq5 61 32

'slippage' - undeclared identifier Test1.mq5 63 21

'ORDER_SELL' - undeclared identifier Test1.mq5 83 32

'slippage' - undeclared identifier Test1.mq5 85 21

'ORDER_SELL' - undeclared identifier Test1.mq5 104 32

'slippage' - undeclared identifier Test1.mq5 106 21

'TRADE_ACTION_CLOSE' - undeclared identifier Test1.mq5 128 32

'ORDER_SELL' - undeclared identifier Test1.mq5 131 89

'ORDER_BUY' - undeclared identifier Test1.mq5 131 102

implicit enum conversion Test1.mq5 131 87

'slippage' - undeclared identifier Test1.mq5 133 21

'iMA' - wrong parameters count Test1.mq5 151 18

   built-in: int iMA(const string,ENUM_TIMEFRAMES,int,int,ENUM_MA_METHOD,int) Test1.mq5 151 18

'iATR' - wrong parameters count Test1.mq5 152 18

   built-in: int iATR(const string,ENUM_TIMEFRAMES,int) Test1.mq5 152 18

14 errors, 1 warnings 15 2


 
    double sma = iMA(_Symbol, PERIOD_M5, UT_Period, 0, MODE_SMA, PRICE_CLOSE, 0);
    double atr = iATR(_Symbol, PERIOD_M5, UT_Period, 0);
Those are MT4 calls. Perhaps you should read the manual, especially the examples.
   How To Ask Questions The Smart Way. (2004)
      How To Interpret Answers.
         RTFM and STFW: How To Tell You've Seriously Screwed Up.

They all (including iCustom) return a handle (an int). You get that in OnInit. In OnTick/OnCalculate/OnStart (after the indicator has updated its buffers), you use the handle, shift and count to get the data.
          Technical Indicators - Reference on algorithmic/automated trading language for MetaTrader 5
          Timeseries and Indicators Access / CopyBuffer - Reference on algorithmic/automated trading language for MetaTrader 5
          How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 (2020)
          How to start with MQL5 - MetaTrader 5 - General - MQL5 programming forum - Page 7 #61 (2020)
          MQL5 for Newbies: Guide to Using Technical Indicators in Expert Advisors - MQL5 Articles (2010)
          How to call indicators in MQL5 - MQL5 Articles (2010)