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() ( Bar &bar ) { if ( bar.Close() >= dblMax ) { dblMax = bar.Close(); dtMax = bar.DateTime(); } }