Gamestudio Links
Zorro Links
Newest Posts
Loging off automatically ?
by old_bill. 03/30/20 22:07
Need help to log in my broker into ZORRO
by buttcorgi. 03/30/20 19:52
textureLod into HLSL
by 3run. 03/30/20 18:01
Running banchmark test with FxPro on MT4
by Cobus. 03/30/20 14:55
Read Z12.fac while running Z2
by AndrewAMD. 03/29/20 22:32
Comment Out
by danatrader. 03/29/20 22:03
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
5 registered members (AndrewAMD, jbhunter, alibaba, 3run, 1 invisible), 668 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
gonzalez21, Cobus, HF_Psy, jj02520024, heitorfr
18409 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: New Zorro version 2.25 [Re: jcl] #479374
03/25/20 12:27
03/25/20 12:27
Joined: Oct 2018
Posts: 22
7
7th_zorro Offline
Newbie
7th_zorro  Offline
Newbie
7

Joined: Oct 2018
Posts: 22
There is some missing code int the ZorroFolder/include/r.h file.
Below line of codes need to be added.


int Rstart(const char* source,int debug)
{
if(hR) return hR; // R session already running
#ifdef WIN32
g->RLib = LoadLibrary("mt4R.dll");
PROC(RInit_);
PROC(RIsRunning);
PROC(RIsBusy);
PROC(RExecute);
PROC(RExecuteAsync);
PROC(RAssignString);
PROC(RAssignInteger);
PROC(RAssignDouble);
PROC(RAssignVector);
PROC(RAssignMatrix);
PROC(RGetInteger);
PROC(RGetDouble);
PROC(RGetVector);
PROC(RPrint);
PROC(RLastOutput);
PROC(RDeinit); <========================================= THIS!!
#endif
hR = RInit_(strf("%s --no-save",g->sRTermPath), debug);
if(!hR) {
print(TO_WINDOW,"\nCan't open %s\n ",g->sRTermPath);
return 0;
}
if(!RIsRunning(hR)) {
print(TO_WINDOW,"\nCan't run R!\n ");
return 0;
}
Rx("rm(list = ls());",0); // clear the workspace
if(source) if(*source)
Rx(strf("source('%sStrategy/%s')",slash(ZorroFolder),source),2);
return hR;
}

Re: New Zorro version 2.25 [Re: jcl] #479380
03/25/20 16:46
03/25/20 16:46
Joined: Jul 2000
Posts: 27,148
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,148
Frankfurt
Thanks, we'll add it. But RDeinit is normally not needed in the script, because R is anyway deinitialized after the script run.

Re: New Zorro version 2.25 [Re: jcl] #479393
03/26/20 15:17
03/26/20 15:17
Joined: Oct 2018
Posts: 22
7
7th_zorro Offline
Newbie
7th_zorro  Offline
Newbie
7

Joined: Oct 2018
Posts: 22
Thank you jcl. I use visual c++ 2017. When I try to test the sample "RTest.c", There is some exception error when closing. Please check that (running code in visual c++).

Re: New Zorro version 2.25 [Re: jcl] #479394
03/26/20 16:45
03/26/20 16:45
Joined: Jul 2000
Posts: 27,148
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,148
Frankfurt
Check if you converted it correctly. Compare your code with the VC++ version of RTest in the MyStrategy.cpp example.

Re: New Zorro version 2.25 [Re: jcl] #479396
03/26/20 18:07
03/26/20 18:07
Joined: Oct 2018
Posts: 22
7
7th_zorro Offline
Newbie
7th_zorro  Offline
Newbie
7

Joined: Oct 2018
Posts: 22
I tried but the exception position is somewhere inside of zorro systems. So I can't proceed further.

Re: New Zorro version 2.25 [Re: jcl] #479399
03/26/20 21:43
03/26/20 21:43
Joined: Jul 2000
Posts: 27,148
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,148
Frankfurt
It is unlikely that you get an exception and all other people with the same code get none. Compare your code with the included cpp and check also your VC++ setup. Follow the instructions in the manual. Maybe the struct alignment is wrong or something like that.

Page 3 of 3 1 2 3

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1