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

Notification

Icon
Error

Options
Go to last post Go to first unread
Carbonmimeti  
#1 Posted : Thursday, November 17, 2011 10:20:12 PM(UTC)
Carbonmimeti

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 1/13/2010(UTC)
Posts: 24

Thanks: 1 times

Some months ago I found in a web page an interesting formula:now I have modified it so I can watch when,between two dates,time reaches 1.618.
If you want you can add other fibonacci's percentage such as 0.618-0.786-1-1.382.....and so on.
I repeat that my work was very simple,the formula just exsisted,but I want notice to everyone that if I use a particular technique based on bars or oscillator or whatever you want and this technique appears during the time setup of fibonacci's percentage chances are in your favor.
Good trading

A1:=Input("date A mmddyyyy",1011960,12312100,1072000);
B1:=Input("date B mmddyyyy",1011960,12312100,1082000);
BSA:=BarsSince(A1=Month()*1000000 + DayOfMonth()*10000+ Year());
BSB:=BarsSince(B1=Month()*1000000 + DayOfMonth()*10000+ Year());

setup:=Int(If(((BSA-BSB)*1.618)-BSB>0,((BSA-BSB)*1.618)-BSB,0));

setup;

Now I found this formula:

{ DaysSince last Nth event function.
Calendar day count is independent of
any chart periodicity or missing data.

©Copyright 2003~2006 Jose Silva.
The grant of this license is for personal use
only - no resale or repackaging allowed.
All code remains the property of Jose Silva.
http://www.metastocktools.com }

{ User Inputs }
nth:=Input("Calendar days since Nth [1~1000] event",1,1000,1);
plot:=Input("[1]DaysSince, [2]EventSignals, [3]DayCount",1,3,1);
limit:=Input("Zero reset calendar days from year",1,2100,2000);

{ Event example }
event:=Cross(Mov(C,5,E),Mov(C,20,E));

{ Calendar counter engine }
leap:=Frac(Year()/4)=0 AND Frac(Year()/100)<>0
OR Frac(Year()/400)=0;
y:=Year()*365+Int(Year()/4)
-Int(Year()/100)+Int(Year()/400)-730484;
m:=
If(Month()=2,31-leap,
If(Month()=3,59,
If(Month()=4,90,
If(Month()=5,120,
If(Month()=6,151,
If(Month()=7,181,
If(Month()=8,212,
If(Month()=9,243,
If(Month()=10,273,
If(Month()=11,304,
If(Month()=12,334,
-leap)))))))))));
DayNr:=y+m+DayOfMonth();

{ Restrict Nth to max events }
nth:=
LastValue(If(nth>Cum(event),Cum(event),nth));

{ Days since Nth event }
DaysSince:=DayNr-ValueWhen(nth,event,DayNr);

{ Plot in own window }
If(plot=1,DaysSince,If(plot=2,event,DayNr))


Well, I try to change event:=Cross(Mov(C,5,E),Mov(C,20,E)) with l>through(1,l,9)...and I wish I could to use peak(1,h,9) in order to subtract "event" of peak from "event"of through..namely total days from B minus C.
My purpose is to create a formula that plot in automatic way fibonacci time retracements or extensions...so I will not use input date.
I think this formula is very-very important...thank's to everyone help me!

p.s. how can I attach an image?I don't see the botton...

Carbonmimeti  
#2 Posted : Friday, November 18, 2011 9:45:49 AM(UTC)
Carbonmimeti

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 1/13/2010(UTC)
Posts: 24

Thanks: 1 times

EUREKA....

this formula is based on llv 30 and hhv 30..everyone can use other parameters....

minimo:=If(LLVBars( L, 30)=0,1,0);

{ Calendar day counter ©Copyright 2003~2006 Jose Silva.}

{ Automatic Fibonacci time formula by CARBONMIMETIC}

nth:=1;
plot:=1;
limit:=2000;

{ Event example }
event:=minimo=1;

{ Calendar counter engine }
leap:=Frac(Year()/4)=0 AND Frac(Year()/100)<>0
OR Frac(Year()/400)=0;
y:=Year()*365+Int(Year()/4)
-Int(Year()/100)+Int(Year()/400)-730484;
m:=
If(Month()=2,31-leap,
If(Month()=3,59,
If(Month()=4,90,
If(Month()=5,120,
If(Month()=6,151,
If(Month()=7,181,
If(Month()=8,212,
If(Month()=9,243,
If(Month()=10,273,
If(Month()=11,304,
If(Month()=12,334,
-leap)))))))))));
DayNr:=y+m+DayOfMonth();

{ Restrict Nth to max events }
nth:=
LastValue(If(nth>Cum(event),Cum(event),nth));

{ Days since Nth event }
DaysSince:=DayNr-ValueWhen(nth,event,DayNr);

DAY1:=ValueWhen(1,H=HHV(H,30),DaysSince)*0.66*0.618-1;

DAY2:=ValueWhen(1,H=HHV(H,30),DaysSince)*0.66-1;

DAY3:=ValueWhen(1,H=HHV(H,30),DaysSince)*0.66*1.618-1;

t1:=If(HHVBars( H,30)>=DAY1,1,0);
t2:=If(HHVBars( H,30)>=DAY2,1,0);
t3:=If(HHVBars( H,30)>=DAY3,1,0);

t1;
t2;
t3;

may be I will do little adjustments...but the real formula is the above one...

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.