Discussions
 » 
Special Interest Groups
 » 
Basic Coding Techniques
 » 
Can plotting be done on any different bar, instead of the latest bar
 
        
            
            
    
        
Rank: Member
  Groups: Registered Users, Subscribers Joined: 2/7/2015(UTC) Posts: 15
  Thanks: 9 times
  
 
     | 
    
        
            
	      
                Hey all. As the heading says, can plotting be done on the previous bar, instead of the latest bar? For example:-
 In Expert Advisor, I want a signal/symbol to appear above the Ref(H,-1) bar of the following formula: H<Ref(H,-1) AND Ref(H,-2)<Ref(H,-1) This, obviously, plots on the latest bar. However I want the previous bar to be marked. Can it be done at all? TIA
  
            
  
         
     | 
    | 
         
             
     | 
    
         
            
         
     | 
    | 
        
     | 
        
        
        
            
        
            
            
    
        
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)
  
 
     | 
    
        
            
	      
                Code:
{plot}
H > Max(Ref(H,-1),Ref(H,+1));
 
  
            
  
         
     | 
    
        
              1 user thanked wabbit for this useful post.  
     | 
    
        
     | 
    | 
        
     | 
        
        
        
    
        
            
            
    
        
Rank: Member
  Groups: Registered Users, Subscribers Joined: 2/7/2015(UTC) Posts: 15
  Thanks: 9 times
  
 
     | 
    
        
            
	      
                Originally Posted by: wabbit  Code:
{plot}
H > Max(Ref(H,-1),Ref(H,+1));
  
So looking into the future is the only way that it can be done, or is there any other way? 
 TIA
  
            
  
         
     | 
    | 
         
             
     | 
    
         
            
         
     | 
    | 
        
     | 
        
        
        
            
        
            
            
    
        
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)
  
 
     | 
    
        
            
	      
                Nope.  Forward referencing i.e. looking into the future is just as bad as changing the past. 
            
  
         
     | 
    
        
              1 user thanked wabbit for this useful post.  
     | 
    
        
     | 
    | 
        
     | 
        
        
        
    
                           
    
| Users browsing this topic | 
| 
 
Guest (Hidden) 
 | 
Discussions
 » 
Special Interest Groups
 » 
Basic Coding Techniques
 » 
Can plotting be done on any different bar, instead of the latest bar
 
    
        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.