Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Hi nadero, Welcome to the Fourm. nadero wrote:I know the syntax of MetaStock functions and also have some practice with C++ (not a professional one, but as a hobby). Of course I have also experience using MetaStock.
Now, I am learning C# and I would like to practice my new skills with MetaStock, so I need to learn about the metastock files, how to call its functions, etc. Could someone give me some guidelines for the beginning (resources, references, etc.) ? You can write functions inside MetaStock using the MetaStock Formula Language; which is a simple programming language designed for TRADERS to add functionality to their charts, exploratons etc. The langauge has a very simple syntax and is virtually unbreakable, but the cost for this simolicity is that it is very limited in its functionality when compared to other programming languages. To extend beyond the limitations of the MetaStock Formula Langauge you will need the MetaStock Developers Kit which will allow you to write your own custom functions in C/C++, PowerBasic or Delphi Pascal, C# is not supported but some very savvy programmers have found ways around this and have started writing some MS stuff in C#. IF you already have a C++ IDE then stick with this as it it will mean that you can have your functiosn up and running sooner than having to build workaround solutions in C#. In these external functions you can write MSX (MetaStock External functions) or MSFL (MetaStock File Library funtions)(if you can get the MDK Write version, you can create your own MS data records too). One thing you will have to consider is that the internal functions of MetaStock are not available to be called from external functions, so any functionality you want has to be coded from scratch, so the learning curve is steep from the very start. To start learning about writing MetaStock Formula Language indicators explorations etc, start by reading the MS Uses Manual that came with your version of MetaStock; read it cover to cover a few times, then download the free Equis Formula Primer from the downloads section. Work through the exercises contained therein. All during this phase of your learning, have alook through the indicators, explorations etc that are built-in to your version of MS, some are password protected but the others can be used as examples to demonstrate some of the required principles. To start learning how to write external functions and library functions, start by purchasing the MDK and then reading the MDK Users Manual a few times and look through the example files very carefully. It wont make much sense at the start (or maybe it will?) but eventually you will get better by practicing writing some simple functions. If ever you get stuck, you can always post your best attempt of your code here at the Forum, along with a full explanation of what you are trying to achieve and a full explanation of what is going wrong, and any relevant error messages, and I am sure someone will promptly assist. Hope this helps. wabbit [:D]
|