I can't figure out why the stop in the following example doesn't work 
right Could someone help me understand why?
under applystop in the users guide it says the following: 
 Scenario 2: 
you trade on today's close and want to exit intraday on stop price
Correct settings: 
ActivateStopsImmediately turned OFF
ExitAtStop = 1
Trade delays set to zero
Trade price set to close

OK, that's what I want to do. What happens is the system buys at the 
close as it should. On the day following the trade, the system 
sometimes stops out based on the high of the buy bar instead of 
calculating the stop based on the buy price. Why does this happen?
Here's an example of the code:
//Set Parameters                                                
                           
SetOption("NoDefaultColumns",0);                                
           
SetOption("InitialEquity",25000);                               
                           
SetOption("AllowSameBarExit",0);                                
                           
SetOption("ActivateStopsImmediately",0);                        
                                   
SetOption("AllowPositionShrinking",1);                          
                           
SetOption("FuturesMode",0);                                     
                   
SetOption("InterestRate",0);                                    
                   
SetOption("MaxOpenPositions",1000);                             
                           
SetOption("MinShares",.001);                                    
                                                   
SetOption("CommissionMode",2); //$ per trade                    
                                   
SetOption("CommissionAmount",10);                               
                           
SetOption("MarginRequirement",100); //No margin                 
                                   
SetOption("ReverseSignalForcesExit",0);                         
                           
SetOption("UsePrevBarEquityForPosSizing",1);                    
                                   
SetTradeDelays(0,0,0,0);                                        
                        
BuyPrice = SellPrice = C;                                       
                                
BuyPrice = C;                                                    
                                                           
SellPrice = C;                                                  
        
Buy = C>MA(C,20) ;                                                    
                                           
Sell = 0;                                               
                                                           
ApplyStop( stopTypeTrailing, stopModePercent, 5,1);             
                                           
                  

Reply via email to