Lazarus Support

Share your ideas how the software could be improved
Message
Author
irwa82
Posts: 7
Joined: Sat Dec 05, 2015 11:50 pm

Lazarus Support

#1 Postby irwa82 » Sat Mar 04, 2023 8:05 pm

Hi,

I am primarily interested in writing automated trading strategies to test inside forex tester.

However, all your documentation suggests finding an old version of Delphi on the internet such as Turbo Delphi or Delphi 7. I have managed to do that but, it is not exactly legal.

There is a free community edition of Delphi however its users appear to have constant problems upgrading their license every year as shown here:
https://en.delphipraxis.net/topic/7183- ... -new-keys/

The official FAQs https://www.embarcadero.com/products/delphi/starter/faq suggest that the community edition license is only valid for one year and that users must download the latest version each year and apply for a new community edition license.

Delphi community edition is huge, while the Free Lazarus IDE is not and does not require stuffing around to get the community edition license and maintaining it with annual renewals.

I would seriously recommend making the free lazarus ide and free pascal compilers the default for writing custom object pascal strategies and indicators as it is completely legal and has zero stuffing around to get up and running provided of course that your StrategyInterfaceUnit and or TechnicalFunctions which I believe is merged into the StrategyInterfaceUnit unit files support free pascal/lazarus.

Thanks,
Anthony

irwa82
Posts: 7
Joined: Sat Dec 05, 2015 11:50 pm

Re: Lazarus Support

#2 Postby irwa82 » Sun Mar 05, 2023 12:40 am

Hi,

In helping support working with Lazarus I have looked into the free pascal compiler directives to compile the StrategyInterfaceUnit.pas file without compiler errors.

You need to add the following at the top of the file:
{$IFDEF FPC}
{$MODE DELPHI}
{$H+}
{$MACRO ON}
{$DEFINE RTLVersion := 22}
{$UNDEF FPC}
{$ENDIF}

I tested compiling with delphi 7, turbo delphi 10 and delphi 10.4 community edition with the above compiler directives and they still compile.

The issue I am still having is that I get the following warnings and error:
StrategyInterfaceUnit.pas(1035,67) Hint: Function result variable does not seem to be initialized
StrategyInterfaceUnit.pas(1045,66) Hint: Function result variable does not seem to be initialized
StrategyInterfaceUnit.pas(1501,45) Hint: Local variable "info" does not seem to be initialized
StrategyInterfaceUnit.pas(1521,45) Hint: Local variable "info" does not seem to be initialized
StrategyInterfaceUnit.pas(1537,45) Hint: Local variable "info" does not seem to be initialized
StrategyInterfaceUnit.pas(1556,45) Hint: Local variable "info" does not seem to be initialized
StrategyInterfaceUnit.pas(2028,25) Hint: Variable "IntrfProcsRec" does not seem to be initialized
StrategyInterfaceUnit.pas(883,23) Hint: Local type "PInterfaceProcRec" is not used
StrategyInterfaceUnit.pas(1011,3) Hint: Local const "MajorVer" is not used
StrategyInterfaceUnit.pas(1012,3) Hint: Local const "MinorVer" is not used
TestStrategy.lpr(36,1) Error: Undefined symbol: U_$STRATEGYINTERFACEUNIT_$$_INTRFPROCSREC

I am not sure how to resolve the Undefined symbol error and I'm new to object pascal so not sure how to proceed.

Any suggestions would be appreciated.

Thanks,
Anthony

irwa82
Posts: 7
Joined: Sat Dec 05, 2015 11:50 pm

Re: Lazarus Support

#3 Postby irwa82 » Sun Mar 05, 2023 3:46 am

Hi,

I have now gotten lazarus to build dll files successfully for forex tester.

I have created an instructions page at https://forextester.com/forum/viewtopic.php?f=9&t=61391

It would be nice if forex tester added the following code at the top of their delphi files so that we don't have to do it manually.

Code: Select all

{$IFDEF FPC}
  {$MODE DELPHI}
  {$H+}
  {$MACRO ON}
  {$DEFINE RTLVersion := 22}
  {$UNDEF FPC}
{$ENDIF}   


Anyway hope this helps some people out.

Regards,
Anthony


Return to “New Feature Suggestions”

Who is online

Users browsing this forum: No registered users and 2 guests