New Zorro version 2.50

Posted By: jcl

New Zorro version 2.50 - 07/08/22 09:03

Zorro 2.50 is now available on https://zorro-project.com/download.php

List of new features: https://manual.zorro-project.com/new.htm

This release candidate will become the official release when no bugs are found in the next time. Please test everything and report any issues here! As usual, if you're the first one to find a new and serious bug in the release candidate, you can get a free Zorro S subscription or support extension. This time the chance is particularly good because we switched to a new compiler and to new versions of many libraries.
Posted By: jcl

Re: New Zorro version 2.50 - 07/25/22 13:47

New version: 2.50.1, same link

Fixes: advise() produced sometimes a different result in 64 bit, and profile.c contained a duplicate variable definition.
Posted By: jcl

Re: New Zorro version 2.50 - 07/26/22 10:29

Version 2.50.2.

2.50.1 still had a bug.
Posted By: AndrewAMD

Re: New Zorro version 2.50 - 07/28/22 01:25

In the zorro.h headers, these functions overloads are defined:
Code
inline char* ifelse(BOOL c,char* a,char* b) { return ifelse2(c,a,b); }
inline char* ifelse(BOOL c,const char* a,const char* b) { return ifelse2(c,(char*)a,(char*)b); }

I had a situation where I was overloading with (BOOL, char*, const char*), so this was an ambiguity error. Either the char* overload should be removed, or two variations with (BOOL, const char*, char*) and (BOOL, char*, const char*) should be added.

Also, if ifelse() is using a const char*, shouldn't it be returning a const char* instead of a char*?
Posted By: jcl

Re: New Zorro version 2.50 - 07/28/22 08:17

Yes. In that case cast the char* to const char*.

The two overloads cover almost all cases where ifelse is used with Zorro functions or indicators. The second overload returns a char' because it is for arguments of type "string", which convert to const char', but can in fact be passed to functions that accept char*.

We didn't want to inflate zorro.h even more with even more overloads or template variants. In some cases you really need a typecast, not only for ifelse.
Posted By: AndrewAMD

Re: New Zorro version 2.50 - 08/02/22 17:22

C++: tradeUpdate() with no arguments does not have an overload. I only see this overload in the Lite-C headers (default.c).
Posted By: jcl

Re: New Zorro version 2.50 - 08/03/22 12:29

In fact, none of the functions has a real overload in C++. They convert to variants with appended "0" or "1".

We'll rename tradeUpdate() to tradeUpdatePool() in the next update. You can already enter this line in zorro.h:

inline int tradeUpdatePool() { return tradeUpdate(0,0,0,0,0); }
Posted By: hast29

Re: New Zorro version 2.50 - 08/05/22 10:40

Hi, I am having difficulty to install the 2.50.2 Version. The error message is, that the VCRUNTIME140.dll is missing and the advice to reinstall. With the 64-bit version also no success, complains about missing mfc140.dll. I have uninstalled all old versions, and installed from scratch, the same error messages. Is it a bug or some setup problem of my desktop ? I mean the Zorro is installed with no error message, but Zorro.exe does not start.

Thank you for any advice, ...
Posted By: jcl

Re: New Zorro version 2.50 - 08/05/22 11:03

No bug or setup problem, but apparently a PC without a VC runtime.

Please get it here:

https://opserver.de/down/vcruntime140.zip

and unzip it in the Zorro folder or in your windows/system32 folder. Maybe it's not the only DLL missing - please let us know if you then still get a missing DLL error. We'll pack all those DLLs in the setup.

The 64 bit version won't directly run on your PC anyway. You must really install the 64 bit runtime as described in the manual.
Posted By: hast29

Re: New Zorro version 2.50 - 08/05/22 13:29

Hi jcl and thank you for the prompt support. The library did not help. After unzipping it into Zoro folder, the application does not start again and this time with just a message "the application could not be started", no hints about any other missing libraries.
Do I understand you properly, if I install the 64bit MS Visual Studio in the computer, the problem will be solved ? MS Visual Studio is now free, so this is for me no extra costs option.
Also, is there any benefit from 64bit architecture ? I am just training and testing own scripts, writen directly in Zorro "simple C".
Posted By: AndrewAMD

Re: New Zorro version 2.50 - 08/05/22 14:01

Originally Posted by hast29
Also, is there any benefit from 64bit architecture ? I am just training and testing own scripts, writen directly in Zorro "simple C".
Quote
Using C++ as script language has many advantages. Additional development tools, such as the Visual Studio debugger and profiler, are available. External libraries, such as Boost, can be integrated without a wrapper. The 64-bit mode can access more memory for backtests. All lite-C functions and all system variables can still be used, but additionally you have C++ classes and templates at your disposal. Error handling is more strict and you'll get warnings about bad code style. The VC++ compiler is a bit slower than the lite-C on-the-fly compiler, but is only invoked when the script was changed. The resulting code runs equally fast or - in 64 bit mode - even faster. The only disadvantage is that you have to download and install Microsoft Visual Studio™ 2017 or above.
https://zorro-project.com/manual/en/dlls.htm
Posted By: jcl

Re: New Zorro version 2.50 - 08/05/22 14:26

Originally Posted by hast29
Do I understand you properly, if I install the 64bit MS Visual Studio in the computer, the problem will be solved ? MS Visual Studio is now free, so this is for me no extra costs option.

You will need Visual Studio for programming in C++, but not for merely running Zorro. The VC++ runtime would solve your problem. But we prefer no runtime installation for the 32 bit version, so we want to include the dlls directly. We had not had a PC so far where the 32 bit version would require a runtime. What's your Windows version?



Posted By: hast29

Re: New Zorro version 2.50 - 08/05/22 17:20

Win 10 Home, 21H1, 64-bit
Posted By: jcl

Re: New Zorro version 2.50 - 08/06/22 07:50

Ok. Unpack FXCM.zip into the Zorro folder. The FXCM API is a 32 bit VC application and should thus enable your PC to also run the 32 bit Zorro without VC runtime, no matter what DLL was missing before. Let me know if this works.

For 64 bit you'll need the VC runtime in any case.
Posted By: mun

Re: New Zorro version 2.50 - 08/07/22 10:00

Hi guys. I migrated my lite-C script to C++ to test the new feature "C++ scripts now start directly, like .c scripts (Zorro S and Visual Studio required). "

I found it only works when the script name is different. For example if you have script names:

Test1.c
Test1.cpp

and you click Test on Zorro64 for Test1 it will print "Test1" but it won't compile it; it just does nothing. The documentation states:

"If you have a mix of lite-C and C++ scripts, you can add a '+' to a .cpp script name for marking it in the scrollbox"

I tried this to name it Test1+.cpp and it compiled and ran as expected. Would it be possible to tighten the documentation wording a bit to say it must have different names if using a mix of lite-C and C++ files, or give some error message to indicate needing a different script name when trying to run it in Zorro64?

EDIT: I then tried creating the DLL directly from Visual Studio. When building it as Test1+.dll I get the same issue - Zorro64 prints "Test1+" then does nothing. However when I change the output dll name to Test1+64.dll then Zorro64 uses it correctly. But suffixing the 64 on the dll name is not mentioned in the help pages, I just figured it out from the way Zorro was building the included MyStrategy+.cpp
Posted By: jcl

Re: New Zorro version 2.50 - 08/08/22 07:29

You need indeed different names for different scripts, otherwise .c will override .cpp. This will be mentioned more clearly in the manual.

"64" has no meaning in a script name. If you compiled a script with 32 bit, you must run it with 32 bit. You cannot run a 32 bit dll with a 64 bit program. It will simply not load.
Posted By: hast29

Re: New Zorro version 2.50 - 08/09/22 15:50

Hi jcl, yes unpacking FXCM.zip solved the issue for the 32-bit. Zorro 2.50.2 starts and runs OK now, on my desktop computer.

I will not yet use the 64-bit Version and the C++ coding. Perhaps later.The advantages mentioned by AndrewAMD could be of a good use for me, when I progress more with my programming skills.

I am all set now with the new 2.50.2, thank you for the support.
Posted By: ozgur

Re: New Zorro version 2.50 - 09/17/22 13:29

A small bug: when a dialog opens after clicking "[Change Folder]" in Zorro64, cpp files aren't shown.
Posted By: jcl

Re: New Zorro version 2.50 - 09/19/22 13:42

Thanks, this should be fixed in the new beta version.
Posted By: Sc1entia

Re: New Zorro version 2.50 - 10/15/22 16:53

Hi folks,

Just following up on the post from “mun” above, and have noticed the Zorro64 dll name dependency (for Zorro 2.50).

I have reduced the script to very basic functionality – it prints out “main” from main() and “INITRUN” from run().

When I manually compile the script in Visual Studio as a x32, it (Test.dll) loads and “tests” fine from Zorro(32). Testing from Zorro64 just prints two empty lines followed by the name of the script on the third line (in the Zorro64 status box) – no error message.

When I compile the script in Visual Studio as a x64, in Zorro(32) it tries to load (when Test is clicked) and then produces an Error 061: invalid DLL (….). This is expected behaviour.

When I load/Test the same x64 dll strategy file in Zorro64, it just does the same as previous - prints the two empty lines followed by the name of the script - nothing else. It does the same when it loads other x32 strategy files (two empty lines and the name of the file).

When I rename the x64 dll strategy file to Test64.dll, the Script retains the same name in Zorro64 but it now executes properly. Zorro64 is truncating the 64 from the name of the dll file (i.e. If I rename the x64 dll to Test6464.dll, Zorro64 shows the name as Test64).

Lastly, if I rename a x32 dll strategy file to include 64 at the end of the name, Zorro64 then tells me that it’s an invalid DLL. I can’t think why I would do this in reality – just including for completeness.

So Zorro64 is using the ending part of the compiled strategy dll to figure out if should be executed as a x64. If it’s not present, then Zorro64 won’t even try to execute it as a x64. While “64” has no meaning in a script source name, it does indeed have a meaning in the compiled dll name (as far as Zorro64 is concerned).

It took me a few hours of mucking about today to see what I was doing wrong. I couldn’t find anything in the documentation indicating that I need to rename the x64 Visual Studio compiled .dll to get it working in Zorro64 - perhaps this could be included in future versions of the documentation.

Regards,

Kieran
Posted By: DdlV

Re: New Zorro version 2.50 - 10/16/22 05:29

Hi @jcl.

2.50 seems to have changed the way Zorro handles the Broker drop-down and introduced a bug - or at least an annoyance.

In 2.48 pressing the Broker drop-down gave a list of all the Brokers. In 2.50, the drop-down is 1 long, only showing Ally. The correct Broker can still be selected via careful scrolling or the arrow keys, but on first appearance it looks like only Ally exists! This is running under Wine. I have not tried on a Windows machine.
Posted By: Spirit

Re: New Zorro version 2.50 - 10/16/22 06:47

The broker dropdown is still the same here but I am using Windows.
Posted By: DdlV

Re: New Zorro version 2.50 - 10/16/22 10:29

Thanks @Spirit. I should have been more exact: I'm running 2.50.2. Is that the same version you're running?

Thanks.
Posted By: jcl

Re: New Zorro version 2.50 - 10/17/22 10:48

2.50.2 is the release version. The dropdown has not changed, but is anyway not release dependent because it's rendered by Windows MFC. Do you see only the first entry in the dropdown list, but can see all when scrolling? Is it only the broker scrollbox, or all scrollboxes? Can you post a screenshot?
Posted By: DdlV

Re: New Zorro version 2.50 - 10/19/22 00:42

Thanks @jcl. Answers:

- Broker dropdown is 1 line
- Initially shows last Broker used
- Scrolling works with either mouse wheel or arrows
- Dropdown remains 1 line
- Only Broker dropdown - all other dropdowns are fine
- 2.48 on same machine in same Wine prefix works fine

I've never posted a screenshot - can that be done inline?

Thanks.
Posted By: Grant

Re: New Zorro version 2.50 - 10/19/22 08:26

Originally Posted by DdlV

I've never posted a screenshot - can that be done inline?


By choosing 'use full editor' -> 'insert image link'
Posted By: jcl

Re: New Zorro version 2.50 - 10/19/22 11:49

Thanks, the description is enough. It's a bit mysterious why it only affects the broker scrollbox and only in a certain version, but maybe it's some random effect. We'll check if we can find some pattern to it, and will also inform the Wine team (but with not much hope).
Posted By: Eugeniu

Re: New Zorro version 2.50 - 11/06/22 13:10

Noticed 2 problems (I'm running 2.50.2 development version on Wine/Ubuntu 22.04)

1. The list of brokers is different if I launch 64-bit version vs 32-bit.
64-bit version contains only "MT4/5 demo" and "Offline". I get more in the 32-bit version.
This is my .desktop file (for staring 64-bit on Ubuntu)
Code
[Desktop Entry]
Name=Zorro64
Exec=env WINEPREFIX="/home/ubuntu/.wine" wine Z:\\\\data\\\\zorro\\\\Zorro64\\\\Zorro64.exe
Type=Application
StartupNotify=true
Path=/data/zorro
Icon=4F45_Zorro.0
StartupWMClass=zorro64.exe

To make 64-bit work I had to install the runtime from Microsoft Visual C++ 2015 Redistributable Update 3 RC

2. UI issue on resizing the window in "Strategy" groupbox (see the screenshot.png). If I click on dropdown boxes they are refreshed and displayed properly afterwards. Same behavior for 32-bit and 64-bit versions.

Attached picture screenshot.png
Posted By: AndrewAMD

Re: New Zorro version 2.50 - 11/06/22 15:33

#1 is expected because those are the only broker that plug-ins with 64-bit versions at this time.

#2 can be fixed by using Windows. grin
Posted By: Petra

Re: New Zorro version 2.50 - 11/08/22 10:03

The VC++ 2015 redistributable can work, but the correct version would be the VC++ 2022 redistributable.
© 2024 lite-C Forums