PureBytes Links
Trading Reference Links
|
<FONT face=Arial color=#0000ff
size=2>Mickey,
Here
is a code snip I use for audible alerts on up to 3 different trend lines. You
will need to adjust the location of your sound files or make adjustments to
email the alert rather than hear it. When you draw the line name it s1, s2, or
s3. Simply add the code to what ever indicator you wish to plot lines
on...
<FONT face=Arial color=#0000ff
size=2>
Regards,
Jayson
Study<FONT color=#282828
size=2>("s1"<FONT color=#282828
size=2>,1<FONT color=#282828
size=2>);
Study<FONT color=#282828
size=2>("s2"<FONT color=#282828
size=2>,1<FONT color=#282828
size=2>);
Study<FONT color=#282828
size=2>("s3"<FONT color=#282828
size=2>,1<FONT color=#282828
size=2>);
Buy<FONT
color=#0000ff>=Cross<FONT
size=2>(C, <FONT
size=2>Study("s1"<FONT
size=2>,1<FONT color=#282828
size=2>));
Sell<FONT
color=#0000ff>=Cross<FONT
size=2>(Study(<FONT
size=2>"s1",1),
C<FONT
face=Arial color=#0000ff>);
Buy1=<FONT
color=#0000ff>Cross(<FONT
size=2>C<FONT
size=2>, Study(<FONT
size=2>"s2",1<FONT
color=#282828 size=2>));
Buy2=<FONT
color=#0000ff>Cross(<FONT
size=2>C<FONT
size=2>, Study(<FONT
size=2>"s3",1<FONT
color=#282828 size=2>));
Sell1=<FONT
color=#0000ff>Cross(<FONT
size=2>Study("s2"<FONT
size=2>,1), <FONT
size=2>C<FONT face=Arial
color=#0000ff>);
Sell2=<FONT
color=#0000ff>Cross(<FONT
size=2>Study("s3"<FONT
size=2>,1), <FONT
size=2>C<FONT face=Arial
color=#0000ff>);
sound= <FONT face=Arial
color=#0000ff size=2>"SOUND g:\\DOWNLOADS\\Amibroker\\strategy
alert.wav"<FONT face=Arial
color=#0000ff>;
sound2= <FONT face=Arial
color=#0000ff size=2>"SOUND g:\\DOWNLOADS\\Amibroker\\siren.wav"<FONT
color=#282828 size=2>;
AlertIf<FONT color=#282828
size=2>(Buy<FONT
color=#282828 size=2>, sound2, <FONT color=#0000ff
size=2>WriteVal(<FONT
size=2>C<FONT color=#282828
size=2>,3.2<FONT color=#282828
size=2>)+ " Violation"<FONT
color=#282828 size=2>, 1<FONT
color=#282828 size=2>,1<FONT
color=#282828 size=2>+2<FONT
color=#282828 size=2>+4<FONT
color=#282828 size=2>+8<FONT
color=#282828 size=2>,1<FONT
color=#282828 size=2> );<FONT color=#0000ff
size=2>
AlertIf<FONT color=#282828
size=2>(Buy1, sound2, WriteVal<FONT
color=#282828 size=2>(C<FONT
face=Arial>,<FONT color=#ff00ff
size=2>3.2)+ <FONT color=#ff00ff
size=2>" s2 Violation", <FONT
color=#ff00ff size=2>5,<FONT
color=#ff00ff size=2>1+<FONT
color=#ff00ff size=2>2+<FONT
color=#ff00ff size=2>4+<FONT
color=#ff00ff size=2>8,<FONT
color=#ff00ff size=2>1
);
AlertIf<FONT color=#282828
size=2>(Sell<FONT
color=#282828 size=2>, sound,<FONT color=#0000ff
size=2>WriteVal(<FONT
size=2>C<FONT color=#282828
size=2>,3.2<FONT color=#282828
size=2>)+ " Violation"<FONT
color=#282828 size=2>, 2<FONT
color=#282828 size=2>,1<FONT
color=#282828 size=2>+2<FONT
color=#282828 size=2>+4<FONT
color=#282828 size=2>+8<FONT
color=#282828 size=2>,1<FONT
color=#282828 size=2> );<FONT color=#0000ff
size=2>
AlertIf<FONT color=#282828
size=2>(Sell1, sound, WriteVal<FONT
color=#282828 size=2>(C<FONT
face=Arial>,<FONT color=#ff00ff
size=2>3.2)+ <FONT color=#ff00ff
size=2>" s2 Violation", <FONT
color=#ff00ff size=2>6,<FONT
color=#ff00ff size=2>1+<FONT
color=#ff00ff size=2>2+<FONT
color=#ff00ff size=2>4+<FONT
color=#ff00ff size=2>8,<FONT
color=#ff00ff size=2>1
);
AlertIf<FONT color=#282828
size=2>(Buy2, sound2, WriteVal<FONT
color=#282828 size=2>(C<FONT
face=Arial>,<FONT color=#ff00ff
size=2>3.2)+ <FONT color=#ff00ff
size=2>" s3 Violation", <FONT
color=#ff00ff size=2>7,<FONT
color=#ff00ff size=2>1+<FONT
color=#ff00ff size=2>2+<FONT
color=#ff00ff size=2>4+<FONT
color=#ff00ff size=2>8,<FONT
color=#ff00ff size=2>1
);
AlertIf<FONT color=#282828
size=2>(Sell2, sound, WriteVal<FONT
color=#282828 size=2>(C<FONT
face=Arial>,<FONT color=#ff00ff
size=2>3.2)+ <FONT color=#ff00ff
size=2>" s3 Violation", <FONT
color=#ff00ff size=2>8,<FONT
color=#ff00ff size=2>1+<FONT
color=#ff00ff size=2>2+<FONT
color=#ff00ff size=2>4+<FONT
color=#ff00ff size=2>8,<FONT
color=#ff00ff size=2>1
);
<FONT face=Arial
color=#0000ff>
<FONT face=Tahoma
size=2>-----Original Message-----From: mickeyamelinckx
[mailto:mickeyA@xxxxxxxxxxx]Sent: Monday, February 23, 2004 12:16
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] quick
way to enter trendline alertsI see you can use Alerts
in AB which could then be mentioned by e-mail.But how could I on a fair
quick way add/remove trenline alerts. I know we can label the lines we
drew but what about the code we need to trigger an alert. And does this mean
we need to create an separate indicator for each alert we wnat to create
?Thanks in acvance.M.Send BUG REPORTS to
bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|