Forum on trading, automated trading systems and testing trading strategies
Hello,
Please EDIT your post and use the SRC button when you post code.
Thank you.
Boripath Boonrit: i need Send only 1 order
- When you post code please use the SRC button! Please edit your post.
General rules and best pratices of the Forum. - General - MQL5 programming forum if(TimeDay(TimeCurrent())!= TimeDay(OrderOpenTime())) Cnt++;
What you are counting is the total closed orders not opened today. Don't you want to know the number of orders opened today?- I also assume you are also checking if an order is currently open.
int totalHistory; : totalHistory=OrderSelect( i, SELECT_BY_POS, MODE_HISTORY );
Select doesn't return an int. Check your return codes for errors and report them.
What are Function return values ? How do I use them ? - MQL4 and MetaTrader 4 - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
After one month, you will be seeing month old trades as todays trades. Use date:TimeDay Returns the day of month of the specified date Date and Time
Find bar of the same time one day ago - Simple Trading Strategies - MQL4 and MetaTrader 4 - MQL4 programming forum
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
i need Send only 1 order
code
int OrderInOneDay(int type)