Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- strategy("4H CCI Strategy 1.3", overlay=true)
- length = input( 11 )
- overSold = input( -150 )
- overBought = input( +150 )
- price1 = high
- price2 = low
- ucci = cci(price1, length)
- dcci = cci(price2, length)
- vcci = cci(ohlc4, 11)
- tp = input(title="TP in ticks", type=integer, defval=3000, minval=1, maxval=100000)
- sl = input(title="SL in ticks", type=integer, defval=1000, minval=1, maxval=100000)
- if (not na(vcci))
- if (crossover(dcci, overSold))
- strategy.entry("CCILE", strategy.long, comment="CCILE")
- strategy.exit(id="CCILE", profit = tp, loss = sl)
- if (crossunder(ucci, overBought))
- strategy.entry("CCISE", strategy.short, comment="CCISE")
- strategy.exit(id="CCISE", profit = tp, loss = sl)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement