View Single Post
  #4 (permalink)  
Old 09-11-2007, 10:35 AM
ralph.ronnquist's Avatar
ralph.ronnquist ralph.ronnquist is offline
Senior Member
 
Join Date: Oct 2006
Posts: 281
ralph.ronnquist is on a distinguished road
no, right; it will need to compute the value relative to prior bars, and assign BUFF with the values.... like
PHP Code:
int start()
{
    for ( 
int bar Bars IndicatorCounted(); bar >= 0bar-- ) {
        
indicatebar );
    }
}

void indicate(int bar)
{
    
double sum=0
    
double v=0
    for ( 
int i=0i<32i++ ) {
        
sum += Volumebar ] * Closebar ]; 
        
+= Volumebar ];
    }
    
BUFFbar ] = sum/v;

Just replace your start() function with the above two functions, and it should do the trick.

Last edited by ralph.ronnquist; 09-11-2007 at 10:53 AM.
Reply With Quote