void operator() ( Bar &bar ) {
   if ( bar.Close() >= dblMax ) {
     dblMax = bar.Close();
     dtMax = bar.DateTime();
   }
 }
Esempio n. 2
0
void TSReturns::Append( const Bar& bar ) {
  price_t price_ = std::log( bar.Close() );
  if ( m_bFirstAppend ) m_bFirstAppend = false;
  else Prices::Append( Price( bar.DateTime(), price_ - m_priceLast ) );
  m_priceLast = price_;
}
 void operator() ( const Bar &bar ) {
   m_dblSumOfPrices += bar.Close();
   ++m_nNumberOfValues;
 }