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