logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
moneypick  
#1 Posted : Friday, October 14, 2005 5:45:56 PM(UTC)
moneypick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 32

Hi everyone, I want your help to create a exploration formula based on Commodity Channel Index. I read follwing condition in a book for CCI. Buy when CCI has crossed below -100, formed a bottom below -110, and then crossed back up through -100. (1) CCI has Crossed below -100 = Cross(CCI(14),-100) (2) formed a bottom below -110 = [size=18:d5a2afa739]?[/size:d5a2afa739] (3) crossed back up through -100 = [size=18:d5a2afa739] ?[/size:d5a2afa739] Please help me to create the formula for remaining two condition. Thx,
Jose  
#2 Posted : Friday, October 14, 2005 8:51:44 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Try this MS code: [code:1:3a48779a14] =============== CCI buy signals =============== ---8<---------------------- { http://www.metastocktools.com } { Variables } limit1:=-100; limit2:=-110; CCIperiods:=14; CCIdx:=CCI(CCIperiods); { #1 - CCI has crossed below -100 } preSetup:=Ref(CCIdx,-1)<limit1; { #2 - CCI formed a trough below -110 } bottom:=CCIdx>Ref(CCIdx,-1) AND Ref(CCIdx,-1)<Ref(CCIdx,-2) AND Ref(CCIdx,-1)<limit2; setup:=preSetup AND BarsSince(bottom)<BarsSince(Cross(limit1,CCIdx)); { #3 CCI crosses back up through -100 } signal:=Cross(CCIdx,limit1); { Buy signal } buy:=setup AND signal; { Plot in own window } buy ---8<---------------------- [/code:1:3a48779a14] I would strongly recommend to plot this exploration code first as an indicator, and verify that it signals correctly as intended. jose '-)
hayseed  
#3 Posted : Saturday, October 15, 2005 1:08:23 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

thanks jose..... neat layout to that code..... as an indicator it plots almost identical buys as equis's cci modified expert.... which is darn good in itself......h
moneypick  
#4 Posted : Saturday, October 15, 2005 5:15:05 PM(UTC)
moneypick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 32

Respected Jose, Thank you very much for your kind help. Thx
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.