Gamestudio Links
Zorro Links
Newest Posts
Alpaca - anyone tried using them?
by DdlV. 10/28/20 19:38
Work in Indian markets
by AndrewAMD. 10/28/20 11:14
Force chart into a y-axis range?
by ozgur. 10/27/20 18:57
Special Bars Script
by atr. 10/27/20 09:06
Optimize in a ranked asset portfolio
by dBc. 10/27/20 06:33
MT4 - use more Zorro script
by danatrader. 10/27/20 06:23
TIP: Multiply Your Trade VPS
by danatrader. 10/27/20 05:48
AUM Magazine
Latest Screens
Paradox Vector
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
Who's Online Now
3 registered members (danatrader, AndrewAMD, Iglarion), 472 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
xilex, exshifta, mr_T0ma5, AVL, ruins
18530 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to use BrokerHistory2 #481461
09/18/20 12:29
09/18/20 12:29
Joined: May 2015
Posts: 319
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 319
Czech Republic
Hi,

Do you anybody know, how to use "BrokerHistory2" from plugin?

I cannot see in the manual.

Thanks
Milan

Re: how to use BrokerHistory2 [Re: Grat] #481464
09/18/20 12:45
09/18/20 12:45
Joined: Feb 2017
Posts: 1,119
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,119
Chicago
It is described here:
https://manual.zorro-project.com/brokerplugin.htm

Some knowledge of C structs and memory management would be helpful in using the function.

Re: how to use BrokerHistory2 [Re: Grat] #481466
09/18/20 12:50
09/18/20 12:50
Joined: May 2015
Posts: 319
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 319
Czech Republic
Yes,

this I read but:

Code
function run()
{
    assetList("Assets4");
    LookBack = 0;
    BarPeriod = 1;
    
    T6 mData;
    char symbol[7];
    
    strcpy(symbol,"EUR/USD");
    int n=BrokerHistory2 (symbol, 1600326000, 1600326000, 1, mData);



get this error

mt4Data compiling.......
Error in 'line 169:
'BrokerHistory2' undeclared identifier
< int n=BrokerHistory2 (symbol, 1600326000, 1600326000, 1, mData); >.

Re: how to use BrokerHistory2 [Re: Grat] #481467
09/18/20 12:56
09/18/20 12:56
Joined: Feb 2017
Posts: 1,119
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,119
Chicago
Ah, it looks like Zorro did not expose the function to Zorro scripts. You'd have to manually load the DLL file and set up a function prototype, etc etc.

It's been done before:
https://opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=478796#Post478796

Re: how to use BrokerHistory2 [Re: Grat] #481470
09/18/20 14:29
09/18/20 14:29
Joined: May 2015
Posts: 319
Czech Republic
G
Grat Offline OP
Senior Member
Grat  Offline OP
Senior Member
G

Joined: May 2015
Posts: 319
Czech Republic
Super, thank's


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1