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
I have completely abandoned the idea of linking MT5 and Quick, I have only settled on Quick (DEE server + trans2quik.dll).
I am considering realization of this program.
Selector1 constantly gets data from DDE server and "stores" it in Storage and calls OnTick function in corresponding Child.
When calling GetStorageData, the DDE server should be paused and the data should be stored in Storage.
When Selector2 calls callback, DDE server and Storage recording should be suspended and GetStorageData call should be disabled
I.e. Selector2 has high priority, GetStorageData normal, and Selector1 low.
Questions:
How can I synchronize Selector1, Selector2 and GetStorageData gracefully?
Maybe there are concrete examples of such synchronization (I've never implemented such a thing)?
Abandoned the idea of linking MT5 and Quick, settled on Quick only (DEE server + trans2quik.dll)
I am considering realization of this program.
1. the very right decision to leave only Quick.
2. Connection via DEE is a very controversial solution. Many people say that DDE is unstable, but I don't know.
In my opinion, a better and more versatile solution, is a Lua-DLL application. I use this option. Of course, it's up to the owner.
1. the decision to keep only the Quick was the right one.
2. Communication via DDE is a very controversial decision. Many people say that DDE is unstable, but, I don't know.
In my opinion, a better and more versatile solution, is a Lua-DLL application. I use this option. Of course, it's up to the host.
I wrote a long time ago a DDE server for Quick - works smoothly and fast enough (not slower than Lua - DLL),
and it's not necessary to write additional code for Lua and DDL data receiver at all.
Added
As a matter of fact, I already wrote the program shown in the diagram (and it works), but ran into a synchronization problem.
I wrote a long time ago a DDE server for Quick - works smoothly and fast enough (not slower than Lua - DLL),
and there is no need to write additional code in Lua at all.
Since I haven't done any DDE, the question is - how is DDE made? I think there is a need to make a table with data, and then run it through DDE.
There is a confusion with events. Something has changed, and it looks like the whole table is passed to the DDE. Or am I wrong?
Let's say I'm wrong. Then how to identify the event on the receiving side?
As a matter of fact, I've already written the program shown in the diagram (and it works), but I ran into a synchronization problem.
Synchronizing what with what?
With Lua, this issue is solved by callbacks from the DLL to arbitrary data.
Since I haven't dealt with the DDE, the question is how is the DDE made? It seems that you have to make a table with data, and then run it through the DDE.
There is a confusion with events. Something has changed, and it looks like the whole table is passed to the DDE. Or am I wrong?
Let's say I'm wrong. Then how to identify the event on the receiving side?
In Quick, the required table is generated for output.
Finally, we launch our own application with DDE server and output this table via DDE.
At first output from Quick, the whole table is sent to DEE, then only the row from the table
in which changes occurred.
In the table itself (it is transmitted in full) there is (for example in my case) a tool name - this is the identifier
The DDE server itself has a few lines (I have it in Pascal, but there are many examples on the Internet in other languages)
A child window is created by the tool name (as in MT 5)
With what?
I described the problem in the diagram topic
I described the problem in the diagram topic
Sorry, didn't realise. If I understood it correctly:
Imho, the solution is to use a DBMS asStorage, say MS SQL Server. This may be a partial solution.
The second one is to use intermediate buffers-collections, like last in, first out. Well, and separation of threads.
Then there is no need to stop anything, everything is simply written into buffers. Well, and DBMS has multi-user access.
I apply all this, but I'm not friends with Pascal since 6.
PS They say you can use NET libraries from Pascal. To use asStorage, it might make sense to useSystem.Data,System.Data.DataSet andSystem.Data.DataTable. As I recall, there was no problem with multi-user access inDataTable.
ZZY2 Now I'm trying to use SQLite as a database, but no definite results yet. And it's certainly not a DBMS, but in a stripped-down form multi-user access is possible, and it's possible to create a database in memory.
No, I just need to synchronise 3 threads (basically write a Synchronizer), but
I don't know how.