logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
smg  
#1 Posted : Wednesday, June 20, 2007 2:58:26 AM(UTC)
smg

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/13/2005(UTC)
Posts: 90

I have just started trying to learn MSX Dll coding - here are my initial thoughts about this effort:

Is it possible to have a mini documentation for MSX component of MDK on the lines of Getting Started Manual of Metastock. What I mean to say here is : it is possible that the current manual could be having comprehensive documentation about MSX, However for an average Metastock user who has a good enough knowledge of Metastock Formula Language and who can do or understand a little bit of programming also - the present documantation can appear a little bit heavy. So, if a minimalist documentation for starters is provided, along with the current documentation, then if could be helpful.

Secondly, is it possible to have some sample templates or a walkthrough example for the current version of VC++ Express edition or Regular edition. It might be needed because Microsoft seems to have discontinued support or VC 6, and for a new user of MSX it might prove very difficult or impossible to get Version 6 of Microsoft VC++.

I am trying to learn to write MSX dll. And some experienced users of MSX are being very helpful at the moment, however non-availabilty of VC6 is creating first hurdle - after that the MSX primer might have proved helpful.

Are here any non-programmers around who have been successful in writing small or simple Dlls? That might provide initial confidence.

I will look forward to hear about your experiences and views.

Regards,

SMG

wabbit  
#2 Posted : Wednesday, June 20, 2007 6:02:27 AM(UTC)
wabbit

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)
smg,

For the benefit of others not privvy to our offline conversations: There is a BIG jump in knowledge from writing MetaStock Formula Language Functions to writing MS .dll add-ins, whether you are using C/C++, PowerBasic, Delphi etc.

The MetaStock Formula Language was designed to be simple to allow TRADERS to implement functionality without having to learn the complexities of a full-blown programming language. Once you leave the safe confines of the MetaStock Formula Editor and start building your own external functions, you immediately have to deal with some very advanced concepts in order to write even the most simple add-in function, you have entered the world of PROGRAMMERS. Now there are plenty of traders and there are many programmers, but the number of programmers who also trade and the number of traders who can also program are a lot fewer!

The MDK and its Users Manual was written with (relatively) advanced programmers in mind and the sample codes contained therein are mostly sufficient to get most programmers started. (After a short while, once you get the hang of writing .dlls you will find the MDK manual does not go far enough and there are many issues not mentioned in the manual that will confront you at some point in the future!) You will have to immediately deal with memory pointers and the unusual(?) structs that contain the equity data, the passing of information to/from the external functions and the fact that MS will fully evaluate the code in MSFL and your external functions (which can cause all sorts of chaos for the unwary!)

As for the Integrated Development Environments (IDEs), when the MDK was created VS6 was the IDE of choice. The decision of Microsoft not to support it any more is a shame (read some of the MANY discussion on the web about this fact! we are not alone in our dismay in the demise of VS6) but it is still possible to write Win32.dll files in VC++ 2005 and the free Express edition and many more IDEs too. Another alternative that might be worth a look is Dev-C++ from Bloodshed. Once the idisyncrasies of each IDE are sorted out (which might require help / assistance fromt he IDE manufacturer) the process of writing code is very similar.

Anyway, I have sent you some stuff via email, I hope you get it and find it useful.


Hope this helps.

wabbit [:D]

mkine  
#3 Posted : Friday, May 2, 2008 10:26:18 AM(UTC)
mkine

Rank: Newbie

Groups: Registered, Registered Users
Joined: 4/27/2007(UTC)
Posts: 4

Dear Wabbit,
Like smg, I'm also new to MDK, also have no idea how to start with. Appreciated if you can provide some information for MDK coding. If possible are there any web site with more information to reference with?
Many thanks.
Best regards,
Mkine
wabbit  
#4 Posted : Friday, May 2, 2008 8:04:10 PM(UTC)
wabbit

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 Mkine,

With the MDK, there are basically two things you can do: write MSX (external) functions, and access the MS File Library.

Most people only want to write external functions to overcome the limitations of the native MS Formula Language, so this is an obvious place to start. The MDK Users Manual comes with some example codes for three different programming languages. Choose the example for the language you are working with and go through the code line by line. It all pretty much makes sense, but many people get confused because they spend too much time looking at WHAT the example is doing instead of HOW it is doing it.

After you have read the examples and seen how to get information out MS into your external function, what you do with it is up to you. I think it is much easier to learn to program if you have a project in mind. Start small. Start by writing a small example that simply returns the close price of the current chart (this doesn't need any arguments), then think of more advanced projects as you understand more.

Of course, there are people who can help. Should you get stuck on a piece of code, simply post your best effort of code here, with a full explanation of what the code is supposed to be doing and how you think the code is not doing what you think it should be doing, and any error messages etc and someone will lend you some of their time to help fix your problems.


Hope this helps.

wabbit [:D]

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.