| 
 meaning the N-bar stop is last in 
line. 
  
TJ added an option to give N-bar stop priority. See 
settings off AA, 
  
ed 
  ----- Original Message -----  
  
  
  Sent: Friday, December 17, 2004 7:21 
  PM 
  Subject: Re: [amibroker] Oddity with 
  ApplyStop 
  
  
  Owen, 
    
  this might me caused due to:
  "If two or more different stops are triggered on 
  the VERY SAME bar then they are evaluated in this fixed order:
  Fixed 
  Ruin stop (loosing 99.96% of the starting capital) Max. loss stop Profit 
  target stop Trailing stop N-bar stop" 
    
  see: 
    
  
    
    
  rgds, Ed 
    
    
    
  --- Original Message -----  
  
    
    
    Sent: Friday, December 17, 2004 6:06 
    PM 
    Subject: [amibroker] Oddity with 
    ApplyStop 
    
  I've been experimenting with exits and have encountered 
    something I may  not understand. As a reference for evaluating other 
    exits, I told  Automatic Analysis to close trades on the following 
    open:   Sell=Ref(Buy,-1); SellPrice=O; and the obvious equivalent 
    for Short  trades.  I did this after experimenting with another exit 
    and  inadvertently left a profit-taking stop in place:  
     ApplyStop(1,2,N*TickSize);  The odd thing is that, even when 
    entering on  the close of one bar and exiting on the next open, the N in 
    the  ApplyStop function changes the trading results.  If this file 
    included  after-hours data, I'd assume the stop was reacting to it, but 
    that is  not the case.
  The only explanation I can think of is that 
    ApplyStop is incompatible  with any exit other than on the close.  
    It is ignoring the Exit-on-Open  and finding its profit later in the 
    day.  Thus, only the days that never  offer a profit of N*TickSize 
    are being closed correctly, and my trading  results are garbage.  
    And the same thing happens in "real" exits that  are supposed to exit on 
    the Open if the trade has gone on too long  without either taking a 
    profit or being closed at a loss.
  Does this make sense to 
    anyone?  And is my only recourse to write my own  exits using 
    loops?
  Thanks.
  Owen Davies
 
  Check AmiBroker 
    web page at: http://www.amibroker.com/
  Check 
    group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    
 
 
 
  Check AmiBroker web page at: http://www.amibroker.com/
  Check 
    group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    
 
 
   
  
Check AmiBroker web page at: 
http://www.amibroker.com/ 
 
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
  
 
| Yahoo! Groups Sponsor | 
 
  ADVERTISEMENT
 ![click here]()  |     | 
 
![]()  |  
 
 
 
Yahoo! Groups Links 
 |