| View previous topic :: View next topic |
| Author |
Message |
popo
Joined: 23 May 2007 Posts: 2
|
Posted: Wed May 23, 2007 4:09 am Post subject: How to use API? |
|
|
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 |
|
 |
Terranin Site Admin

Joined: 21 Oct 2006 Posts: 831
|
Posted: Wed May 23, 2007 4:08 pm Post subject: Re: How to use API? |
|
|
| 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 |
|
 |
popo
Joined: 23 May 2007 Posts: 2
|
Posted: Wed May 23, 2007 5:47 pm Post subject: OK - and what next? |
|
|
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 |
|
 |
Terranin Site Admin

Joined: 21 Oct 2006 Posts: 831
|
Posted: Wed May 23, 2007 5:52 pm Post subject: Re: OK - and what next? |
|
|
| 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 |
|
 |
|