Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 12,709 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
"wait" command is not working when calling "contractVal()" #481649
10/12/20 13:16
10/12/20 13:16
Joined: Sep 2020
Posts: 22
Z
zzy Offline OP
Newbie
zzy  Offline OP
Newbie
Z

Joined: Sep 2020
Posts: 22
Dear developers,

It seems that "wait" command is not working when calling "contractVal" in the script. I am not sure if this is a bug or not.

I got this results by using the following script (the elapsed time should be about 4 seconds, but here is only about 0):
==================
z_PayOff compiling.................... ok

Start
Time Elapsed: 0.002 seconds

Finish
==================


Here is the test script generated based on the "PayOff.c" script in Strategy folder:
==================
#include <contract.c>

void main()
{
printf("\nStart");
CONTRACT C;
contractVal(&C,C.fUnl,0.15,0.01,0.01);
var Time = timer();
wait(4000);
printf("\nTime Elapsed: %.3f seconds",(timer()-Time)/1000);
quit("\nFinish");
}
==================

Re: "wait" command is not working when calling "contractVal()" [Re: zzy] #481650
10/12/20 16:16
10/12/20 16:16
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
I cannot confirm a bug with wait, but you're calling contractVal with an unitialized struct. You got probably a crash in the R library.

Re: "wait" command is not working when calling "contractVal()" [Re: jcl] #481651
10/13/20 08:13
10/13/20 08:13
Joined: Sep 2020
Posts: 22
Z
zzy Offline OP
Newbie
zzy  Offline OP
Newbie
Z

Joined: Sep 2020
Posts: 22
You are right. "RQuantLib not installed". I installed the package and now it is working properly! Thanks a lot.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1