InvestorsHub Logo

gloe

01/03/12 6:53 PM

#60133 RE: LKB Trader #60132

I just closed down TOS. What word DOWN???? Why don't you copy and paste the whole thing? Is anything highlighted in Red? If so, you made a mistake somewhere. If not, it should work.

I've been working all day. Try to copy and paste again. The whole thing.

Over and out.

desertcynlite

01/03/12 9:21 PM

#60134 RE: LKB Trader #60132

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);