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

Notification

Icon
Error

Options
Go to last post Go to first unread
Derek Worswick  
#1 Posted : Tuesday, October 16, 2012 8:03:39 AM(UTC)
Derek Worswick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 8/11/2005(UTC)
Posts: 104

Hi, I would like to plot vertical Lines at Fibonacci Calendar day intervals on a chart. ( say 144,233,377,610,987,1597 Calendar days ) see formula below (with thanks to Jose Silva But I must be using the MetaStock Alert function incorrectly “ Alert(Expression, Periods) “ When a Fibonacci time signal falls on a weekend I get no plot Hoping you can help; Kind regards, Derek
Code:

----------80
 OR Frac(limit/400)=0;
NoCount:=limit*365+Int(limit/4)
 -Int(limit/100)+Int(limit/400)-LimLeap;
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)-NoCount;
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));

Fib:=If(DaysSince=0 OR DaysSince=144 OR DaysSince=233 OR DaysSince=377 OR DaysSince=610 OR DaysSince=987 OR DaysSince=1597,100,0);

Fib AND Alert(Fib,2);

----------8<------------------------------------------------

RAHAVARD  
#2 Posted : Thursday, October 18, 2012 1:48:23 AM(UTC)
RAHAVARD

Rank: Newbie

Groups: Registered, Registered Users
Joined: 10/18/2012(UTC)
Posts: 3

Hello i want to post about fibonacci related trades from Now (In memorial to Mr. H. Moh.)
RAHAVARD  
#3 Posted : Thursday, October 18, 2012 2:00:20 AM(UTC)
RAHAVARD

Rank: Newbie

Groups: Registered, Registered Users
Joined: 10/18/2012(UTC)
Posts: 3

GBP H1
RAHAVARD  
#4 Posted : Thursday, October 18, 2012 4:13:44 PM(UTC)
RAHAVARD

Rank: Newbie

Groups: Registered, Registered Users
Joined: 10/18/2012(UTC)
Posts: 3

RAHAVARD wrote:
GBP H1
Hi First TP
wabbit  
#5 Posted : Thursday, October 18, 2012 6:39:44 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)
RAHAVARD,

What has any of this got to do with Derek's problem, or MetaStock?


wabbit [:D]

Derek Worswick  
#6 Posted : Monday, November 12, 2012 1:29:35 PM(UTC)
Derek Worswick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 8/11/2005(UTC)
Posts: 104

Hi, I have used Richard Dale's excellent NexusDate.dll NexusDate.dll \MetaStock\External Function DLLs\ folder,
Code:
 

{ Calendar formula thanks to Jose Silva }

Day1 := Input("Day",1,31,24); 
Month1 := Input("Month",1,12,10); 
Year1 := Input("Year",1900,2400,2008);

nth:=Input("Calendar days since Nth [1~1000] event",1,1000,1);

plot:=Input("[1]DaysSince, [2]EventSignals, [3]DayCount",1,3,2);
 
limit:=Year1;
 
event:= (DayOfMonth() = Day1 AND Month() = Month1 AND Year()=Year1 );
 
{ Restrict Nth to max events } 
nth:= LastValue(If(nth>Cum(event),Cum(event),nth));
 
{ Calendar days counter } 
calendar:=ExtFml("NexusDate.DaysOld");
 
{ Calendar day CountDown } 
countDown:=calendar-LastValue(calendar); 
 
{ Days since Nth event } 

{DaysSince:=(countDown -ValueWhen(nth,event, countDown))*-1; }

DaysSince:=ValueWhen(nth,event,countDown)-countDown;

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

F1:=Input("Fib Number",5, 987,21);
F2:=Round((F1*1.618));
F3:=Round((F2*1.618));
F4:=Round((F3*1.618));
F5:=Round((F4*1.618));
F6:=Round((F5*1.618));
F7:=Round((F6*1.618)); 
F8:=Round((F7*1.618));
F9:=Round((F8*1.618));
F10:=Round((F9*1.618));


Cross(DaysSince,F1);
Cross(DaysSince,F2);
Cross(DaysSince,F3);
Cross(DaysSince,F4);
Cross(DaysSince,F5);
Cross(DaysSince,F6);
Cross(DaysSince,F7);
Cross(DaysSince,F8);
Cross(DaysSince,F9);
Cross(DaysSince,F10);

 
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.