View Single Post
  #2 (permalink)  
Old 01-18-2007, 05:56 AM
ftsdPadawan ftsdPadawan is offline
Junior Member
 
Join Date: Jan 2007
Posts: 6
ftsdPadawan is on a distinguished road
Wrong code sequence, but still...

Okay, I did notice I was not selecting the order as the first step in the for loop of the exit test exitStrategy_cg_l16 (the 2 bold if conditions were reversed), but even when I do as below, I get the same incongruent results. I also commented out the magic number condition.

Code:
	for(int cnt=0; cnt<total; cnt++)
	{
		if(selectOrderByIndex(cnt))
		{
		   if(OrderType()<=OP_SELL && OrderSymbol()==Symbol())// && OrderMagicNumber()==cg_l16)
		   {
			   if(OrderType()==OP_BUY) // long position is opened
Reply With Quote