[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Pip detector code



PureBytes Links

Trading Reference Links


This MS code attempts to detect the smallest traded price movement 
(pip) on a chart.  Useful when adding slippage/spread to a trading 
strategy.

============
Pip detector
============
---8<---------------

{ Detects lowest historical Pip on chart }
{ Use on any periodicity }

{ ©Copyright 2005 Jose Silva }
{ For personal use only }
{ http://www.metastocktools.com }

noPip:=1000;
p1:=If(H-O=0,noPip,H-O);
p2:=If(O-L=0,noPip,O-L);
p3:=Abs(If(O-C=0,noPip,O-C));
p4:=If(H-C=0,noPip,H-C);
p5:=If(C-L=0,noPip,C-L);
p6:=If(H-L=0,noPip,H-L);
p7:=Abs(If(O-Ref(C,-1)=0,noPip,O-Ref(C,-1)));
minPip:=Min(p1,Min(p2,Min(p3,Min(p4,Min(p5,
 Min(p6,p7))))));
pip:=Lowest(minPip);

pip

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


jose '-)
http://www.metastocktools.com








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/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/