Download MetaTrader 5
To add comments, please log in or register
Add our Facebook page to friends. Follow the latest news!
Vasyl Nosal
18354
Vasyl Nosal 2016.03.11 09:13  
GumRai:

How can it be ok?

The loop only checks the first order, so there may be a buy order, but if it is not in the highest position, it will not be detected.

If last was not buy than he needs to delete pending. If it is buy than he do not want to delete pending.

What is the problem? 

whroeder1
13991
whroeder1 2016.03.11 13:00  
eevviill: If last was not buy than he needs to delete pending. What is the problem? 
  1. Wrong. If the last was not a buy then it is a pending. No deletions unless there is a buy somewhere.
  2. If the last is a pending, and the code does not delete anything. Go look at the code again.
jtubbs13791
71
jtubbs13791 2016.03.11 17:13  
removing else worked. Thank you. didnt know else only look at previous trade only
whroeder1
13991
whroeder1 2016.03.11 20:35  
Removing the else was not the answer, moving the return false outside the loop is.
/ /12
To add comments, please log in or register