| CCI(Period) as Array |
This function has one parameter:
| Period | Enter the period to calculate the CCI. |
Example:
|
' This system is based on Commodity Channel Index Sub Main() TArr = CCI(10) For CurrentBar = BeginBar + 1 to EndBar If (TArr(CurrentBar) > -100) and (TArr(CurrentBar - 1) < -100) then Buy(CurrentBar) If (TArr(CurrentBar) < 100) and (TArr(CurrentBar - 1) > 100) then Sell(CurrentBar) Next End Sub |