Websocket how? - page 21

 
Fedor Arkhipov:

So there is no way to request old candlesticks via websocket?

In the Expert Advisor (in the application program) they open WebSocket separately and ask for the required history separately through Rest. And from the moment when they are synchronized (no holes and stuff) they start trading,

but this is not about that - this is about how to live with hibou :-)

 
Maxim Kuznetsov:

In the Expert Advisor (in the application) they open WebSocket separately and ask for the required history separately through Rest. And from the moment when they are synchronized (no holes and other things) they start trading,

But now is not about that - now specifically about how to live with hibou :-)

Max, can you give us some time? Do you have experience in creating custom symbols in MT4?

That is, just getting market information by itself doesn't make sense, we would need to record it immediately and build a chart.

In other words, in the first, debugging phase, we can write market information directly from the console application into a quote file.
 
Алексей Барбашин:

Max, can you give us some time? Do you have any experience in creating custom symbols in MT4?

That is, just getting market information by itself does not make sense, we would need to record it immediately and build the chart.

In other words, at the first stage, the debugging stage, we can write market information directly from the console application to the quote file.

I can build it tomorrow, I don't think there will be a problem with that.

The most important thing is to get the candlesticks

 
Алексей Барбашин:

Max, can you give us some time? Do you have any experience in creating custom symbols in MT4?

That is, just getting market information by itself doesn't make sense, we would need to write it down immediately and build a chart.

In other words, at the first, debugging stage, we can write market information directly from the console application to the quote file.

Write it in CSV suitable for import and don't bother. When it starts working, you may think something;

PS in half a year or a year or two, the 4 will be finally killed.

PPS you can write at once with proper bows and in the right formats, but it's just really early - nothing has worked yet

 
Алексей Барбашин:

Max, can you give us some time? Do you have any experience in creating custom symbols in MT4?

That is, just getting market information by itself doesn't make sense, we would need to record it immediately and chart it.

In other words, at first stage, debugging, we can directly from the console application write market information to quote file.

Fedor, what I am suggesting.

We have two points of input in the program: the Program class (method Main)-for debugging in console application mode, and the ConnectorMQL class, which contains and will contain methods for connecting mql with sharp.

I suggest to create a separate class that will contain exactly those methods, which we will need and which we will be able to debug in the console mode, calling methods of this class and then the same methods we can simply redirect to the ConnectorMQL class.

What methods exactly do we need?

Connected() - during initialization, by passing the server name

Disconnected() - when we deinitialize it

SetSymbol() - for setting the desired symbol

GetTicks() - for selecting the next tick

ReqHistory() - To request the quotes history

GetHistory() - To get the quotes history, because when requested nothing will be returned, the socket will respond asynchronously.

 
Maxim Kuznetsov:

write in an importable CSV and don't bother. When it works, then you can think of something;

PS in half a year or a year or two, the 4 will be finally killed.

PPS you can write at once with proper bows and in the right formats, but it's just really early - nothing has worked yet

I was thinking to write immediately to the quote file, is it not possible? I remember a whole library of custom symbols published by fxsaber.

Initially, we can write the quotes into the database altogether.
 
Алексей Барбашин:

I was thinking to write directly to the quote file, is that not possible? I remember fxsaber publishing a whole library of custom symbols.

It's better - simpler. You won't understand C# code without a bottle
 
Fedor Arkhipov:
It's better - simpler. You won't understand C# code without a bottle.

Fedor, you've written a little in c#, is it any different from the same mql? What unfamiliar words did you see in VS editor?

Do you know that this editor allows you to edit mql texts too? :)

 
Алексей Барбашин:

Fedor, you've written a little in c#, is it any different from the same mql? What unfamiliar words did you see in VS editor?

Do you know that this editor allows you to edit mql texts too? :)

Yes, there are some confusions.

I've already read that it supports other languages too ))

 
Fedor Arkhipov:

yes, there are some misunderstandings.

I've already read that it supports other languages))

Imagine that you write a program in mql not in one file, but in different files, including them as include (borrowed from c++) . So, if you write a program on classes, then it's more convenient to write each class in its own file and unite the whole thing through include.

All these files will be available in MetaEditor.

Here are two navigators that perform the same function.

Ok, that's all for the sake of argument.

To consolidate the material we will go from the beginning. Create a new project (console application), let's call it BinaryTicks

After creating the project, we create a GlobalManager class in it and make it statically public. We will use it to create all our methods of socket operations.

Reason: