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

Notification

Icon
Error

Options
Go to last post Go to first unread
CN001532  
#1 Posted : Monday, September 12, 2005 7:48:45 PM(UTC)
CN001532

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/22/2005(UTC)
Posts: 30

I'm not sure how to word this question but here goes. I've created a custom indicator and I could use some help on the input section. I would like to be able to choose between two functions within this user defined indicator: - namely either a standard CCI(pds) or the Equis CCI indicator CCIE(pds). Both have a choice of input periods. I don't get error messages but I just get a flatline chart on the zero line. I should get periodic +1 values representing a signal. The formula code works individually, however the code does not work when trying to splice a choice between two indicators: {input section} pds:=Input("CCI periods",2,50,14); ccimthd:=Input("CCI Method",1,2,1); If(ccimthd =1, CCI(14), CCIE(pds)) AND {standard ZLR Rules} ccimthd<130 AND ccimthd>Ref(ccimthd,-1)AND ccimthd>0 AND Ref(ccimthd,-1)>0 AND Ref(ccimthd,-2)>0 AND Ref(ccimthd,-3)>0 AND Ref(ccimthd,-4)>0 AND Ref(ccimthd,-5)>0 Thx for any help, Joe
Patrick  
#2 Posted : Monday, September 12, 2005 7:56:52 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Try This: {input section} pds:=Input("CCI periods",2,50,14); ccimthd:=Input("CCI Method",1,2,1); DA:=If(ccimthd =1, CCI(14), CCIE(pds)); DA<130 AND DA>Ref(DA,-1)AND Sum(DA>0,6)=6 Patrick :mrgreen:
StorkBite  
#3 Posted : Monday, September 12, 2005 8:05:42 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Hey Joe- R U meaning to keep the CCI() constant with CCI(14) or do you want it variable too? Perhaps like this: DA:=If(ccimthd =1, CCI(pds), CCIE(pds));
CN001532  
#4 Posted : Monday, September 12, 2005 8:59:30 PM(UTC)
CN001532

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/22/2005(UTC)
Posts: 30

thanks to both - I should have used (pds) in both functions and the addtion of the DA variable and streamlined code worked like a charm Regards, Joe
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.