Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1463

 
SuhanovDM94 #:
If I understood correctly, it's about exporting history. And I need to get ticks in real time. But thanks anyway
If you need it in real time, you can turn to freelance. They will do it.
 
Aleksandr Slavskii #:
If you need real time, you can turn to freelancing. They'll do it.

Yes, I would do it myself with pleasure, only I do not know from which side to approach) I would be grateful for a hint! Maybe there is some information on the forum on this issue?

 
SuhanovDM94 #:

I would do it myself with pleasure, but I don't know from which side to approach) I would be grateful for a hint! Maybe there is some information on the forum on this issue?

The easiest way is to write quotes to a file on one terminal in a shared folder and try to read this file by another terminal. But there are many pitfalls. In the write mode reading is not available. I.e. it is necessary to make a queue somehow. Terminals work only in their sandboxes and transfer of information between terminals is not a simple issue either. It is solved by writing from one file to another, for example, by a batnik or something else in some language. You can copy a file, but it is not an option if you just write and do not delete anything in the file. It will simply become large and copying will take too much time. Let's just say it's not for beginners.

 
Valeriy Yastremskiy #:

The easiest way is to write quotes to a file on one terminal in a shared folder and try to read this file by another terminal. But there are many pitfalls. Reading is not available in the write mode. I.e. it is necessary to make a queue somehow. Terminals work only in their sandboxes and transfer of information between terminals is not a simple issue either. It is solved by writing from one file to another, for example, by a batnik or something else in some language. You can copy a file, but it is not an option if you just write and do not delete anything in the file. It will simply become large and copying will take too much time. Let's just say it's not for beginners.

In one we open with FILE_READ|FILE_WRITE|FILE_SHARE_READ, in another with FILE_READ|FILE_SHARE_READ and normally write (only one) and read (many) at the same time.

Access between terminals is solved by symlink.

 
Valeriy Yastremskiy #:

The easiest way is to write quotes to a file on one terminal in a shared folder and try to read this file by another terminal. But there are many pitfalls. Reading is not available in the write mode. I.e. it is necessary to make a queue somehow. Terminals work only in their sandboxes and transfer of information between terminals is not a simple issue either. It is solved by writing from one file to another, for example, by a batnik or something else in some language. You can copy a file, but it is not an option if you just write and do not delete anything in the file. It will simply become large and copying will take too much time. Let's just say it's not for beginners.

I was thinking of doing it via MMF. But the only question is how to make a chart draw on these quotes?

 
JRandomTrader #:

In one we open with FILE_READ|FILE_WRITE|FILE_SHARE_READ, in the other with FILE_READ|FILE_SHARE_READ and normally write (only one) and read (many) at the same time.

Access between terminals is solved by symlink.

At the moment of writing, vinda will not let you read, there the vinda queue will be without error, and if it will write for a long time, it will return an error. Symlink will not reach everywhere too, only to the common folder, and in workers or testers I did not succeed.

And the syntax of the link can also be frozen, then the slash is wrong, then they need a couple of them)
 
Valeriy Yastremskiy #:

At the moment of writing, the vindex will not let you read, the vindex queue will be without error, and if it writes for a long time, it will return an error. Simlink will not reach everywhere too, only to the common folder, and in workers or tester I did not succeed.

And the syntax of the link can also be frozen, then the slash is wrong, then they need a couple of them)

It's a bit easier for me with symlinks - I don't have vinda.

 
I will try it this way: I will create a symbol with a formula like USDRUB/USDRUB - a chart with price 1 will be created. Then I will create an indicator that will read a file with USDTRY quotes from shared memory, then calculate the spread and draw it on this "single" chart as a regular line. I haven't thought of anything better yet. Thank you all for your advice!)
 
Valeriy Yastremskiy #:

At the moment of writing, the vindex will not let you read, the vindex queue will be without error, and if it writes for a long time, it will return an error. Simlink will not reach everywhere too, only to the common folder, and in workers or tester I did not succeed.

And the syntax of the link can also be frozen, then the slash is wrong, then they need a couple of)

Write to the common folder of all terminals. One writes - the others read and create a chart. This is a rough generalisation.

 
Artyom Trishkin #:

Write to a common folder of all terminals. One writes - the others read and create a chart. This is a rough generalisation.

it is clear, but in vindex when a file is used for modification, i.e. at the moment of writing access to reading is closed, and if the load on the CPU is large, it can be long, it should be taken into account somehow.

When in word360 or google general access and general editing there the problem with the queue is solved. Typing is not writing, autosave and manually save. And there is a queue.

And so, yes, of course, the Commons folder is not in the sandbox, it is outside.

Reason: