PureBytes Links
Trading Reference Links
|
<SPAN
class=644383604-24022004>Ace
<SPAN
class=644383604-24022004>
This
is what I ended up using.
<SPAN
class=644383604-24022004>
Make
sure you close your files ASAP after using them both when reading and writing to
avoid 'difficult-to-de-bug' problems :-))
<SPAN
class=644383604-24022004>
good
luck
<SPAN
class=644383604-24022004>PeterJ
<FONT face=Arial color=#0000ff
size=2>========WRITING=============================
/// your custom AFL code
to determine your variable goes here,
EMAparam
//// save EMAparam value for use by
other indicator windowsfh = fopen("EMAparam.txt",
"w");if(fh){ fputs( NumToStr(EMA,1.0,False),
fh); fclose(fh); // write to
disk}else{ printf("Error opening
EMAparam.txt");}
/// balance of your
code......
========READING=============================
/// to read in stored parameter use this code
//// get EMA param value from txt fileEMAparam = 1; // initialisefh
= fopen("EMAparam.txt", "r");if(fh){ while(NOT
feof(fh)) { EMAparam = StrToNum( fgets(fh) ); // read
EMAparam } fclose(fh);}else{ printf("Error
opening EMAparam.txt");}
/// etc
<FONT
face=Tahoma size=2>-----Original Message-----From: dingo
[mailto:dingo@xxxxxxxxxxxx] Sent: Tuesday, 24 February 2004 3:07
pTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker]
File Reading/Writing
<FONT face=Arial
color=#0000ff size=2>Yes - check out the posts around 1/28/2004 with subject
of "Can AB pass parameter values between
indicators?"
<FONT face=Arial
color=#0000ff size=2>
<FONT face=Arial
color=#0000ff size=2>Make sure the read the one on 2/5/2004 for the
final solution.
<FONT face=Arial
color=#0000ff size=2>
<FONT face=Arial
color=#0000ff size=2>d
From: acesheet [mailto:acesheet@xxxxxxxxx]
Sent: Monday, February 23, 2004 10:53 PMTo:
amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] File
Reading/Writing
Can fputs and fgets, et al only be used in AA AFL scripts or
is there some way to trigger it in Indicator Builder?I'm looking
for a way to link several Indicator Builder scripts together so they use
the same lookback period.I hoped I could write the period sto a file
and then read them out of the file in the other windows. Has anyone
tackled the problem of linking several indicator windows
together?Thanks.-ace
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.
|