PureBytes Links
Trading Reference Links
|
--- In equismetastock@xxxxxxxxxxxxxxx, "will65shak" <nexus42@xxxx>
wrote:
> How to create a BarsFuture(), i.e. a BarsSince() that finds the
next
> true bar instead of the last true bar?
>
> After creating a binary wave, I would like to find the distance
(in
> bars) to the _next_ true value relative to the current bar (which
> could be anywhere from 3 to hundreds of bars away), any idea how
to
> do that?
>
> I want to use it in further calculations to create an indicator,
not
> a predictive one of course, but to describe the price data.
>
> Failed attempts so far:
> Ref() - needs a constant
> Nested If()'s - Can't get any accuracy since using 100's of if()'s
> is not workable
> Ref(), LastValue() & PREV - looked very promising by I haven't
> managed to get it to work.
>
> Any and all help greatly appreciated!Kristian
You can create an indicator that counts backward to zero
A1:=Input("date A mmddyyyy",1011960,12312100,1072000);
B1:=Input("date B mmddyyyy",1011960,12312100,1072000);
BSA:=BarsSince(A1=Month()*1000000 + DayOfMonth()*10000+ Year());
BSB:=BarsSince(B1=Month()*1000000 + DayOfMonth()*10000+ Year());
fib1:=((BSA-BSB)*.328) - BSB;
fibratio1a:= If(fib1 > 0, fib1, 0);
Int(fibratio1a);
fib2:=((BSA-BSB)*.5) - BSB;
fibratio2a:= If(fib2 > 0, fib2, 0);
Int(fibratio2a);
fib3:=((BSA-BSB)*.618) - BSB;
fibratio3a:= If(fib3 > 0, fib3, 0);
Int(fibratio3a);
fib4:=((BSA-BSB)*.75) - BSB;
fibratio4a:= If(fib4 > 0, fib4, 0);
Int(fibratio4a);
fib5:=((BSA-BSB)*.1) - BSB;
fibratio5a:= If(fib5 > 0, fib5, 0);
Int(fibratio5a);
when the indicator hits 0 you should have your event
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading!
Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/aM1XQD/od7FAA/uetFAA/BefplB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|