Trading System API  3.0
Library for Simulating and Deploying Trading and Investment Strategies
tsa::functor::commodity_channel_index Class Reference

CCI by Lambert. Functor for calculating Commodity Channel Index over a given period. More...

#include <TSAFunctors.h>

Inherits tsa::functor::parent< T >.

Public Member Functions

const parent & operator() (const series< double > &hi, const series< double > &lo, const series< double > &cl, size_t period)
 

Detailed Description

CCI by Lambert. Functor for calculating Commodity Channel Index over a given period.

Member Function Documentation

const parent< double > & tsa::functor::commodity_channel_index::operator() ( const series< double > &  hi,
const series< double > &  lo,
const series< double > &  cl,
size_t  period 
)

Parameters
hiseries of highs
loseries of lows
clseries of closes
periodperiod