Help! (FT 2.5 Strategy API using MS Visual C++ 2010 Express)

How to create strategies and indicators
Message
Author
tonyb
Posts: 3
Joined: Tue May 11, 2010 5:00 am
Location: England

Help! (FT 2.5 Strategy API using MS Visual C++ 2010 Express)

#1 Postby tonyb » Tue May 11, 2010 7:41 am

Hi Mike/all,

This is my first post here and I am hoping someone can help me resolve a problem that has been driving me insane for the last two days.

As a prerequisite to coding my own strategies I am have been going through
the process for MS Visual C++ 2005 as detailed by Mike in his post: (http://www.forextester.com/forum/viewtopic.php?t=1013) and also
(http://www.forextester.com/forum/viewtopic.php?t=1014).

I have cut and pasted Mikes code into my files and the DLL's build successfully.

When I try to install my new strategy I get the error :

'Cannot install strategies from "C:\ForexTester25\Strategies" folder. This strategy is already installed.'

When I look in the FT debug log I can see that the FT has indeed found the strategies and seems to have loaded them. However they do not show up when I choose the 'Tools/Strategies List' option.

debug.log entries:
2010.05.11 13:13:08 -----------------------------------
2010.05.11 13:13:09 Loading strategies
2010.05.11 13:13:09 --------------------------------
2010.05.11 13:13:09 DemoStrategy.dll
2010.05.11 13:13:09 ObjectsTest.dll
2010.05.11 13:13:09 SMAStrategy.dll
2010.05.11 13:13:09 SimpleSMA, 2 SMA crossing strategy, Ok
2010.05.11 13:13:09 StatementProcessor.dll
2010.05.11 13:13:09 StatementProcessor, Executes orders from a statement, Ok
2010.05.11 13:13:09 tft2.dll
2010.05.11 13:13:09 --------------------------------

I know I am putting my DLL's in the correct place as:
1. FT finds them at start up as detailed in the log.
2. When I modify the 'currency' property for the standard SMAStrategy I can see that a file called SMAStrategy.dat gets created (in my case 'c:\ForexTester25\Strategies').

My problem appears identical to the one encountered by user Matrox in August 2009 (http://www.forextester.com/forum/viewtopic.php?t=1759)

In an attempt to resolve this issue I have read virtually all the posts on this Forum, Re-installed FT 2.5 and tried changing the directory where the Strategies DLL's are held.

I'm guessing it's incomplete code that's causing this but Mike seems to have got things working ok.

I'm sitting here scratching my head and would be very grateful if someone can point me in the right direction. If you have managed to get Mikes 'do nothing example' correctly installed was there anything that you needed to do that I might have missed?

Alternatively can anyone send me the source for a strategy (even one that does nothing) that they know installs correctly and shows up on the list?

Thanks in advance


Tony

PS. My environment is ForexTester 2.5 running under Windows Vista Business (version 6.0 build 6002: Service Pack 2). Microsoft Visual C++ 2010 Express.

tonyb
Posts: 3
Joined: Tue May 11, 2010 5:00 am
Location: England

And the answer is .............

#2 Postby tonyb » Wed May 12, 2010 9:30 am

I had set the Configuration Property/Linker/Input/Module Definition File correctly in Debug Mode but left in blank in release Mode. then did the build in release mode.

Mikes instructions are correct.

Now busy trying to learn the API calls.

Testing seems laborious as I seem to have to stop/start FT in order to be able to overwrite the DLL with the new one (FT has it open).

Achieving basic debugging by declaring my control variables using RegOption so that the appear (and can be modified) in the Strategy Parameters window.

Any working code would be greatly welcomed. I'll post some of my own on the Forum if I get to the stage where it won't be too embaressing!

Cheers



Tony

hjabu
Posts: 30
Joined: Fri Aug 21, 2009 9:30 am
Contact:

rewrite or converting mq4 to dpr and dll

#3 Postby hjabu » Sun Apr 17, 2011 10:23 am

Hi tonyb,
are you expert doing in converting mq4 to dpr and dll, could you please explain to me how do i do it?

Thank you

hjabu
Posts: 30
Joined: Fri Aug 21, 2009 9:30 am
Contact:

Contunue converting mq4 to dpr and dll

#4 Postby hjabu » Sun Apr 17, 2011 10:26 am

Also tonb, i ve got my own C++2005 and delphi xe also lazarus, i have 0 knowledge but i could leran something a bit about it..


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 13 guests