Hello,
I am cycling through existing orders, watching to see when new orders are added or orders are closed. Once they are added or closed, I send out an alert email.
Two questions:
1. is there an easier way to do this besides continuously cycling through all the orders that are open on a platform with a for loop?
2. Why is it that when you are running this loop, and every time the start() function is run and I have a for loop in the start function that is running the command OrderSelect(cnt2, SELECT_BY_POS, MODE_TRADES);, the new trades do not get detected??? This is driving me crazy! I am listing each ticket number in the loop and all new orders are absent from the list. Only existing orders show up.
Can anyone help me?
Thanks!
I am cycling through existing orders, watching to see when new orders are added or orders are closed. Once they are added or closed, I send out an alert email.
Two questions:
1. is there an easier way to do this besides continuously cycling through all the orders that are open on a platform with a for loop?
2. Why is it that when you are running this loop, and every time the start() function is run and I have a for loop in the start function that is running the command OrderSelect(cnt2, SELECT_BY_POS, MODE_TRADES);, the new trades do not get detected??? This is driving me crazy! I am listing each ticket number in the loop and all new orders are absent from the list. Only existing orders show up.
Can anyone help me?
Thanks!