PureBytes Links
Trading Reference Links
|
You can create files from an exploration using the AddLineToFile() shown
below. You need to define the PathFilename to point to where you want
the file to end up. You format the msg to contain whatever you need to
send to the file. Normally this would add a line to the file for each
ticker explored but you can call this function conditionally to only add
text to the file when you need it, for example to add an extra line at
the start of the the exploration you would addThis:
if( Status("stocknum") == 0 ) AddLineToFile(...);
I use this technique to create include files that can be included/shared
by any system regardless of which DB it uses. This way you can create
afl code that changes dynamically depending on conditions found by the
Exploration.
good luck,
herman
function AddLineToFile( PathFilename, Msg )
{
fh = 0;
if ( Msg != "" )
{
fn = PathFilename;
fh = fopen( Fn , "a" );
if ( fh == 0 ) fh = fopen( fn, "w" );
if ( fh )
{
fputs( Msg + "\n", fh );
fclose( fh );
}
else
{
PopupWindow( "Cannot open File:\n" + Fn +"\n\nIs it in use
by another program?", "FILE OPERATION", 10 );
}
}
return fh;
}
bistrader wrote:
> I would like to create a csv file of an afls' exploration. Does anyone have an example?
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>
>
>
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
amibroker-digest@xxxxxxxxxxxxxxx
amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|