PureBytes Links
Trading Reference Links
|
I've played with AlertIf a good bit and always got strange results and
couldn't get TJ to understand what I was trying to say so I quit.
Some of the strange stuff was trying to get the alert window to show the
alerts on a consistent basis - One day they would show and then after a
day or two I couldn't get them to show after changing the look back
variable (tmpLBDays) .
If you get some satisfaction I would sure appreciate knowing how you did
it!
In the email archives at:
<http://groups.yahoo.com/group/amibroker/messages/>
http://groups.yahoo.com/group/amibroker/messages/ look for messages
22426, 22429, 22432, 22436 22439 22445 22468 22469 22475
The image below will give you other message numbers since August that
pertain to the Alertif:
Here is where I stopped:
/*
Your code here
*/
ApplyStop(2,1,7,0);
/* The Equity(1) statement should always be included AND
Follow the ApplyStop statement in order for the AlertIF
statements == 2, 3 and 4 to work
*/
Equity(1);
/* Be sure AND modify the variable tmpLBDays below to suit
your needs. If looking back is NOT desired then set to 1
*/
tmpLBDays = 3;
AlertIf( Buy, "", "Buy Alert", 1, 1+2, tmpLBDays );
/* The Sell == 1 in the line below is so that the "Sell Alert" message
will only be triggered by the Cross(StochRsi, 83) Signal. If we
left it without the == 1 part then we would get the "Sell Alert"
message not only with the signal but also with each of the
AlertIf( Sell == ..) messages.
The same explanation goes with the AlertIf( Cover ..) statements.
*/
AlertIf( Sell == 1, "", "Sell Alert", 2, 1+2, tmpLBDays );
AlertIf( Sell == 2, "", "Stopped out by max. loss", 4, 1+2, tmpLBDays );
AlertIf( Sell == 3, "", "Stopped out by profit target", 4, 1+2,
tmpLBDays );
AlertIf( Sell == 4, "", "Stopped out by trailing stop", 4, 1+2,
tmpLBDays );
AlertIf( Short, "", "Short Alert", 3, 1+2, tmpLBDays );
AlertIf( Cover == 1, "", "Cover Alert", 4, 1+2, tmpLBDays );
AlertIf( Cover == 2, "", "Stopped out by max. loss", 4, 1+2, tmpLBDays
);
AlertIf( Cover == 3, "", "Stopped out by profit target", 4, 1+2,
tmpLBDays );
AlertIf( Cover == 4, "", "Stopped out by trailing stop", 4, 1+2,
tmpLBDays );
dingo
-----Original Message-----
From: akaloustian [mailto:ara1@x...]
Sent: Monday, October 28, 2002 12:08 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Alertif()
I am using Alertif() with stochastics and CCI...
Getting what seems like almost random alerts that do not relate with
the signals triggering the alerts and also being displayed.
The problems is of course most likely my implementation.... ,but it's
too strange to even quantify it well at this time...
Has anyone got some experience with alertif() ... good or bad?
Ara
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/M=219695.2310151.3725769.1980433/D=egroupweb/S=1705
632198:HM/A=1226184/R=0/*http://ad.doubleclick.net/jump/N879.ameritrade.
yahoo/B1054521.11;sz=300x250;adc=ZHS;ord=1035824873?>
<http://us.adserver.yahoo.com/l?M=219695.2310151.3725769.1980433/D=egrou
pmail/S=:HM/A=1226184/rand=783264693>
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
------=_NextPart_001_01D5_01C27E84.2796C3D0
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii"=
>
<TITLE>Message</TITLE>
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial color=3D#0000ff>
<DIV><SPAN class=3D514334217-28102002><FONT face=3D"Courier New"><FONT=20
size=3D2>Ara<SPAN class=3D694181418-28102002>:</SPAN></FONT></FONT></SPAN><=
/DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3D"Courier New"><FONT size=
=3D2><SPAN=20
class=3D694181418-28102002></SPAN></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial size=3D2>I've play=
ed with=20
AlertIf a good bit and always got strange results and couldn't get TJ to=20
understand what I was trying to say so I quit.</FONT></SPAN></DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial size=3D2>Some of t=
he strange=20
stuff was trying to get the alert window to show the alerts on a consistent=
=20
basis - One day they would show and then after a day or two I couldn't get =
them=20
to show after changing the look back variable (tmpLBDays) . =20
</FONT></SPAN></DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial size=3D2>If you ge=
t some=20
satisfaction I would sure appreciate knowing how you did it!</FONT></SPAN><=
/DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff><F=
ONT=20
size=3D2>In the email archives at: </FONT><A=20
href=3D"http://groups.yahoo.com/group/amibroker/messages/"><FONT=20
size=3D2>http://groups.yahoo.com/group/amibroker/messages/</FONT></A><FONT=
=20
size=3D2> look for messages 22426, 22429, 22432, 22436 22439 22445 224=
68=20
22469 22475</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff si=
ze=3D2>The=20
image below will give you other message numbers since August that=
=20
pertain to the Alertif:</FONT></SPAN></DIV>
<DIV><SPAN class=3D514334217-28102002></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff si=
ze=3D2><IMG=20
alt=3D"" hspace=3D0 src=3D"cid:694181418@xxxx" align=3Dbaseline=20
border=3D0></FONT></SPAN></DIV>
<DIV><SPAN class=3D514334217-28102002><FONT size=3D2></FONT></SPAN> </=
DIV>
<DIV><SPAN class=3D514334217-28102002>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff si=
ze=3D2>Here=20
is where I stopped:</FONT></SPAN></DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff si=
ze=3D2>/*=20
</FONT></SPAN></DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff=20
size=3D2> Your code here </FONT></SPAN></DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#0000ff=20
size=3D2>*/</FONT></SPAN></DIV><SPAN class=3D514334217-28102002>
<DIV><BR><FONT face=3DArial color=3D#0000ff size=3D2>ApplyStop(2,1,7,0);</F=
ONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>/* The Equity(1) statement=
should=20
always be included AND <BR> Follow the ApplyStop statement in o=
rder=20
for the AlertIF<BR> statements =3D=3D 2, 3 and 4 to=20
work<BR>*/</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>Equity(1); </FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>/* Be sure AND modif=
y the=20
variable tmpLBDays below to suit <BR> your needs. If look=
ing=20
back is NOT desired then set to 1<BR>*/</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>tmpLBDays =3D 3;</FONT></D=
IV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>AlertIf( Buy, "", "Buy Ale=
rt", 1,=20
1+2, tmpLBDays );</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>/* The Sell =3D=3D 1 in th=
e line below is=20
so that the "Sell Alert" message<BR> will only be triggered by =
the=20
Cross(StochRsi, 83) Signal. If we <BR> left it without the =3D=
=3D 1 part=20
then we would get the "Sell Alert" <BR> message not only with t=
he=20
signal but also with each of the <BR> AlertIf( Sell =3D=3D ..)=
=20
messages.</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2> The same expl=
anation=20
goes with the AlertIf( Cover ..) statements.<BR>*/</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>AlertIf( Sell =3D=3D 1, ""=
, "Sell Alert",=20
2, 1+2, tmpLBDays );<BR>AlertIf( Sell =3D=3D 2, "", "Stopped out by max. lo=
ss", 4,=20
1+2, tmpLBDays );<BR>AlertIf( Sell =3D=3D 3, "", "Stopped out by profit tar=
get", 4,=20
1+2, tmpLBDays );<BR>AlertIf( Sell =3D=3D 4, "", "Stopped out by trailing s=
top", 4,=20
1+2, tmpLBDays );</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>AlertIf( Short, "", "Short=
Alert", 3,=20
1+2, tmpLBDays );</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2>AlertIf( Cover =3D=3D 1, "=
", "Cover=20
Alert", 4, 1+2, tmpLBDays );<BR>AlertIf( Cover =3D=3D 2, "", "Stopped out b=
y max.=20
loss", 4, 1+2, tmpLBDays );<BR>AlertIf( Cover =3D=3D 3, "", "Stopped out by=
profit=20
target", 4, 1+2, tmpLBDays );<BR>AlertIf( Cover =3D=3D 4, "", "Stopped out =
by=20
trailing stop", 4, 1+2, tmpLBDays );</FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<DIV></SPAN><SPAN class=3D514334217-28102002><FONT face=3DArial color=3D#00=
00ff=20
size=3D2>dingo</FONT></SPAN></DIV></SPAN></DIV></FONT></DIV>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft><FO=
NT=20
face=3DTahoma size=3D2>-----Original Message-----<BR><B>From:</B> akalous=
tian=20
[mailto:ara1@x...] <BR><B>Sent:</B> Monday, October 28, 2002 12:08=
=20
PM<BR><B>To:</B> amibroker@xxxxxxxxxxxxxxx<BR><B>Subject:</B> [amibroker]=
=20
Alertif()<BR><BR></FONT></DIV><TT>I am using Alertif() with stochastics a=
nd=20
CCI...<BR><BR>Getting what seems like almost random alerts that do not re=
late=20
with <BR>the signals triggering the alerts and also being=20
displayed.<BR><BR>The problems is of course most likely my implementation=
....=20
,but it's <BR>too strange to even quantify it well at this time...<BR><BR=
>Has=20
anyone got some experience with alertif() ... good or=20
bad?<BR><BR>Ara<BR><BR></TT><BR><BR><TT>Post=20
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx <BR>(Web page=
: <A=20
href=3D"http://groups.yahoo.com/group/amiquote/messages/)">http://groups.=
yahoo.com/group/amiquote/messages/)</A><BR><BR>Check=20
group FAQ at: <A=20
href=3D"http://groups.yahoo.com/group/amibroker/files/groupfaq.html">http=
://groups.yahoo.com/group/amibroker/files/groupfaq.html</A></TT>=20
<BR><BR><TT>Your use of Yahoo! Groups is subject to the <A=20
href=3D"http://docs.yahoo.com/info/terms/">Yahoo! Terms of Service</A>.</=
TT>=20
<BR></BLOCKQUOTE></BODY></HTML>
------=_NextPart_001_01D5_01C27E84.2796C3D0--
Attachment:
Description: ""
|