PureBytes Links
Trading Reference Links
|
http://trader.online.pl/MSZ/e-w-Fibonacci_Levels_I.html
Hello MetaStock Users (MS 9,1),
I found this code from the sourche link and tried to
copy it for test purpose. However, since not very familiar
yet with coding metastock it gives a multiple error messages,
the first one is that metastock seems to not recognice "Input"
as meta operator at all.
Even If I delete All inputs the next erros comes out from
operator "emonth".
Does anyone have this code as working version ? It could be very
usefull code as it does aloud you to change fibratios as you wish.
I had copy/pasted code bottom of this message. ANOTHER code I found
from the page regarding also for fib retracements works just fine
which you see attatched just below. The code shows different
retracements level on your chart, very handy. How could I change
that each level drawn in the chart would be different colours / or
add them to show exactly which retracement level the tick currently
trades ? ie. 2.618, 1.618, 1.382, 1.382, 236, .382, .618, .764 would
be clearier if retracement line could be more easy to recognice.
Best Regards&Thanx in Advance for any help,
Focorba
(email> intersil@xxxxxxxxx)
Fibonacci Tool - Custom
{Ken 9/8/99}
j:=Input("year to begin line study",1800,3000,1999);
k:=Input("month to begin line study",1,12,1);
m:=Input("day of month to begin line study",1,31,4);
ext:=Input("Extension: 2=upward; 1=downward; 0=none",0,2,0);
hi:=Input("high",0,20000,100);
lo:=Input("low",0,20000,50);
BeginPlot:=Year()=j AND Month()=k AND DayOfMonth()=m;
n:=ValueWhen(1,BeginPlot,(hi-(hi-lo)*2.618));
q:=ValueWhen(1,BeginPlot,(hi-(hi-lo)*1.618));
u:=ValueWhen(1,BeginPlot,(hi-(hi-lo)*1.382));
x:=ValueWhen(1,BeginPlot,((hi-lo)*1.382)+lo);
y:=ValueWhen(1,BeginPlot,((hi-lo)*1.618)+lo);
z:=ValueWhen(1,BeginPlot,((hi-lo)*2.618)+lo);
If(ext=1,n,lo);
If(ext=1,q,lo);
If(ext=1,u,lo);
ValueWhen(1,BeginPlot,lo);
ValueWhen(1,BeginPlot,((hi-lo)*.236)+lo);
ValueWhen(1,BeginPlot,((hi-lo)*.382)+lo);
ValueWhen(1,BeginPlot,((hi-lo)*.5)+lo);
ValueWhen(1,BeginPlot,((hi-lo)*.618)+lo);
ValueWhen(1,BeginPlot,((hi-lo)*.764)+lo);
ValueWhen(1,BeginPlot,hi);
If(ext=2,x,hi);
If(ext=2,y,hi);
If(ext=2,z,hi);
Fib Levels_In
eMonth1:=Input("Enter the Month-MM",1,12,1);
eDate1:=Input("Enter the Date-DD",1,31,1);
eYear1:=Input("Enter the Year-YYYY",0,2100,0);
eMonth2:=Input(".Enter the Month-MM",1,12,1);
eDate2:=Input(".Enter the Date-DD",1,31,1);
eYear2:=Input(".Enter the Year-YYYY",0,2100,0);
h1:=valuewhen(1, dayofmonth()=eDate1 AND month()=eMonth1 AND year()
=eYear1,H);
l1:=valuewhen(1, dayofmonth()=eDate1 AND month()=eMonth1 AND year()
=eYear1,L);
h2:=valuewhen(1, dayofmonth()=eDate2 AND month()=eMonth2 AND year()
=eYear2,H);
l2:=valuewhen(1, dayofmonth()=eDate2 AND month()=eMonth2 AND year()
=eYear2,L);
aa:= Max(h1,h2);
bb:=Min(l1,l2);
cc:=Abs(aa-bb);
startpt:=If(h1>h2 AND l1>l2,l2,If(h2>h1 AND l2>l1,h2,0));
sr1:=If(startpt=l2,l2+(cc*.236),If(startpt=h2,h2-(cc*.236),0));
SR2:=If(startpt=l2,l2+(cc*.3),If(startpt=h2,h2-(cc*.3),0));
SR3:=If(startpt=l2,l2+(cc*.382),If(startpt=h2,h2-(cc*.382),0));
SR4:=If(startpt=l2,l2+(cc*.486),If(startpt=h2,h2-(cc*.486),0));
SR5:=If(startpt=l2,l2+(cc*.618),If(startpt=h2,h2-(cc*.618),0));
SR6:=If(startpt=l2,l2+(cc*.786),If(startpt=h2,h2-(cc*.786),0));
aa;
sr1;
SR2;
SR3;
SR4;
SR5;
SR6;
bb;
=================================:8
Fib Levels_Out
eMonth1:=Input("Enter the Month-MM",1,12,1);
eDate1:=Input("Enter the Date-DD",1,31,1);
eYear1:=Input("Enter the Year-YYYY",0,2100,0);
eMonth2:=Input(".Enter the Month-MM",1,12,1);
eDate2:=Input(".Enter the Date-DD",1,31,1);
eYear2:=Input(".Enter the Year-YYYY",0,2100,0);
h1:=ValueWhen(1, DayOfMonth()=eDate1 AND Month()=eMonth1 AND Year()
=eYear1,H);
l1:=ValueWhen(1, DayOfMonth()=eDate1 AND Month()=eMonth1 AND Year()
=eYear1,L);
h2:=ValueWhen(1, DayOfMonth()=eDate2 AND Month()=eMonth2 AND Year()
=eYear2,H);
l2:=ValueWhen(1, DayOfMonth()=eDate2 AND Month()=eMonth2 AND Year()
=eYear2,L);
aa:= Max(h1,h2);
bb:=Min(l1,l2);
cc:=Abs(aa-bb);
startpt:=If(h1>h2 AND l1>l2,l2,If(h1<h2 AND l1<l2,h2,0));
sr1:=If(startpt=l2,l2-(cc*1.272),If(startpt=h2,h2+(cc*1.272),0));
SR2:=If(startpt=l2,l2-(cc*1.618),If(startpt=h2,h2+(cc*1.618),0));
SR3:=If(startpt=l2,l2-(cc*2.058),If(startpt=h2,h2+(cc*2.058),0));
SR4:=If(startpt=l2,l2-(cc*2.618),If(startpt=h2,h2+(cc*2.618),0));
SR5:=If(startpt=l2,l2-(cc*3.33),If(startpt=h2,h2+(cc*3.33),0));
SR6:=If(startpt=l2,l2-(cc*4.236),If(startpt=h2,h2+(cc*4.236),0));
aa;
sr1;
SR2;
SR3;
SR4;
SR5;
SR6;
bb;
=================================:8
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|