how do i fix this error 'SymbolInfoDouble' - no one of the overloads can be applied to the function call could be one of 2 function(s)

 
// Define input parameters from the original code
input double LotSize = 0.1;
input int FastMA = 10;
input int SlowMA = 20;

// Define the CTrade class with strategic trading moves
class CTrade {
public:
    void Buy(double lotSize, string symbol, double price, double stopLoss, double takeProfit, string comment) {
        double profit = lotSize * (takeProfit - price); // Calculate profit
        Print("Buy trade opened at price: ", price, " Profit: ", profit);
    }

    void Sell(double lotSize, string symbol, double price, double stopLoss, double takeProfit, string comment) {
        double profit = lotSize * (price - takeProfit); // Calculate profit
        Print("Sell trade opened at price: ", price, " Profit: ", profit);
    }
};

// Define the Expert base class and derived class with Moving Average strategy
class CExpertImplementation {
public:
    CTrade trade;
    double fastMA, slowMA;
    double ask, askStopLevel, bid, bidStopLevel;

    CExpertImplementation() {
        fastMA = iMA(_Symbol, 0, FastMA, 0, MODE_SMA, PRICE_CLOSE);
        slowMA = iMA(_Symbol, 0, SlowMA, 0, MODE_SMA, PRICE_CLOSE);
    }

    void OnTick() {
        double currentFastMA = iMA(_Symbol, 0, FastMA, 0, MODE_SMA, PRICE_CLOSE);
        double currentSlowMA = iMA(_Symbol, 0, SlowMA, 0, MODE_SMA, PRICE_CLOSE);

        double stopLevel = 0.0;
        double currentStopLevel = 0.0;
        if (SymbolInfoDouble(_Symbol, SYMBOL_TRADE_STOPS_LEVEL, currentStopLevel)) {
            stopLevel = currentStopLevel;
            if (stopLevel != 0) {
                double currentBid, currentAsk;
                if (SymbolInfoDouble(_Symbol, SYMBOL_BID, currentBid) && SymbolInfoDouble(_Symbol, SYMBOL_ASK, currentAsk)) {
                    if (currentFastMA < currentSlowMA && fastMA >= slowMA) {
                        bid = currentBid;
                        trade.Sell(LotSize, _Symbol, bid, stopLevel, bid - 100 * _Point, "Sell Signal");
                    } else if (currentFastMA > currentSlowMA && fastMA <= slowMA) {
                        ask = currentAsk;
                        trade.Buy(LotSize, _Symbol, ask, stopLevel, ask + 100 * _Point, "Buy Signal");
                    }
                }
            }
        }

        fastMA = currentFastMA;
        slowMA = currentSlowMA;
    }

    void Deinit() {
        // Deinit logic here
    }
};

CExpertImplementation ExtExpert;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
void OnTick() {
    ExtExpert.OnTick();
}

//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason) {
    ExtExpert.Deinit();
}
 
Kay Blow:
  1.     void OnTick() {
            double currentFastMA = iMA(_Symbol, 0, FastMA, 0, MODE_SMA, PRICE_CLOSE);
            double currentSlowMA = iMA(_Symbol, 0, SlowMA, 0, MODE_SMA, PRICE_CLOSE);

    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 (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)

  2. Stop using ChatGPT.
              Help needed to debug and fix an AI EA - Trading Systems - MQL5 programming forum #2 (2023)

    ChatGPT (the worst), “Bots Builder”, “EA builder”, “EA Builder Pro”, EATree, “Etasoft forex generator”, “Forex Strategy Builder”, ForexEAdvisor (aka. ForexEAdvisor STRATEGY BUILDER, and Online Forex Expert Advisor Generator), ForexRobotAcademy.com, forexsb, “FX EA Builder”, fxDreema, Forex Generator, FxPro, “LP-MOBI”, Molanis, “Octa-FX Meta Editor”, Strategy Builder FX, “Strategy Quant”, “Visual Trader Studio”, “MQL5 Wizard”, etc., are all the same. You will get something quick, but then you will spend a much longer time trying to get it right, than if you learned the language up front, and then just wrote it.

    Since you haven't learned MQL4/5, therefor 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 yours.

    We are willing to HELP you when you post your attempt (using Code button) and state the nature of your problem, but we are not going to debug your hundreds of lines of code. You are essentially going to be on your own.

    ChatGPT
    1. Even it says do not use it for coding. * 
    2. Mixing MT4 and MT5 code together.
    3. Creating multiple OnCalculate/OnTick functions.
    4. OnCalculate returning a double.
    5. Filling buffers with zero in OnInit (they have no size yet). Setting buffer elements to zero but not setting Empty Value to correspond.
    6. Calling undefined functions.
    7. Calling MT4 functions in MT5 code.
    8. Sometimes, not using strict (MT4 code).
    9. Code that will not compile.
    10. Creating code outside of functions. * 
    11. Creating incomplete code. * 
    12. Initialization of Global variables with non-constants. * 
    13. Assigning a MT5 handle to a double or missing the buffer and bar indexes in a MT4 call. * 
    14. Useing MT4 Trade Functions without first selecting an order. * 
    15. Uses NULL in OrderSend. * 
    bot builder Creating two OnInit() functions. * 
    EA builder
    1. Counting up while closing multiple orders.
    2. Not useing time in new bar detection.
    3. Not adjusting for 4/5 digit brokers, TP/SL and slippage. * 
    4. Not checking return codes.
    EATree Uses objects on chart to save values — not persistent storage (files or GV+Flush.) No recovery (crash/power failure.)
    ForexEAdvisor
    1. Non-updateing global variables.
    2. Compilation errors.
    3. Not checking return codes.
    4. Not reporting errors.
    FX EA Builder
    1. Not checking return codes.
    2. Loosing open tickets on terminal restart. No recovery (crash/power failure.)
    3. Not adjusting stops for the spread. * 
    4. Using OrdersTotal directly.
    5. Using the old event handlers.

  3.                if (SymbolInfoDouble(_Symbol, SYMBOL_BID, currentBid) && SymbolInfoDouble(_Symbol, SYMBOL_ASK, currentAsk)) {
    

    Perhaps you should read the manual. The second parameter is a ENUM_SYMBOL_INFO_DOUBLE
       How To Ask Questions The Smart Way. (2004)
          How To Interpret Answers.
             RTFM and STFW: How To Tell You've Seriously Screwed Up.


Reason: