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

[RT] GEN - digital pivots



PureBytes Links

Trading Reference Links

<x-html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Here is some code for "digital" fibo S/R pivots that another 
rter requested.&nbsp; It is an application of what MB did with yesterday's High 
and Low.&nbsp;  .ela will be sent on the next email to save bandwidth.&nbsp; 
They turn on and off when&nbsp;"price" passes the midpoint between two lines 
except for when price is between R1 and R2 or S1 and S2 in which case both lines 
are on since those lines are within 0.118 fibo points anyway.&nbsp; Also S3 or 
R3 will be on when price is below or above them.&nbsp; The input Pvt1(1) uses 
the standard pivot of (H+L+C)/3 and Pvt(0) uses the previous day's close for the 
reference.&nbsp; Format with "Point", scale to price.&nbsp; I think the code is 
correct, if not correct it, maybe improve it.&nbsp; The objective with doing it 
this way was to save screen space.&nbsp; It may not be your cup of tea.&nbsp; I 
prefer the contiguous lines, but to each his own.</FONT></DIV>
<DIV><FONT size=2>BobRoeske</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>{Resistance}</FONT></DIV>
<DIV><FONT size=2>{If Pvt1 = 1 then pivot = classical pivot, else pivot = 
yesterday's close}<BR>Inputs: 
k1(0.5),k2(0.618),k3(1.0),Pvt1(1);<BR>Vars:&nbsp;&nbsp; 
R3(0),R2(0),R1(0),Pvt(0),Rang(0),Near1(0),Near2(0);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>If Pvt1=1 
then<BR>Pvt=(HighD(1)+LowD(1)+CloseD(1))/3<BR>else<BR>Pvt = 
CloseD(1);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT 
size=2>Rang=HighD(1)-LowD(1);<BR>R3=Pvt+k3*Rang;<BR>R2=Pvt+k2*Rang;<BR>R1=Pvt+k1*Rang;<BR>Near1=(R1-Pvt)/2;<BR>Near2 
= (R3-R2)/2;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>IF (TrueHigh&gt;=Pvt and TrueLow&lt;=R1-Near1)Then 
Plot4(Pvt,"Pvt");<BR>IF (TrueHigh&gt;=Pvt+near1 and TrueLow&lt;=R1) Then 
Plot3(R1,"R1");<BR>If (TrueHigh&gt;=R1 and TrueLow&lt;=R2) Then 
Plot3(R1,"R1");<BR>If (TrueHigh&gt;=R1 and TrueLow&lt;=R2) Then 
Plot2(R2,"R2");<BR>If(TrueHigh&gt;=R2+Near2 and TrueLow&lt;=R3)Then 
Plot1(R3,"R3");<BR>If(TrueHigh&gt;=R2 and TrueLow&lt;=R3-Near2)Then 
Plot2(R2,"R2");<BR>If TrueLow&gt;=R3 then Plot1(R3,"R3");</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>{Support}</FONT></DIV>
<DIV><FONT size=2>{Use Pvt=1 for the classical pivot or use Pvt=0 for the Close 
pivot}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2><BR>Inputs: 
k1(0.5),k2(0.618),k3(1.0),Pvt1(1);<BR>Vars:&nbsp;&nbsp; 
S3(0),S2(0),S1(0),Pvt(0),Rang(0),Near1(0),Near2(0);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2><BR>If Pvt1=1 
then<BR>Pvt=(HighD(1)+LowD(1)+CloseD(1))/3<BR>else<BR>Pvt = 
CloseD(1);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT 
size=2>Rang=HighD(1)-LowD(1);<BR>S3=Pvt-k3*Rang;<BR>S2=Pvt-k2*Rang;<BR>S1=Pvt-k1*Rang;<BR>Near2=(S2-S3)/2;<BR>Near1=(Pvt 
-S1)/2;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>IF (TrueHigh&gt;=S1+ Near1 and TrueLow&lt;=Pvt)Then 
Plot1(Pvt,"Pvt");<BR>IF (TrueHigh&gt;=S1 and TrueLow&lt;=Pvt-Near1) Then 
Plot2(S1,"S1");<BR>If (TrueHigh&gt;=S2 and TrueLow&lt;=S1) Then 
Plot2(S1,"S1");<BR>If (TrueHigh&gt;=S2 and TrueLow&lt;=S1) Then 
Plot3(S2,"S2");<BR>If(TrueHigh&gt;=S3+near2 and TrueLow&lt;=S2)Then 
Plot3(S2,"S2");<BR>If(TrueHigh&gt;=S3 and TrueLow&lt;=S2-Near2)Then 
Plot4(S3,"S3");<BR>If TrueHigh&lt;=S3&nbsp; then Plot4(S3,"S3");</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV></BODY></HTML>
</x-html>
Attachment Converted: "f:\eudora\attach\PIVOTS1.gif"