"wait" command is not working when calling "contractVal()"

Posted By: zzy

"wait" command is not working when calling "contractVal()" - 10/12/20 13:16

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");
}
==================
Posted By: jcl

Re: "wait" command is not working when calling "contractVal()" - 10/12/20 16:16

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.
Posted By: zzy

Re: "wait" command is not working when calling "contractVal()" - 10/13/20 08:13

You are right. "RQuantLib not installed". I installed the package and now it is working properly! Thanks a lot.
© 2024 lite-C Forums