Chaiya Srisawat: Some time results =0; What is the meaning?
- Perhaps you should read the manual.
ACCOUNT_LIMIT_ORDERS Maximum allowed number of open positions and active pending orders (in total), 0 unlimited int
Account Properties - Environment State - Standard Constants, Enumerations and Structures - MQL4 Reference - Do you really expect us to understand your code without it's context, like when you call it? (probably at № 2.3 not № 2.7)
Don't try to use any price or server related functions in OnInit (or on load,) as there may be no connection/chart yet:- Terminal starts.
- Indicators/EAs are loaded. Static and globally declared variables are initialized. (Do not depend on a specific order.)
- OnInit is called.
- For indicators OnCalculate is called with any existing history.
- Human may have to enter password, connection to server begins.
- New history is received, OnCalculate called again.
- New tick is received, OnCalculate/OnTick is called. Now TickValue, TimeCurrent and prices are valid.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, I have a question with error 148.
I checked the max pending with this code.
int max_allowed_orders=(int)AccountInfoInteger(ACCOUNT_LIMIT_ORDERS);
Some time results =0; What is the meaning? Is it mean no pending allow? But when I send manually pending order to the account, it is successful.
So I think this may mean that the number of pending order is not be control!!
What is the real meaning of ACCOUNT_LIMIT_ORDERS? Please help!!
Chaiya