Setting up Expert Advisor using the Commodity Channel Index

 
I am trying to setup an auto trade using an expert advisor using the commodity channel index.
Can you give me some pointers on how to write the code to perform this?
Example if I want to issue a buy when the CCI goes above -100 or a sell when it goes below 100.
 
Here is the expert advisor with MA crossover and CCI...you can delete the MA part and use the CCI for generating buy/sell signals...

https://www.mql5.com/en/code/7750