Rank: Newbie
Groups: Registered, Registered Users Joined: 3/15/2008(UTC) Posts: 5
|
Hi all,
I think I am begining to understand how to do some programs. I understand the program on the moving averages in the MDK book. However, I have know clue [censored] to use the MSFL in a program. I cannot get one inialized or started. I do not know what to put in the initialization fields. Does anyone have some programs that they could post so I could have some examples. I looked at the Custom Index one in the forum and it is not enough to get me started. It would be nice if someone had somthing that referenced a series of dates in th past and accessed the data for the dates.
Any help would be appreciated,
Flash
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/28/2005(UTC) Posts: 276 Location: Salt Lake City, UT
|
When you purchased the MDK, you got an MSX and MSFL sample. The MSX sample is a Moving Average that uses data passed in from MetaStock, does the moving average, and passes the result back to be charted. The MSFL is an example to show you how to read the data files. You can combine the two if you need MSFL and to be able to chart data.
I'm a bit confused on what it is your asking. You use MSFL as though you mean MetaStock Formula Language (the one built into MetaStock. That doesn't require the MDK.) but then say program in general as though you want to write your own app that uses data, which is the other MSFL, MetaStock File Library.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 3/15/2008(UTC) Posts: 5
|
Hi Brandon,
Thanks for the reply.
I am trying to write a formula that goes into the past and calculates the % change in the closing price between two points. I need to be able to access all closing prices between those points. I want to do this for about four years of data. So, there will be various gaps between the sets of data points. Supose I had a signal that occured on 1Jan07 and ended 18Jan07 and another that stared on 2FEB07 and ended 03MAR07 another that started on 5JUL 07 and ended on 3AUG 07 etc.....
I need to be able to get at every closing price between 1JAN07 and 18JAN07. Then, I need to be able to get at every closing price between 2FEB07 and 03MAR07 etc..........
I have not been able to do this because I cannot seem to mark the data between the two points.
In the original post, I was referring to the MetaStock File Library. I do not know how to use the functions or even get them initialized. I would appreciate if some one could post some examples that use the file library. I need to see how to get into to it and how to get out of it. For example, the initialize function:
int MSFL1_Initialize(LPCSTR pszAppName, LPCTR pszUserName, int iInterfaceVersion)
psZAppname-> a string that contains the applications name. What name is that?
pszUserName-> a string that contains the user name. What name is that?
I was going to try to use the MSFL2_ReadMulitpleRecsByDates to help capture all the closing prices between two points in the past. If anyone has any suggestions please let me know.
Thanks,
Flash
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/28/2005(UTC) Posts: 276 Location: Salt Lake City, UT
|
You could have your MSX DLL make a temp file or something that keeps track of the points. Or the slow route would be to calculate them again, each time.
As for your MSFL questions, the app name and user name can be whatever you make up. They're just to identify apps from each other when they access a folder of data. Put anything in them you want that makes sense to you.
For reading, make sure that you've locked the security and the folder so they can't be written. Otherwise you'll get an error when you try to read.
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.