InvestorsHub Logo
Followers 11
Posts 2531
Boards Moderated 1
Alias Born 04/03/2009

Re: LKB Trader post# 60132

Tuesday, 01/03/2012 9:21:29 PM

Tuesday, January 03, 2012 9:21:29 PM

Post# of 79025
LKB, make sure you delete "plot Data = close;

Then cut and paste the following into the NewStudy window. I just tried it and got no errors. This is Gloe's work below :


#HFE CCI 14 Identifies when the CCI 14 has a Hook from Extreme (HFE): a hook from overbought or oversold, by finding when the CCI has crossed over or under a specified value. Values below -200 indicate an oversold position; Values above +200 indicate an overbought position.
#Length: The number of bars used to calculate the CCI (Default is 14)
#crossingType: Defines whether to apply the study when the CCI has gone above or below the specified threshold and then recrosses the threshold (Default is above)
#threshold: Index value to be crossed (Default is -200)

input length = 14;
input crossingType = {default above, below};
input threshold = -200;

plot signal = Crosses(CCI(length = length).CCI, threshold, crossingType == crossingType.above);

signal.DefineColor("Above", GetColor(4));
signal.DefineColor("Below", GetColor(4));
signal.AssignValueColor(if crossingType == crossingType.above then signal.color("Above") else signal.color("Below"));

signal.SetPaintingStrategy(if crossingType == CrossingType.above
then PaintingStrategy.BOOLEAN_ARROW_UP
else PaintingStrategy.BOOLEAN_ARROW_DOWN);

Join the InvestorsHub Community

Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.