Getting Undeclared identifier errors , even after inclufing trade.mqh

 
any assistance please... my code has undeclared identifier errors for functions OrderSend() and iStochastic(). im still getting undeclared identifier errors for parameters of both function even after including the trade.mqh library.
 
Garvin More:
any assistance please... my code has undeclared identifier errors for functions OrderSend() and iStochastic(). im still getting undeclared identifier errors for parameters of both function even after including the trade.mqh library.
The trade.mqh is just for trading instances. 
You'll either need to declare the identifiers clearly or define your error here so we can help if it's really an issue to do with the include file.
 

I'm trying to run a code snipet which was generated by AI and its giving me errors The error are  caused by two function that im using in my code namely  OrderSend() and iStochastic(). these function both have parameters and some of the parameters are variables. for example ,  iStochastic() has a parameter of a viable '"MODE_MAIN" and "MODE SIGNAL" the other errors a generated by the  OrderSend() function  and its undeclared identifires "OP_SELL" and ""Bid"". I've attached a snapshot of the compiled code and error messages

Files:
er1.jpg  305 kb
er2.jpg  249 kb
 

It seems you are trying to use MQL4 code in MQL5, which is not valid. Is this ChatGPT generated code?

Please, don't request help for ChatGPT (or other A.I.) generated code. It generates horrible code, mixing MQL4 and MQL5. Please use the Freelance section for such requests.

Trading applications for MetaTrader 5 to order
Trading applications for MetaTrader 5 to order
  • 2024.01.06
  • www.mql5.com
The largest freelance service with MQL5 application developers
 
Noted, Thanks
Reason: