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

Notification

Icon
Error

Options
Go to last post Go to first unread
mridula  
#1 Posted : Saturday, November 13, 2010 10:06:24 AM(UTC)
mridula

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 11/12/2010(UTC)
Posts: 3

please help me to write an exploreror to find out first white cancle after black candle
johnl  
#2 Posted : Saturday, November 13, 2010 7:15:22 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602


Sounds like you want a latch function:
Put into formula:

a1:=first instance;
a2:=Second instance;
x:=BarsSince(a1)<BarsSince(a2); {latch}
x:=Alert(x,2) AND a2; {first a2 after a1}
x;

Thanks to Wabbit for code.


wabbit  
#3 Posted : Sunday, November 14, 2010 5:13:10 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
If I were looking for an "nth" event after a specific event, I'd be more likely to use a count-and-reset like Roy has shown us many times. The above situation works in most situations because bars are either black or white, but not always!



wabbit [:D]

mridula  
#4 Posted : Saturday, November 20, 2010 5:10:54 AM(UTC)
mridula

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 11/12/2010(UTC)
Posts: 3

sir my question is i need an exploreor to finf out the stock that is white in colour after we get a black candle.please send me the correct formula to find out the exploreor
johnl  
#5 Posted : Saturday, November 20, 2010 3:34:06 PM(UTC)
johnl

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 11/7/2005(UTC)
Posts: 602

Below:
Replace first instance with your definition of a black candle
Replace second instance with your definition of a white candle
Then use "x=1" as the explorer "filter".
This should give you the first white candle after a black candle.

a1:=first instance;
a2:=Second instance;
x:=BarsSince(a1)<BarsSince(a2); {latch}
x:=Alert(x,2) AND a2; {first a2 after a1}
x;


Users browsing this topic
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.