Thread: Ask!
View Single Post
  #601 (permalink)  
Old 05-31-2007, 09:44 PM
Michel Michel is offline
Senior Member
 
Join Date: Feb 2006
Posts: 556
Michel is on a distinguished road
When you scan the orders collection by the "for" loop, you have to check if the selected order is on the current symbol, otherwize you will quickly do some greek salad...

PHP Code:
  for (int i=0i<OrdersTotal(); i++) {
    if (
OrderSelect(iSELECT_BY_POSMODE_TRADES)) {
      if(
OrderSymbol()==Symbol()) TrailingPositions();
    } 

Last edited by Michel; 05-31-2007 at 09:46 PM.
Reply With Quote