Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (PeWi, AndrewAMD, Quad, VoroneTZ), 463 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Zorro chrashes with no error code #487137
01/26/23 14:54
01/26/23 14:54
Joined: Jan 2023
Posts: 1
P
Puezzin Offline OP
Guest
Puezzin  Offline OP
Guest
P

Joined: Jan 2023
Posts: 1
Hi,
newbie here, I started to use Zorro a couple weeks ago.

I am trying to work my way through a few examples of codes/strategies from the robotwealth's blog to familiarize with the coding language and Zorro.
It was all working well until I came around to the example in this blog post: https://robotwealth.com/shannon-entropy/

I am trying to run the second code of the post, which I have saved as a strategy under the name: "ShannonEntropyStrategy" (attached).
If I test the strategy and stop it before Zorro has worked through the whole time series, I get the graph in the screenshot attached; otherwise, Zorro crashes before completing the calculation, without throwing any error.

I do have an API key for the Alpha Vantage API (as required in the blog post) which I have saved in my ZorroFix.ini file.

I thought I had messed up something (as I did not make any changes in the script, apart from changing the starting date), so I tried unistalling and re-installing Zorro, but the problem persists.

I am running Zorro 2.53 on a W10 laptop with AMD Ryzen 7 4000 series with 64GB RAM.

Would be grateful for any help.

Attached Files Screenshot 1.png
ShannonEntropyStrategy.c (31 downloads)
Screenshot2.png
Re: Zorro chrashes with no error code [Re: Puezzin] #487138
01/26/23 15:03
01/26/23 15:03
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
That's a third-party script. Time to debug it!

https://zorro-project.com/manual/en/trouble.htm

Re: Zorro chrashes with no error code [Re: Puezzin] #487232
02/15/23 14:40
02/15/23 14:40
Joined: Apr 2022
Posts: 18
Singapore
V
vinitrinh Offline
Newbie
vinitrinh  Offline
Newbie
V

Joined: Apr 2022
Posts: 18
Singapore
I don't see anything wrong with the script.

@Puezzin, did you manage to find out what is wrong?

Re: Zorro chrashes with no error code [Re: Puezzin] #487261
02/26/23 09:17
02/26/23 09:17
Joined: Feb 2016
Posts: 15
Russia
nsg Offline
Newbie
nsg  Offline
Newbie

Joined: Feb 2016
Posts: 15
Russia
If anyone's still interested, there's an extra % in the beginning of printf statement:

Code
    if(is(EXITRUN))
        printf("\n\n%W: %.2f%%\nWins: %d Losses: %d\nWinTot: %.0f LossTot: %.2f\nPips/Trade: %.1f", 
        100.*win/(win + loss), win, loss, winTot/PIP, lossTot/PIP, (winTot-lossTot)/PIP/(win+loss));


Should be:
Code
    if(is(EXITRUN))
        printf("\n\n W: %.2f%%\nWins: %d Losses: %d\nWinTot: %.0f LossTot: %.2f\nPips/Trade: %.1f", 
        100.*win/(win + loss), win, loss, winTot/PIP, lossTot/PIP, (winTot-lossTot)/PIP/(win+loss));


BTW, misspelled printf statements is one of the most frequent reasons of crashing with no error code. Cool piece of code though.

Last edited by nsg; 02/26/23 09:18.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1