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

[amibroker] Re: ascii to metastock



PureBytes Links

Trading Reference Links

Look at Graham's code in AFL Library:

http://www.amibroker.com/library/detail.php?id=327&hilite=fputs

The code I posted is based on the above, with a few tweaks to get the data overwriting properly, to work with Watch Lists and to get MS format. You will need to:

1) replace periodicity code "D" with "I" (or remove this altogether, depending on which version of MS you have)

2) add "time string" variables: r, e, n

3) add two "time string" lines after "date string":

ts = StrFormat("%02.0f:%02.0f:%02.0f,", r[ i ],e[ i ],n[ i ] ); 
fputs( ts, fh );

In case you want to have 4-digit year replace:

y = Year()%100;

with

y = Year();

If you look closer at both examples you should be able to figure out how all this works.

The code with % signs is C++ printf() specifier:

http://www.cplusplus.com/reference/clibrary/cstdio/printf.html

Please keep in mind that AFL doesn't support integers, that's why everything is coded as a "float".

Lester

--- In amibroker@xxxxxxxxxxxxxxx, "cas" <darshan_age@xxx> wrote:
>
>   SIR,
> THANK YOU VERY MUSH FOR THE CODE
> PLS ONE MORE REQUEST IF I WANT TO CONVERT INTRA DAY DATA FROM ASCII TO METASOCK ....WHAT LINES I HAVE TO ADD...PLS HELP THANK YOU 




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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
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:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto: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/