i.e. fh = fopen( "C:\\alerts.csv", "a");
Regards,
Bob
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of Mark & Jean Petereit
Sent: Tuesday, May 02, 2006 4:13 AM
To: [email protected]
Subject: [amibroker] Re: Writing "alert" file
Yes, I understand that. What I'm not sure of is exactly where to
place the code in my AFL or how to trigger it. I currently have
something similar to the following, but it's not giving me the
desired results:
// Begin Code Snippet
AlertIf( Buy, "", "Alert: "+Name(), 1 );
if (Buy=True)
{
fh = fopen( "C:\alerts.csv", "a");
if( fh )
{
fputs( Name()+","+DateTime()
+","+Close+","+High+"\n", fh );
fclose(fh);
}
else
{
printf("Error opening file");
}
}
// End Code Snippet
The alerts are showing up in Amibroker's alert window just fine. But
the alerts.csv file is never being appended.
--- In [email protected], "Ara Kaloustian" <[EMAIL PROTECTED]> wrote:
>
> if you open the file with an "a" instead of "w", AFL will append
file
>
> ----- Original Message -----
> From: "Mark & Jean Petereit" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Monday, May 01, 2006 7:49 PM
> Subject: [amibroker] Writing "alert" file
>
>
> > I know how to use fopen, fputs, fclose. But is there any trick to
> > programming AFL to append a line to a text file for every Alert
that
> > is triggered?
> >
> >
> >
> >
> >
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
SPONSORED LINKS
| Investment management software | Real estate investment software | Investment property software |
| Software support | Real estate investment analysis software | Investment software |
YAHOO! GROUPS LINKS
- Visit your group "amibroker" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
