PureBytes Links
Trading Reference Links
|
/*AFL FORMULA*/
BUYD=cross(stochd(),30);
SELLD=-ref(buyd,-13);
e2=exrem(BUYD,SELLD);
graph1=e2;
graph1style=2;
graph1barcolor=5;
e1=-ref(e2,-13);
graph0=e1;
GRAPH0STYLE=2;
/*SCRIPT FORMULA*/
EnableScript("VBScript");
buy = cross(stochd(),30);
<%
N = 13
buy = AFL( "buy" )
sell = AFL("buy")
barssincebuy = -1
for i = 0 to UBound( buy )
sell( i ) = 0
if barssincebuy = -1 then
if buy( i ) = 1 then
barssincebuy = 0
end if
else
barssincebuy = barssincebuy + 1
if barssincebuy = N then
sell( i ) = 1
barssincebuy = -1
end if
end if
next
AFL("sell") = sell
%>
buy = exrem( buy, sell );
graph0=sell;
GRAPH0STYLE=2;
graph1=buy;
graph1style=2;
graph1barcolor=5;
Take a look.
Dimitris Tsokakis
P. S. Sorry for changing the happy condition
Close == HHV( close, 250 );
I am in a 23 months bearish market and I should wait for
years to meet such a condition.
Thank you for the example.
------=_NextPart_001_0005_01C121DC.025919C0
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 size=2>Dear Jon,</FONT></DIV>
<DIV><FONT size=2>Thank you for explanation.</FONT></DIV>
<DIV><FONT size=2>As I see, in your example, buy-sell are pairs with a 5-day
distance.<BR>If you overcome one buy, you will overcome the respective sell
also.</FONT></DIV>
<DIV><FONT size=2>This is quite strange for me, from the trading point of
view.</FONT></DIV>
<DIV><FONT size=2>Anyway, it is quite tempty and here is my point of
view:</FONT></DIV>
<DIV><FONT size=2>(I just change 5 to 13, to have the series you describe,
based</FONT></DIV>
<DIV><FONT size=2>on a real example).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>In graph "DETECTION BUY-SELL" from A to C we have
your</FONT></DIV>
<DIV><FONT size=2>B-B-S-B-S-S combination.</FONT></DIV>
<DIV><FONT size=2>Below you see removal based on AFL function</FONT><FONT
size=2> and the script removal.</FONT></DIV>
<DIV><FONT size=2>The solution is the same, point to point, and perhaps it is
the</FONT></DIV>
<DIV><FONT size=2>same thing.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>/*AFL FORMULA*/</FONT></DIV>
<DIV> <FONT
size=2>BUYD=cross(stochd(),30);<BR>SELLD=-ref(buyd,-13);<BR>e2=exrem(BUYD,SELLD);<BR>graph1=e2;<BR>graph1style=2;<BR>graph1barcolor=5;<BR>e1=-ref(e2,-13);<BR>graph0=e1;<BR>GRAPH0STYLE=2;<BR></FONT></DIV>
<DIV><FONT size=2>/*SCRIPT FORMULA*/</FONT></DIV>
<DIV><FONT size=2>EnableScript("VBScript");<BR>buy =
cross(stochd(),30);<BR><%<BR>N = 13 <BR>buy = AFL( "buy" )<BR>sell =
AFL("buy") <BR>barssincebuy = -1<BR>for i = 0 to UBound( buy )<BR> sell( i
) = 0<BR> if barssincebuy = -1 then <BR> if buy( i
) = 1 then <BR> barssincebuy = 0<BR> end
if<BR> else<BR> barssincebuy = barssincebuy +
1<BR> if barssincebuy = N
then<BR> sell( i ) =
1<BR> barssincebuy = -1<BR> end
if<BR> end if</FONT></DIV>
<DIV><FONT size=2>next</FONT></DIV>
<DIV><FONT size=2>AFL("sell") = sell</FONT></DIV>
<DIV><FONT size=2>%></FONT></DIV>
<DIV><FONT size=2>buy = exrem( buy, sell );</FONT></DIV>
<DIV><FONT
size=2>graph0=sell;<BR>GRAPH0STYLE=2;<BR>graph1=buy;<BR>graph1style=2;<BR>graph1barcolor=5;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Take a look.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Dimitris Tsokakis</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>P. S. Sorry for changing the happy condition</FONT></DIV>
<DIV><FONT size=2>Close == HHV( close, 250 ); </FONT></DIV>
<DIV><FONT size=2>I am in a 23 months bearish market and I should wait
for</FONT></DIV>
<DIV><FONT size=2>years to meet such a condition.</FONT></DIV>
<DIV><FONT size=2>Thank you for the example.</FONT></DIV></BODY></HTML>
------=_NextPart_001_0005_01C121DC.025919C0--
Attachment:
gif00113.gif
Attachment:
Description: "Description: GIF image"
|