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 

Syntax problem

 
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
SquareMeal



Joined: 15 Sep 2010
Posts: 40

PostPosted: Sat Sep 18, 2010 4:28 pm    Post subject: Syntax problem Reply with quote

I'm using Lazarus to write and compile my first strategy (strategyname.dpr).

I copied StrategyInterfaceUnit from ForexTester folders into my lazarus\projects\ folder.

When I try to compile, I'm getting a lot of syntax errors within StrategyInterfaceUnit (even though I set the compiler option syntax to "Delphi").

I tried remarking out { } the statements with FATAL errors since I knew I didn't need that logic and I wanted to try to get through the compile for the first time.

One such FATAL error was:
Fatal Syntax error, ")" expected but "identifier POINT" found.

The code within the StrategyInterfaceUnit being referred to is:
result := round((OrderOpenPrice - OrderStopLoss)/info.Point);

After remarking out the FATAL errors, the compile still failed because there were more than 50 syntax errors.

Examples of some of those errors:
Illegal type conversion: "ShortString" to "^Char"
Incompatible types: got "<procedure variable type of function:Double of object;StdCall>" expected "Double"

I have a feeling I may have copied in the wrong StrategyInterfaceUnit or I don't have Lazarus set up to correctly to recognize the syntax.

Any help would be appreciated.

Thanks,
SquareMeal

_________________
creativity + willful purpose
Back to top
View user's profile Send private message
FT Support



Joined: 11 Jul 2009
Posts: 902

PostPosted: Sat Sep 18, 2010 7:49 pm    Post subject: Reply with quote

Can you please post your strategy?
_________________
Check our other products here:
www.fx-metropolis.com
www.forexcopier.com
Back to top
View user's profile Send private message Visit poster's website
SquareMeal



Joined: 15 Sep 2010
Posts: 40

PostPosted: Sat Sep 18, 2010 9:02 pm    Post subject: syntax errors during lazarus compile Reply with quote

I posted my source code, but then decided to delete it so I won't waste any of your time on this.

I went to the Wiki site for Lazarus documentation and was able to learn the meaning of each file type and where my source code for a strategy should be placed for compiling. What threw me off was trying to apply the lazarus video for developing an indicator to writing a strategy -- a lot is the same, but there are subtle differences.

I will post again when I have a specific problem, but so far so good.

Regards,
SquareMeal

_________________
creativity + willful purpose
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