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

RE: [amibroker] File Reading/Writing



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>M,
You 
need to verify where in fact the wav files are stored and point the code to that 
location. Note the \\ instead of a single \. I use this code every day on 
interday 1-5 min charts and know it works...
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: mickeyamelinckx 
[mailto:mickeyA@xxxxxxxxxxx]Sent: Monday, February 23, 2004 11:47 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
quick way to enter trendline alertsThanksBut I 
added it to one of my candle stick charts intra day (see code below) and 
adjusted the place and wave file.  I also tryed to draw some trenlines 
and named them by double clicking on the lines and add s1, s2,s3 in STUDY 
ID.  But the Alerts don't seem to work !My be it is because the wav 
file in in a sub dir \program files\Amibroker and this dir has a name with a 
space in between ?  Or is it because I use intra day data ?  BTW 
is there a way to make alerts on 30 min data while viewing 10 min data 
?Thanks for the 
helpMPlot(C,"O="+WriteVal(O)+",H="+WriteVal(H)+",L="+WriteVal(L)+",C="+WriteVal(C) 
,colorGreen,styleCandle);Plot(MA(Close,2),"MA2",colorLightOrange,styleDots);Plot(MA(Close,5),"MA5",colorBlue,styleLine);Plot(BBandTop(Close,15,2),"BB",colorWhite,styleLine);Plot(BBandBot(Close,15,2),"BB",colorWhite,styleLine);/* 
3 Trenline Alert code Name trendline as S1 S2 S3   
*/Study("s1",1);Study("s2",1);Study("s3",1);Buy=Cross(C, 
Study("s1",1));Sell=Cross(Study("s1",1), C);Buy1=Cross(C, 
Study("s2",1));Buy2=Cross(C, Study("s3",1));Sell1=Cross(Study("s2",1), 
C);Sell2=Cross(Study("s3",1), C);/* Sound Alert 
files*/AlertIf(Buy, "SOUND C:\\Program Files\\Amibroker\\kpp.wav", 
WriteVal(C,3.2)+ " Violation", 1,1+2+4+8,1 );AlertIf(Buy1, "SOUND 
C:\\Program Files\\Amibroker\\kpp.wav" , WriteVal(C,3.2)+ " s2 Violation", 
5,1+2+4+8,1 );AlertIf(Sell, "SOUND C:\\Program 
Files\\Amibroker\\kpp.wav",WriteVal(C,3.2)+ " Violation", 2,1+2+4+8,1 
);AlertIf(Sell1, "SOUND C:\\Program Files\\Amibroker\\kpp.wav", 
WriteVal(C,3.2)+ " s2 Violation", 6,1+2+4+8,1 );AlertIf(Buy2, "SOUND 
C:\\Program Files\\Amibroker\\kpp.wav", WriteVal(C,3.2)+ " s3 Violation", 
7,1+2+4+8,1 );AlertIf(Sell2, "SOUND C:\\Program 
Files\\Amibroker\\kpp.wav",  WriteVal(C,3.2)+ " s3 Violation", 
8,1+2+4+8,1 );--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" 
<jcasavant@xxxx> wrote:> 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...> > Regards,> Jayson> > 
Study("s1",1);> Study("s2",1);> Study("s3",1);> > 
Buy=Cross(C, Study("s1",1));> Sell=Cross(Study("s1",1), C);> 
Buy1=Cross(C, Study("s2",1));> Buy2=Cross(C, Study("s3",1));> 
Sell1=Cross(Study("s2",1), C);> Sell2=Cross(Study("s3",1), C);> 
> sound= "SOUND g:\\DOWNLOADS\\Amibroker\\strategy alert.wav";> 
sound2= "SOUND g:\\DOWNLOADS\\Amibroker\\siren.wav";> > 
AlertIf(Buy, sound2, WriteVal(C,3.2)+ " Violation", 1,1+2+4+8,1 );> 
AlertIf(Buy1, sound2, WriteVal(C,3.2)+ " s2 Violation", 5,1+2+4+8,1 
);> AlertIf(Sell, sound,WriteVal(C,3.2)+ " Violation", 2,1+2+4+8,1 
);> AlertIf(Sell1, sound, WriteVal(C,3.2)+ " s2 Violation", 
6,1+2+4+8,1 );> AlertIf(Buy2, sound2, WriteVal(C,3.2)+ " s3 
Violation", 7,1+2+4+8,1 );> AlertIf(Sell2, sound, WriteVal(C,3.2)+ " 
s3 Violation", 8,1+2+4+8,1 );> > > -----Original 
Message-----> From: mickeyamelinckx [mailto:mickeyA@xxxx]> Sent: 
Monday, February 23, 2004 12:16 AM> To: amibroker@xxxxxxxxxxxxxxx> 
Subject: [amibroker] quick way to enter trendline alerts> > 
> I 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@xxxx> Send SUGGESTIONS to suggest@xxxx> 
-----------------------------------------> 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> 
> >       Yahoo! Groups 
Sponsor>             
ADVERTISEMENT> > > > > > 
----------------------------------------------------------------------------> 
----> Yahoo! Groups Links> >   a.. To visit your 
group on the web, go to:>   <A 
href="">http://groups.yahoo.com/group/amibroker/> 
>   b.. To unsubscribe from this group, send an email 
to:>   amibroker-unsubscribe@xxxxxxxxxxxxxxx> 
>   c.. Your use of Yahoo! Groups is subject to the Yahoo! 
Terms of Service.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 Sponsor


ADVERTISEMENT




Click Here















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.