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

Notification

Icon
Error

Options
Go to last post Go to first unread
Finkel  
#1 Posted : Monday, July 23, 2012 2:07:30 PM(UTC)
Finkel

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/29/2012(UTC)
Posts: 8

I have several formulas for candlestick formations, and I made an exploration for several of them. 1 of them is throwing the error in the title everytime I run the exploration. If( Ref(C,-2)>Ref(O,-2) AND Ref(C,-1)>Ref(O,-1) AND C>O AND O>Ref(C,-2) AND Ref(O,1)>Ref(C,-2) AND (H-L)<1.02*(Ref(H,-1)-Ref(L,-1)) AND (H-L)>0.98*(Ref(H,-1)-Ref(L,-1)) AND O<1.005*Ref(O,-1) AND O>0.995*Ref(O,-1) ,1,0) The part that confuses me is that the expert advisor that I put this formula into hits properly, but the exploration can't even give me a 0 for when it doesn't hit. I am loading 2000 records instead of minimum in the exploration. My exploration is as follows: column A: C column B: Fml( "Side-by-side white lines") filter: colB = 1 Thanks for any help.
henry1224  
#2 Posted : Monday, July 23, 2012 3:40:52 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
If(

Ref(C,-2)>Ref(O,-2) AND
Ref(C,-1)>Ref(O,-1) AND
C>O AND
O>Ref(C,-2) AND
Ref(O,1)>Ref(C,-2) AND
(H-L) (H-L)>0.98*(Ref(H,-1)-Ref(L,-1)) AND
O O>0.995*Ref(O,-1)

,1,0)

you are either missing an operand or the bold entries don't belong in the exploration

also the if function is redundant in the exploration, if all of the conditions are met then the column will show a 1 else 0
jjstein  
#3 Posted : Monday, July 23, 2012 3:55:40 PM(UTC)
jjstein

Rank: Advanced Member

Groups ready for retrieval: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Repost using CODE tags.
Finkel  
#4 Posted : Monday, July 23, 2012 4:08:49 PM(UTC)
Finkel

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/29/2012(UTC)
Posts: 8

sorry, it pasted wrong. If( Ref(C,-2)>Ref(O,-2) AND Ref(C,-1)>Ref(O,-1) AND C>O AND O>Ref(C,-2) AND Ref(O,1)>Ref(C,-2) AND (H-L)<1.02*(Ref(H,-1)-Ref(L,-1)) AND (H-L)>0.98*(Ref(H,-1)-Ref(L,-1)) AND O<1.005*Ref(O,-1) AND O>0.995*Ref(O,-1) ,1,0)
Finkel  
#5 Posted : Monday, July 23, 2012 4:12:53 PM(UTC)
Finkel

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/29/2012(UTC)
Posts: 8

still pasted wrong and I couldn't delete it. Not my lucky day apparently. How do I paste using CODE?
henry1224  
#6 Posted : Monday, July 23, 2012 5:07:28 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
put this in colB

Code:
Ref(C,-2)>Ref(O,-2) AND

 Ref(C,-1)>Ref(O,-1) AND

 C>O AND

 O>Ref(C,-2) AND

 Ref(O,1)>Ref(C,-2) AND

(H-L)>0.98*(Ref(H,-1)-Ref(L,-1)) AND

O>0.995*Ref(O,-1)


put this in ColC

Code:
If(Ref(C,-2)>Ref(O,-2) AND

 Ref(C,-1)>Ref(O,-1) AND

 C>O AND

 O>Ref(C,-2) AND

 Ref(O,1)>Ref(C,-2) AND

(H-L)>0.98*(Ref(H,-1)-Ref(L,-1)) AND

O>0.995*Ref(O,-1),1,0)

jjstein  
#7 Posted : Monday, July 23, 2012 5:09:47 PM(UTC)
jjstein

Rank: Advanced Member

Groups ready for retrieval: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Finkel wrote:
How do I paste using CODE?


See below my signature.

Finkel  
#8 Posted : Wednesday, July 25, 2012 10:08:18 AM(UTC)
Finkel

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/29/2012(UTC)
Posts: 8

I went line by line, running the search with each line by itself, and the one that is Ref(o,-1)> Ref(C,-2) is the line that is triggering the error. Kind of special, but I'm trying work arounds to figure out what is wrong. Removing this line makes it run smoothly
Finkel  
#9 Posted : Wednesday, July 25, 2012 10:21:57 AM(UTC)
Finkel

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/29/2012(UTC)
Posts: 8

Figured it out. I missed the negative in the first part of that line. My previous post was not a copy and paste, which is why it says Ref(o,-1) instead of the ref(o,1) from my earlier posts. Does this mean explorations cannot look into the future? ;)
mstt  
#10 Posted : Wednesday, July 25, 2012 8:06:35 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Finkel

That's exactly what it means. The effect is the same as you would see on a chart if you applied a forward reference to a moving average or any other function. To get away with a forward reference without creating an N/A on the last data bar (the bar that the Explorer reports its results from) you would need to enclose the forward reference in an equal or greater backward reference.

Roy
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.