leospartain2 Posted May 8, 2014 Report Share Posted May 8, 2014 (edited) CCI STUDIESdeclare lower;input length05 = 5;input length20 = 20;input length50 = 50;input over_sold = -100;input over_bought = 100;def price = (high + low + close);def linDev05 = lindev(price, length05);def linDev20 = lindev(price, length20);def linDev50 = lindev(price, length50);plot CCI05 = if linDev05 == 0 then 0 else (price - Average(price, length05)) / linDev05 / 0.015;plot CCI20 = if linDev20 == 0 then 0 else (price - Average(price, length20)) / linDev20 / 0.015;plot CCI50 = if linDev50 == 0 then 0 else (price - Average(price, length50)) / linDev50 / 0.015;plot OverBought = over_bought;plot ZeroLine = 0;plot OverSold = over_sold;CCI05.SetDefaultColor(Color.MAGENTA);CCI20.SetDefaultColor(Color.YELLOW);CCI50.SetDefaultColor(Color.CYAN);Overbought.SetDefaultColor(GetColor(5));ZeroLine.SetDefaultColor(GetColor(5));Oversold.SetDefaultColor(GetColor(5)); Edited May 8, 2014 by leospartain2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.