how to use BrokerHistory2

Posted By: Grat

how to use BrokerHistory2 - 09/18/20 12:29

Hi,

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

I cannot see in the manual.

Thanks
Milan
Posted By: AndrewAMD

Re: how to use BrokerHistory2 - 09/18/20 12:45

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

Re: how to use BrokerHistory2 - 09/18/20 12:50

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); >.
Posted By: AndrewAMD

Re: how to use BrokerHistory2 - 09/18/20 12:56

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
Posted By: Grat

Re: how to use BrokerHistory2 - 09/18/20 14:29

Super, thank's
© 2024 lite-C Forums