| View previous topic :: View next topic |
| Author |
Message |
SquareMeal
Joined: 15 Sep 2010 Posts: 40
|
Posted: Sat Sep 18, 2010 4:28 pm Post subject: Syntax problem |
|
|
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 |
|
 |
FT Support
Joined: 11 Jul 2009 Posts: 902
|
|
| Back to top |
|
 |
SquareMeal
Joined: 15 Sep 2010 Posts: 40
|
Posted: Sat Sep 18, 2010 9:02 pm Post subject: syntax errors during lazarus compile |
|
|
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 |
|
 |
|