Summary
The Commodity Channel Index identifies overbough and oversold conditions, price reversals and trend strength.
Syntax
public CommodityChannelIndex CommodityChannelIndex(int periods)
public CommodityChannelIndex CommodityChannelIndex(Bars bars, int periods)
Parameters
Name | Description |
---|
Example 1
private CommodityChannelIndex commodityChannelIndex; //... protected override void OnStart() { commodityChannelIndex = Indicators.CommodityChannelIndex(Periods); } protected override void OnBar() { // Print the current value to the log Print("The current CCI value = {0}", commodityChannelIndex.Result.LastValue); }