Discussions
 » 
Special Interest Groups
 » 
Basic Coding Techniques
 » 
What is the syntax of For (i = 0 to Length, begin...end) in MetaStock?
 
        
            
            
    
        
Rank: Newbie
  Groups: Registered, Registered Users Joined: 5/5/2011(UTC) Posts: 4
  
 
     | 
    
        
            
	      
                How to translate "Summation of XY of length" into code, where X means the timeline or bar number, and Y means the price e.g. Close, and length e.g. 28 days? 
What is the syntax of the following in MetaStock? 
for Value1 = 0 to Length-1 
begin 
SumY=SumY + ref(Close, neg(Value1)); 
end; 
 
            
  
         
     | 
    | 
         
             
     | 
    
         
            
         
     | 
    | 
        
     | 
        
        
        
            
        
            
            
    
        
Rank: Advanced Member
  Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,112 Location: Perth, Western Australia
  Was thanked: 17 time(s) in 17 post(s)
  
 
     | 
    
        
     | 
    | 
         
             
     | 
    
         
            
         
     | 
    | 
        
     | 
        
        
        
    
                           
    
| Users browsing this topic | 
| 
 
Guest (Hidden) 
 | 
Discussions
 » 
Special Interest Groups
 » 
Basic Coding Techniques
 » 
What is the syntax of For (i = 0 to Length, begin...end) in MetaStock?
 
    
        Forum Jump
         
    
    You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.