Making an EA that can view portions of charts as we can see them - page 3

 
Sorry, SELECT_BY_POS was a typo. I just want to know how to figure out if there is a current trade. I don't understand that loop. Can I use it to find trades that are going on currently?
Reason: