kr0st / trade_replicator

Copy trades from master MT4/JForex account to a number of MT4 slave accounts, supports volume scaling and trade direction inversion.
BSD 2-Clause "Simplified" License
38 stars 28 forks source link

Runtime errors #1

Open stovedude opened 11 years ago

stovedude commented 11 years ago

Hello, there must be something wrong with my installation. For some reason, the code does not create the needed tables. I must do it manually, along with all 14 columns. How can I get it to create automatically?

kr0st commented 11 years ago

Hi, it is very hard to say what's wrong without more details. What's in the MT4 terminal journal? There should be more detailed error description.

As to the obvious reasons may be your DB user that is assigned to the Trade Replicator script does not have enough rights to be able to create DB tables.

stovedude commented 11 years ago

The other problem is that it will not run in MT4. It gives a "Cannot load library (error 126)" every time. I built the dll for Release using Visual C++ 2010, and I also checked it with Depends, which indicated that I'm missing a bunch of CORE dll's (such as API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL). I haven't found these files anywhere on the net. Probably need to reinstall Windows or something (I have Win 7 Ultimate 64). As far as the DB user rights, how do I change the rights? I am the admin on my pc, with no other users. I tried changing the privileges for my DB, but the OK button is always grayed out. I can add tables and columns manually through pgAdmin.


From: kr0st notifications@github.com To: kr0st/trade_replicator trade_replicator@noreply.github.com Cc: stovedude stovedude@ymail.com Sent: Saturday, August 24, 2013 7:15 AM Subject: Re: [trade_replicator] Runtime errors (#1)

Hi, it is very hard to say what's wrong without more details. What's in the MT4 terminal journal? There should be more detailed error description. As to the obvious reasons may be your DB user that is assigned to the Trade Replicator script does not have enough rights to be able to create DB tables. — Reply to this email directly or view it on GitHub.

kr0st commented 11 years ago

First MT terminal should be allowed to use EAs which load DLLs, refer to MT options. Then you might have missed the essential installation step - installing all Postgre client libs into MT terminal folder, please refer to readme of this project https://github.com/kr0st/postgremql4 At the end of the page you will find a link to a binary release package, you can get every dependency from there.

As for the DB user I was writing about DB credentials used to connect to DB, not the Windows user. I believe there is much info about how to administer PostgreSQL server all over the Internet so you will have no problem finding how to manage DB user rights.

stovedude commented 11 years ago

Thanks for taking the time to help me with this. I already have those files in the experts/library, but I re-installed them again to make sure (from the link you gave me). It still gives me the same error (Cant load library), and yes, the Allow DLL imports is checked as well as the the other usual options (I've worked with MT4 for several years now). My DB is also connected using pgAdmin. As for the DB rights, I'll do a some research into that. Thx again.


From: kr0st notifications@github.com To: kr0st/trade_replicator trade_replicator@noreply.github.com Cc: stovedude stovedude@ymail.com Sent: Saturday, August 24, 2013 9:54 AM Subject: Re: [trade_replicator] Runtime errors (#1)

First MT terminal should be allowed to use EAs which load DLLs, refer to MT options. Then you might have missed the essential installation step - installing all Postgre client libs into MT terminal folder, please refer to readme of this project https://github.com/kr0st/postgremql4 At the end of the page you will find a link to a binary release package, you can get every dependency from there. As for the DB user I was writing about DB credentials used to connect to DB, not the Windows user. I believe there is much info about how to administer PostgreSQL server all over the Internet so you will have no problem finding how to manage DB user rights. — Reply to this email directly or view it on GitHub.

kr0st commented 11 years ago

Hmm, maybe UAC plays a role in that.. There is a thing called "Compatibility Files" - if non-admin user wants to write something in "Program Files" folder, the write will succeed but files will be written to a special compatibility storage and not the real folder you wanted to place them. Not sure if that relates to your situation but maybe MT terminal just does not see the files. You may try running MT terminal in XP compatibility mode or admin mode (change properties on executable file).

Also you told that you compiled the lib using MSVS 2010, I believe that means you already have MSVS 2010 x86 Runtime installed on a PC where you try running Trade Rplicator, if not you should definitely install this http://www.microsoft.com/en-us/download/details.aspx?id=5555

Other than that I'm out of ideas - probably Depends will help you to find the missing dependencies..

stovedude commented 11 years ago

I possibly figured out the problem. I had changed the name of the slave ea (due to a few modifications I had added), but when I changed it back to the original name (and renamed the original), it attaches with no error. That is a strange fact I think. Do you have any ideas on why it cant be renamed? Thx.


From: kr0st notifications@github.com To: kr0st/trade_replicator trade_replicator@noreply.github.com Cc: stovedude stovedude@ymail.com Sent: Sunday, August 25, 2013 2:13 AM Subject: Re: [trade_replicator] Runtime errors (#1)

Hmm, maybe UAC plays a role in that.. There is a thing called "Compatibility Files" - if non-admin user wants to write something in "Program Files" folder, the write will succeed but files will be written to a special compatibility storage and not the real folder you wanted to place them. Not sure if that relates to your situation but maybe MT terminal just does not see the files. You may try running MT terminal in XP compatibility mode or admin mode (change properties on executable file). Also you told that you compiled the lib using MSVS 2010, I believe that means you already have MSVS 2010 x86 Runtime installed on a PC where you try running Trade Rplicator, if not you should definitely install this http://www.microsoft.com/en-us/download/details.aspx?id=5555 Other than that I'm out of ideas - probably Depends will help you to find the missing dependencies.. — Reply to this email directly or view it on GitHub.

kr0st commented 11 years ago

It's great that you were able to figure it out, however I am as puzzled as you with such behavior..

stovedude commented 11 years ago

I guess I spoke too quickly. As soon as the first tick came in when the market opened, it gave the same error. Could it possibly be my Windows 7 Ultimate 64bit platform? I see that XP is supported, although a friend has it running on Vista 32 bit.


From: kr0st notifications@github.com To: kr0st/trade_replicator trade_replicator@noreply.github.com Cc: stovedude stovedude@ymail.com Sent: Saturday, August 31, 2013 4:18 PM Subject: Re: [trade_replicator] Runtime errors (#1)

It's great that you were able to figure it out, however I am as puzzled as you with such behavior.. — Reply to this email directly or view it on GitHub.