How to access the database from MQL4 , ORACL , MSSQL, MySQL - page 3

 

I have the same thing...

Dear Red.Line, I'd be very grateful if you could post the full code of a working script (the most primitive, jelly with a few lines)

 

Oh, I love bringing up topics... ;)))


There's everything... except the table in the database.

What should it be called? And what fields should be there and how many.

Well, it's not the first time...

SQL-запрос: 
CREATE TABLE `ticks` (
`margin` DOUBLE NOT NULL ,
`freemargin` DOUBLE NOT NULL ,
`date` DATE NOT NULL ,
`ask` DOUBLE NOT NULL ,
`bid` DOUBLE NOT NULL ,
`symbol` TEXT NOT NULL ,
`equity` DOUBLE NOT NULL 
) CHARACTER SET ascii COLLATE ascii_general_ci;


Hmm, it's working!!! :)

? 0 4962918.95 2008-04-28 163.72 163.69 EURJPY 4962918.95
? 0 4962918.95 2008-04-28 163.73 163.7 EURJPY 4962918.95

All that's left is to create a more informative table, e.g. add time.

And also to figure out the primary key... and why the margin is zero.



SZY: the margin is sorted out.

Nothing was open...

 
kombat:

Oh, I love bringing up topics... ;)))


There's everything... except the table in the database.

What should it be called? And what fields should be there and how many.

Well, it's not the first time...

SQL-запрос: 
CREATE TABLE `ticks` (
`margin` DOUBLE NOT NULL ,
`freemargin` DOUBLE NOT NULL ,
`date` DATE NOT NULL ,
`ask` DOUBLE NOT NULL ,
`bid` DOUBLE NOT NULL ,
`symbol` TEXT NOT NULL ,
`equity` DOUBLE NOT NULL 
) CHARACTER SET ascii COLLATE ascii_general_ci;


Hmm, it's working!!! :)




? 0 4962918.95 2008-04-28 163.72 163.69 EURJPY 4962918.95


? 0 4962918.95 2008-04-28 163.73 163.7 EURJPY 4962918.95

All that's left is to create a more informative table, e.g. add time.

And also to figure out the primary key... ...and why the margin is zero.



HH: with the margin figured out.

Nothing was open...

MS SQL or MySQL



MS SQL has not worked for me yet ... :-(, I can't use MySQL for my own reasons

 
YuraZ:
kombat:

Oh, I love bringing up topics... ;)))


There's everything... except the table in the database.

What should it be called? And what fields should be there and how many.

Well, it's not the first time...

SQL-запрос: 
CREATE TABLE `ticks` (
`margin` DOUBLE NOT NULL ,
`freemargin` DOUBLE NOT NULL ,
`date` DATE NOT NULL ,
`ask` DOUBLE NOT NULL ,
`bid` DOUBLE NOT NULL ,
`symbol` TEXT NOT NULL ,
`equity` DOUBLE NOT NULL 
) CHARACTER SET ascii COLLATE ascii_general_ci;


Hmm, it's working!!! :)




? 0 4962918.95 2008-04-28 163.73 163.7 EURJPY 4962918.95

All that's left is to create a more informative table, e.g. add time.

And also to figure out the primary key... ...and why the margin is zero.



HH: with the margin sorted.

Nothing was open...

MS SQL or MySQL



I haven't managed to run MS SQL yet ... :-(, for my own reasons I can't use MySQL



it seems that as an option that is necessary


http://www.sqlapi.com/

 
YuraZ:

MS SQL or MySQL



under MS SQL I have not yet succeeded ... :-(, for my own reasons I can't use MySQL


MySQL


Further research showed that the Expert Advisor connects to external databases very well,

and it's just as good at writing things...

All it takes is a few steps:

- get a MySQL database on the host

- enter the connect data into the Expert Advisor

- allow a firewall to connect

- enjoy the work... ;)


I have the base and did not hesitate to test it.

The result is great... !!!


Now a new area of research: reading from here.

But that's for later, the main thing is where to dig...

 
YuraZ:
YuraZ:
kombat:

Oh, I love bringing up topics... ;)))


There's everything... except the table in the database.

What should it be called? And what fields should be there and how many.

Well, it's not the first time...

SQL-запрос: 
CREATE TABLE `ticks` (
`margin` DOUBLE NOT NULL ,
`freemargin` DOUBLE NOT NULL ,
`date` DATE NOT NULL ,
`ask` DOUBLE NOT NULL ,
`bid` DOUBLE NOT NULL ,
`symbol` TEXT NOT NULL ,
`equity` DOUBLE NOT NULL 
) CHARACTER SET ascii COLLATE ascii_general_ci;


Hmm, it's working!!! :)



0 4962918.95 2008-04-28 163.73 163.7 EURJPY 4962918.95

All that's left is to create a more informative table, e.g. add time.

And also to figure out the primary key... ...and why the margin is zero.



HH: with the margin taken care of.

Nothing was open...

MS SQL or MySQL



MS SQL has not worked for me yet ... :-(, for my own reasons I can't use MySQL



looks like the right option


http://www.sqlapi.com/

DONE!!!



works...


I pass in a server procedure to write to the database

and direct insert also works


now i can store data in a convenient form and execute on line and not only in a neural network

and receive signals from MS SQL server...


MS SQL + MQL4

 
kombat:
YuraZ:

MS SQL or MySQL



under MS SQL I have not yet succeeded ... :-(, for my own reasons I can't use MySQL


MySQL


Further research showed that the Expert Advisor connects to external databases very well,

and it's just as good at writing things...

All it takes is a few steps:

- get a MySQL database on the host

- enter connector credentials into the Expert Advisor

- allow a firewall to connect

- enjoy the work... ;)


I have the base and did not hesitate to try it out.

The result is great... !!!


Now a new area of research: reading from here.

But this is later, the main thing is where to dig ...


everyone seems to be having a creative breakthrough!

 
YuraZ:

it looks like everyone's having a creative breakthrough!



Nah, I personally have this diarrhoea of basic thought... :))))))

 
kombat:
YuraZ:

MS SQL or MySQL



under MS SQL I have not yet succeeded ... :-(, for my own reasons I can't use MySQL


MySQL


Further research showed that the Expert Advisor connects to external databases very well,

and it's just as good at writing things...

All it takes is a few steps:

- get a MySQL database on the host

- enter connector credentials into the Expert Advisor

- allow a firewall to connect

- enjoy the work... ;)


I have the base and did not hesitate to try it out.

The result is great... !!!


Now a new area of research: reading from here.

But this is later, the main thing is where to dig ...

Is it really hard to run MySQL on your PC? :)

 
Andy_Kon:

Is it really hard to run MySQL on your PC? :)

Is that a question or... ? ;)))


If a question, then no, it's not difficult.

The Denver package takes about 15 minutes to deploy and a little configuration.

If the current base, it's probably even less time and hassle.

I do not know, I'm using the entire Chicken Run... :)))


If either ..., I do not see the practicality of a local base of information from MT.

My ideas to merge on the host, so that there deploy various projects,

or even simply, for example, to "monitor" the state of the trading account with the trust.

Yes, many things can come up ...

The main thing is to have one more source of information.