OPEN-SOURCE SCRIPT

CCI strategy on OIL1H

This indicator is based on Commodity Channel Index.

It buys when CCI on period 200 is under -130 and it´s rising last 12 bars. It closes the position by hitting Take Profit, Stop Loss or opening short position.

It sells when CCI on period 200 is over 130 and it´s falling last 12 bars. It closes the position by hitting Take Profit, Stop Loss or opening short position.

This strategy seems to working just on USOIL on 1 hour chart. This can predict that it´s just luck and not proper strategy or indicator I would use for trading.

This script is just for educational purposes and that´s why the script is open. I will be happy if you will leave comment and try to come up with some ideas how to improve this strategy, so it can be used also on other commodities/forex pairs.
backtestingCommodity Channel Index (CCI)strategystrategytesting

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer