Forex Tester Forum (Professional Training Software for Traders) Forum Index Forex Tester Forum (Professional Training Software for Traders)

Back to main site   Risk disclosure
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to use API?

 
Post new topic   Reply to topic    Forex Tester Forum (Professional Training Software for Traders) Forum Index -> FT API
View previous topic :: View next topic  
Author Message
popo



Joined: 23 May 2007
Posts: 2

PostPosted: Wed May 23, 2007 4:09 am    Post subject: How to use API? Reply with quote

Hi!

I am not a professional in programing in delphi.
I would like to build new strategy using code of example strategy (SMAStrategy.dpr) and modify it and the compile to dll.

But when i try to compile it the deplhi stops compiling at line:

SendInstantOrder(Symbol, op_Sell, LotSize, 0, 0, OrderHandle);

I guess the function Send Instant order is not known for the program.

I have found that another file StrategyInterfaceUnit may be useful somehow to solve this problem, but I do not know how to use it.

Maybe it is enough to copy it to my new strategy?
If so it is improtant where do I paste the content of the StrategyInterfaceUnit?

Thank you for your help in advance.
Back to top
View user's profile Send private message
Terranin
Site Admin


Joined: 21 Oct 2006
Posts: 831

PostPosted: Wed May 23, 2007 4:08 pm    Post subject: Re: How to use API? Reply with quote

popo wrote:
Hi!

I am not a professional in programing in delphi.
I would like to build new strategy using code of example strategy (SMAStrategy.dpr) and modify it and the compile to dll.

But when i try to compile it the deplhi stops compiling at line:

SendInstantOrder(Symbol, op_Sell, LotSize, 0, 0, OrderHandle);

I guess the function Send Instant order is not known for the program.

I have found that another file StrategyInterfaceUnit may be useful somehow to solve this problem, but I do not know how to use it.

Maybe it is enough to copy it to my new strategy?
If so it is improtant where do I paste the content of the StrategyInterfaceUnit?

Thank you for your help in advance.


It is just an old example. In new interface module added 2 new parameters to this function, so it will looks like

SendInstantOrder(Symbol, op_Sell, LotSize, 0, 0, "", 0, OrderHandle);

now. You can check this function in help file.

_________________
Hasta la vista
Mike
Back to top
View user's profile Send private message
popo



Joined: 23 May 2007
Posts: 2

PostPosted: Wed May 23, 2007 5:47 pm    Post subject: OK - and what next? Reply with quote

Thank you for your help.
It was true- the function has another parameters.

There was onother problem - my version of delphi uses single ' instead of ", so I have had to put '' instead of "".

But finally I made a new dll file.

I have copied the file to strategies folder.

But when i run the forextester and try to chose strategy from the list there is not visible new strategy to chose.

What should I do?
Back to top
View user's profile Send private message
Terranin
Site Admin


Joined: 21 Oct 2006
Posts: 831

PostPosted: Wed May 23, 2007 5:52 pm    Post subject: Re: OK - and what next? Reply with quote

popo wrote:
Thank you for your help.
It was true- the function has another parameters.

There was onother problem - my version of delphi uses single ' instead of ", so I have had to put '' instead of "".

But finally I made a new dll file.

I have copied the file to strategies folder.

But when i run the forextester and try to chose strategy from the list there is not visible new strategy to chose.

What should I do?


Send me the dpr file.

_________________
Hasta la vista
Mike
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Forex Tester Forum (Professional Training Software for Traders) Forum Index -> FT API All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group