-
What errors (plural)? You only stated one.
-
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problemWe can't see your broken code (Draft2.mq5).
Always post all relevant code (using Code button) or attach the source file.
We are not able to see your computer or read your mind. If you require a proper and useful answer you will need to show relevant code and the output log from the compiler.
Also, "OrderSymbol" is not a MQL5 function, nor is it a known method of any of classes in the MQL5 Standard Library. It is in fact a MQL4 function, so are you perhaps mixing up MQL4 and MQL5 functionality?
In a previous thread of yours — Undeclared Identifiers for built in functions ...
You also seemed to be mixing MQL4 and MQL5 code.
Are you perhaps using ChatGPT generated code?
This is now the third thread you have created with a similar question:
Please don't post the same topic multiple times. Post only once and in a relevant thread or forum section and continue on that topic.
@Francis cheruiyot, your most recent post has been removed. Did you not read "Always post all relevant code (using Code button) or attach the source file. " ?
Use the CODE button (Alt-S) when inserting code.
...
Also, the code you posted was mostly MQL4 code, not MQL5 code. Please stop using ChatGPT.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have included #include <Trade.mqh> in my code but I keep getting undeclared identifiers which are built in, what is the issue? 'OrderSymbol' - undeclared identifier Draft2.mq5 475 17
#include <Trade/Trade.mqh>
#include <Trade/DealInfo.mqh>
#include <Trade/HistoryOrderInfo.mqh>
#include <Trade/OrderInfo.mqh>
#include <Trade/PositionInfo.mqh>
#include <Trade/SymbolInfo.mqh>
#include <Trade/TerminalInfo.mqh>
#define ORDER_TYPE_TIME_GTC 0
#define TIME_INFINITE INT_MAX
And the compiler Mql5 is able to access, why I am I getting these errors?