Discussion of article "How to Access the MySQL Database from MQL5 (MQL4)" - page 7

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
ทำงานที่ยอดเยี่ยมฉันมีสอง EAs ใช้ MySQL ของคุณเชื่อมต่อบางส่วนของเขาสำหรับ MT4 บาง MT5 (ฉันมีเวลาที่ยากที่จะเขียนรหัสจาก MQL4 เพื่อ MQL5 แต่ตอนนี้ทุกอย่างทำงานได้อย่าง สมบูรณ์) ทำงานที่ยอดเยี่ยมฉันมีสอง EAs ซึ่งใช้ MySQL ของคุณเชื่อมต่อห้องสมุดบางส่วนของพวกเขาสำหรับ MT4 บาง MT5 (ฉันมีเวลาที่ยากที่จะเขียนรหัสจาก MQL4 เพื่อ MQL5 แต่ตอนนี้ทุกอย่างทำงานได้อย่างสมบูรณ์)
(ส่วนใหญ่เป็นราคาและข้อมูลใบสั่งซื้อ) - ฉันยังไม่ได้รีสตาร์ทเครื่องเท อร์มินัลการค้าหรือเซิร์ฟเวอร์ MySQL มานานกว่า 2 สัปดาห์ - ไม่มีการลดระดับประสิทธิภาพที่เห็นได้ ชัดหรือกา รั่วไหลของหน่วยความจำ, เขาทำงานพวกมีเสถียรภาพที่น่าสงสัย(ส่วนใหญ่เป็นราคาและข้อมูลใบสั่งซื้อ) - ฉันยังไม่ได้รีสตาร์ทเครื่องเทอร์มินัลการค้าหรือเซิร์ฟเวอร์ MySQL มานานกว่า 2 สัปดาห์ - ไม่มีการลดระดับประสิทธิภาพที่เห็นได้ชัดหรือการรั่วไหลของหน่วยความจำ, พวกเขาทำงานมีเสถียรภาพที่น่าสงสัย
เก็บงานที่ดี!เก็บงานที่ดี!
Hi, why I got this message? how to fix it?
Connection failed! Error: Can't connect to MySQL server on 'mysql.hostinger.co.id' (10061) <~~~ before it was 10060, i don't know why it's changing to that one
Can someone help me to solve it? I already tried googled it but I hit a wall.
Thank you
Hi, why I got this message? how to fix it?
Connection failed! Error: Can't connect to MySQL server on 'mysql.hostinger.co.id' (10061) <~~~ before it was 10060, i don't know why it's changing to that one
Can someone help me to solve it? I already tried googled it but I hit a wall.
Thank you
Hi,
I have a question. I'd like to record the trade in MySQL table but always get an error message that the query is empty.
When I print the error and the query, it is there:
Error #1065: Query was empty; 3
Query: INSERT INTO algo_trades (date, time, curr, ticket, error, trade, lot, entry, sl, tp, spread) VALUES ('2017-9-1','14:3:58','GBPUSD',8705334,0,'Sell',2,1.29892,1.29961,1.29812,0.9)
What cloud be wrong? I'm using this library in another code in the same way, and works absolutely fine.
Thanks a lot Eugeniy for sharing it.
Hi,
I have a question. I'd like to record the trade in MySQL table but always get an error message that the query is empty.
When I print the error and the query, it is there:
Error #1065: Query was empty; 3
Query: INSERT INTO algo_trades (date, time, curr, ticket, error, trade, lot, entry, sl, tp, spread) VALUES ('2017-9-1','14:3:58','GBPUSD',8705334,0,'Sell',2,1.29892,1.29961,1.29812,0.9)
What cloud be wrong? I'm using this library in another code in the same way, and works absolutely fine.
Thanks a lot Eugeniy for sharing it.
Probably faster to use Google.
http://www.joellipman.com/articles/sql/error-1065-query-was-empty.html
Probably faster to use Google.
http://www.joellipman.com/articles/sql/error-1065-query-was-empty.html
Hi Alain,
Thanks a lot! I could figure it out what was wrong.
In my case the broker gives me the currency symbol with a £ sign. I've deleted it and it works.
Thanks again.
Query = Query + "INSERT INTO `history` (an, oi, oc) VALUES (" + (string) AccountNumber() + ", " + (string) OrderTicket() + ", '" + (string) OrderComment() + "');";
what do i do wrong? it works with single-insert only
Hi Alain,
Thanks a lot! I could figure it out what was wrong.
In my case the broker gives me the currency symbol with a £ sign. I've deleted it and it works.
Thanks again.
Thanks for your time reading this artice. I've also checked your (https://www.mql5.com/en/code/11114), I've found such solution a long time ago (before MT4 build 600) and I liked the idea to make MQL and MySQL friendly. But just one thing I don't want to use is arrays to retreive the data from database. That's why I've built this solution for using with MT4 and MT5.
Also, I forgot to add x64-based project to the article, so you can download it right here, in discussion. Nothing was changed in sources, just DLL has been recompiled for x64.
Good luck,
Eugene
hi Eugeniy Lugovoy , thanks for your article, I used x32-based project in my (64bit windows with mql5) and I had this error :
2018.06.04 17:58:52.879 MySQL-001 (XAUUSD,H1) Cannot load '..\libraries\MQLMySQL.dll' [126]
and now Im trying to use your x64-based project that you uploaded that in this forum but i still have above error .
I tried to run one of scripts in 2 ways ,
first I put dll files in this address : ...\MQL5\Libraries
second I put them in this address : C:\Windows\SysWOW64
but neither of them worked .
Hi Eugeniy Lugovoy
I'm getting the following error not sure what is up!
The errors occurs on the MQLMySQL.mqh file
'StrToInteger' - function not defined MQLMySQL.mqh 224 10
'StrToDouble' - function not defined MQLMySQL.mqh 229 10
on the following lines of code:
int MySqlGetFieldAsInt(int pCursorID, int pField)
{
return (StrToInteger(MySqlGetRowField(pCursorID, pField)));
}
double MySqlGetFieldAsDouble(int pCursorID, int pField)
{
return (StrToDouble(MySqlGetRowField(pCursorID, pField)));
}
Kind Regards,