PureBytes Links
Trading Reference Links
|
x=Cum(1);per=3;s1=L;s11=H;
pS=TroughBars(s1,per,1)==0;
endt=LastValue(ValueWhen(pS,x));/*trough time*/
pR=PeakBars(s11,per,1)==0;
endt1=LastValue(ValueWhen(pR,x));/*peak time*/
in=endt-endt1;
Filter=1;
NumColumns=3;
Column0=endt;
Column2=in;
Column1=endt1;
Column0Name="Troughtime";
Column1Name="Peaktime";
Column2Name="interval";
Buy=Cum(1)==endt;
Sell=Cum(1)==endt1;
If for a stock interval>0, then the most recent event is a trough,
if interval<0 then the most recent event is a peak.
As you see in att. gif the last detected peak is at A, then 5 troughs
followed (B, C, D, E, F) and the last trough is at F.
D. T.
------=_NextPart_001_0010_01C14F7F.50A64780
Content-Type: text/html;
charset="iso-8859-7"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-7" http-equiv=Content-Type>
<META content="MSHTML 5.00.3013.2600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Anthony,</FONT></DIV>
<DIV><FONT face=Arial size=2>There is nothing to be confused.</FONT></DIV>
<DIV><FONT face=Arial size=2>Run the Exploration to understand</FONT></DIV>
<DIV><FONT face=Verdana size=2> </DIV><FONT face=Arial>
<DIV>x=</FONT><B><FONT size=2>Cum</B></FONT></FONT><FONT face=Arial><FONT
size=2>(</FONT><FONT size=2>1</FONT><FONT size=2>);per=</FONT><FONT
size=2>3</FONT></FONT><FONT face=Verdana size=2><FONT
face=Arial>;s1=<B>L</B>;s11=<B>H</B>;</FONT></DIV><FONT face=Arial>
<DIV>pS=</FONT><B><FONT size=2>TroughBars</B></FONT></FONT><FONT
face=Arial><FONT size=2>(s1,per,</FONT><FONT size=2>1</FONT><FONT
size=2>)==</FONT><FONT size=2>0</FONT></FONT><FONT face=Verdana size=2><FONT
face=Arial>;</FONT></DIV><FONT face=Arial>
<DIV>endt=</FONT><B><FONT size=2>LastValue</B></FONT></FONT><FONT
face=Arial><FONT size=2>(</FONT><B><FONT size=2>ValueWhen</B></FONT></FONT><FONT
face=Arial size=2>(pS,x));</FONT><FONT face=Verdana size=2><FONT
face=Arial>/*trough time*/</FONT></DIV></FONT><FONT face=Verdana size=2><FONT
face=Arial>
<DIV>pR=</FONT><B><FONT size=2>PeakBars</B></FONT></FONT><FONT face=Arial><FONT
size=2>(s11,per,</FONT><FONT size=2>1</FONT><FONT size=2>)==</FONT><FONT
size=2>0</FONT></FONT><FONT face=Verdana size=2><FONT face=Arial>;
</FONT></DIV><FONT face=Arial>
<DIV>endt1=</FONT><B><FONT size=2>LastValue</B></FONT></FONT><FONT
face=Arial><FONT size=2>(</FONT><B><FONT size=2>ValueWhen</B></FONT></FONT><FONT
face=Arial size=2>(pR,x));</FONT><FONT face=Verdana size=2><FONT
face=Arial>/*peak time*/</FONT></DIV></FONT><FONT face=Verdana size=2>
<DIV><FONT face=Arial>in=endt-endt1;</FONT></DIV><FONT face=Arial>
<DIV>Filter=</FONT><FONT size=2>1</FONT></FONT><FONT face=Verdana size=2><FONT
face=Arial>;</FONT></DIV><FONT face=Arial>
<DIV>NumColumns=</FONT><FONT size=2>3</FONT></FONT><FONT face=Verdana
size=2><FONT face=Arial>;</FONT></DIV>
<DIV><FONT face=Arial>Column0=endt;</FONT></DIV>
<DIV><FONT face=Arial><STRONG>Column2</STRONG>=in;</FONT></DIV>
<DIV><FONT face=Arial>Column1=endt1; </FONT></DIV><FONT face=Arial>
<DIV><STRONG>Column0Name</STRONG>=</FONT><FONT
size=2>"Troughtime"</FONT></FONT><FONT face=Verdana size=2><FONT
face=Arial>;</FONT></DIV><FONT face=Arial>
<DIV>Column1Name=</FONT><FONT size=2>"Peaktime"</FONT></FONT><FONT face=Verdana
size=2><FONT face=Arial>;</FONT></DIV><FONT face=Arial>
<DIV><STRONG>Column2Name</STRONG>=</FONT><FONT
size=2>"interval"</FONT></FONT><FONT face=Verdana size=2><FONT
face=Arial>;</FONT></DIV><FONT face=Arial>
<DIV>Buy=</FONT><FONT size=2>Cum</FONT><FONT size=2>(</FONT><FONT
size=2>1</FONT></FONT><FONT face=Verdana size=2><FONT
face=Arial>)==endt;</FONT></DIV><FONT face=Arial>
<DIV><STRONG>Sell</STRONG>=</FONT><B><FONT size=2>Cum</B></FONT></FONT><FONT
face=Arial><FONT size=2>(</FONT><FONT size=2>1</FONT><FONT face=Verdana
size=2></FONT><FONT face=Arial>)==endt1;</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2><FONT face=Arial>If for a stock interval>0,
then the most recent event is a trough,</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2><FONT face=Arial>if interval<0 thenthe most
recent event is a peak.</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2><FONT face=Arial>As you see in att. gif the last
detected peak is at A, then 5 troughs</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2><FONT face=Arial>followed (B, C, D, E,F) and the
last trough is at F.</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2><FONT face=Arial>D. T. </FONT></DIV>
<DIV></FONT> </DIV></BODY></HTML>
------=_NextPart_001_0010_01C14F7F.50A64780--
Attachment:
gif00209.gif
Attachment:
Description: "Description: GIF image"
|