| 
 PureBytes Links 
Trading Reference Links 
 | 
  
I know this is AFL 101 but I'm a bit confused on it. 
  Let's say I wanted to Buy today if the Close of three days ago was higher than its "center line" moving average. I know I have to shift the Close array, but do I also have to shift the MA array to make this comparison? My thought is yes. 
  So of the two formulas below, Formula B should be the correct one. Or is it? Does AFL automatically shift built-in function arrays when making comparisons? In that case, Formula A would be correct.
 
  Formula A
 
 CenterLine  = MA(C, 5);
  Close3      = Ref(Close, -3);
  Buy         = Close3 > CenterLine 
 
 
 Formula B
  CenterLine  = MA(C, 5);
  CenterLine3 = Ref(CenterLine, -3);
  Close3      = Ref(Close, -3);
  Buy         = Close3 > CenterLine3 
  
 
    
    
 
__._,_.___
  
**** IMPORTANT PLEASE READ **** 
This group is for the discussion between users only. 
This is *NOT* technical support channel. 
 
TO GET TECHNICAL SUPPORT send an e-mail directly to  
SUPPORT {at} amibroker.com 
 
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at 
http://www.amibroker.com/feedback/ 
(submissions sent via other channels won't be considered) 
 
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: 
http://www.amibroker.com/devlog/ 
 
  
     
  
 
      
   
__,_._,___
 |