Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 3/30/2010(UTC) Posts: 1
|
Hello friends,
My goal is to rewrite an MQL4 code that I wrote, in Metastock or C++ specifically.
Ofcourse I am new in C++(the oop part).
The scenario(in its simplest form) is as followes:
1. Chech whether a currency pair for example GBPUSD close price of the previous candle is is above Exponntial Moving Average 20.
If it above print a green up arrow on the screen otherwise if below print a red down arrow on the screen.
2. Check stochastics if k% crossed d% above 80 and then went down the 80 line. If that happens print a red down arrow. Up arrow for crossing above 20.(This is not straightfarward, it needs some programming invlolving loops)
3. When the last candle is complete the arrows should be updated.
4.Do the same as above for 10 more currency pairs.
I bought MDK and read the manual but unfortunaly there are no examples!!!
The only thing that I managed it to initialize MSFL.
When I try to open the directory(which I guess is needed) I get errors.
If I use the path of the directory, I get errors again.
Is there a sample program that does something similar to get me started?
Regards
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/28/2005(UTC) Posts: 276 Location: Salt Lake City, UT
|
The manual has multiple examples in multiple languages. There are samples for MSX and MSFL. There are also samples included in the install that you can look at and run in multiple languages.
What error are you getting? The manual also lists all the possible error codes so that you can get a better idea of why you're getting an error.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 12/14/2009(UTC) Posts: 140 Location: Austria
|
MSX:
In the MSX folder are different folder for examples in different languages: C Delphi PBasic 7
The Projectwizard (Assistent) MSXWiz.awx and MSXWiz4.awx won't work for the Development Studios newer than 10 years ago, don't waste your time with this assistent like I did ;)
In the pdf there are also some examples..
CSample is a good start - try to change only some simple functions to
find out how the whole thing is working...
In my case also the C-Project didn't work as it is on the CD. There were some wrong links to header files I had to change, but maybe this was because of having an non english version of windows.. I'm currently not sure but I think also the CSample.def file was missing - I had to generate like it is described..
hope this helps a little bit, because manual is not really helping on this topics
MSFL:
The Samples are in \MSFL\Samples\ for c-console, Delphi, powerbasic, visualbasic, visual c, bc
You can also find some headers for msfl for other languages in the internet..
|
|
|
|
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.