PureBytes Links
Trading Reference Links
|
============
Market's eye
============
---8<----------------------------
{ Big Brother is watching... v1.0 }
{ Hint: trade in the opposite direction to
the market eye's gaze.
Outside zone bounded by chart's High & Low
of selected period.
Plot on price chart with dark colors.
Zoom chart in & out for effects.}
{ ©Copyright 2005 Jose Silva }
{ For personal use only }
{ http://www.metastocktools.com }
{ User inputs }
pds1:=Input("Start periods ago",2,2600,70);
pds2:=Input("End periods ago",0,2600,5);
spread:=Input("Iris size",0,2600,10);
spread:=
LastValue(Int(Min((pds1-pds2)/4,spread)));
{ Remove possible errors introduced
between keyboard & seat ;) }
p1:=LastValue(Max(pds1,pds2));
p2:=LastValue(Min(pds1,pds2));
p1:=If(p1<(p2+2),p2+2,p1);
{ Eyeball }
start:=Cum(1)=LastValue(Cum(1))-p1;
restrict:=Ref(Ref(ValueWhen(1,start,1),-p2),p2);
Hi:=LastValue(Highest(ValueWhen(1,restrict,H)))
+restrict-1;
Lo:=LastValue(Lowest(ValueWhen(1,restrict,L)))
+restrict-1;
midX:=(p1-p2)/2;
midY:=(Hi-Lo)/2;
tX:=Cum(1)-midX-(LastValue(Cum(1))-p1);
ellipse:=
Sqrt(midY*midY*(1-Min(tX*tX/midX/midX,1)));
upperE1:=Lo+midY+ellipse;
lowerE1:=Hi-midY-ellipse;
{ Cornea }
p1:=p1-spread;
p2:=p2+spread;
start:=Cum(1)=LastValue(Cum(1))-p1;
restrict:=Ref(Ref(ValueWhen(1,start,1),-p2),p2);
Hi:=LastValue(Highest(ValueWhen(1,restrict,H)))
+restrict-1;
Lo:=LastValue(Lowest(ValueWhen(1,restrict,L)))
+restrict-1;
midX:=(p1-p2)/2;
midY:=(Hi-Lo)/2;
tX:=Cum(1)-midX-(LastValue(Cum(1))-p1);
ellipse:=
Sqrt(midY*midY*(1-Min(tX*tX/midX/midX,1)));
upperE2:=Lo+midY+ellipse;
lowerE2:=Hi-midY-ellipse;
{ Iris }
p1:=p1-spread;
p2:=p2+spread;
start:=Cum(1)=LastValue(Cum(1))-p1;
restrict:=Ref(Ref(ValueWhen(1,start,1),-p2),p2);
Hi:=LastValue(Highest(ValueWhen(1,restrict,H)))
+restrict-1;
Lo:=LastValue(Lowest(ValueWhen(1,restrict,L)))
+restrict-1;
midX:=(p1-p2)/2;
midY:=(Hi-Lo)/2;
tX:=Cum(1)-midX-(LastValue(Cum(1))-p1);
ellipse:=
Sqrt(midY*midY*(1-Min(tX*tX/midX/midX,1)));
upperE3:=Lo+midY+ellipse;
lowerE3:=Hi-midY-ellipse;
even:=Cum(1)/2=Int(Cum(1)/2);
{ Plot on price chart }
If(even,upperE3,lowerE3);
If(even,lowerE3,upperE3);
upperE1;lowerE1;
upperE2;lowerE2;
upperE3;lowerE3
---8<----------------------------
jose '-)
http://www.metastocktools.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> 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/
|