PureBytes Links
Trading Reference Links
|
This simple but useful indicator allows price or indicator values to
be rounded to the nearest user-defined quantized $ or % level/step.
For an application example, this quantizing method could be applied to
either (or both) price or MA's, to eliminate whipsaws in price/MA
crossovers.
MetaStock -> Tools -> Indicator Builder -> New ->
Copy and paste complete formulae between "---8<---" lines.
==============
Stepped output
==============
---8<--------------------------
{ Stepped Price/Indicator output v2.0 }
{ ©Copyright 2005 Jose Silva
For personal use only
http://www.metastocktools.com }
{ Data array or indicator to quantize }
x:=C;
{ User inputs }
step:=Input("Step size",0,10000,0.5);
type:=Input("Step type: [1]$points, [2]%percentage",1,2,1);
{ Step size }
step:=Max(If(type=1,step,
LastValue(x*(step/100))),.00001);
{ Stepped data array }
stepX:=Int(x/step+.5)*step;
{ Plot on price chart or own window }
stepX
---8<--------------------------
jose '-)
http://www.metastocktools.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/
|