R
R
roll262018-10-23 19:06:37
Python
roll26, 2018-10-23 19:06:37

Which method to choose for working with QUIK in a Python application?

By work, I mean both the possibility of obtaining data and filing applications. As a result of the search, the following options were identified:

  1. You can use DDE or ODBC to export data. To work with DDE in Python, I did not find convenient solutions. As far as I understand, it is necessary to implement both the server and the client in Python itself, and DDE will be some kind of layer? In the case of ODBC, I'm wondering if it's possible to somehow automate the process of attaching to a database via ODBC, or does it need to select a table each time, right-click, etc.? There is a trans2quik.dll API for submitting applications. A Python wrapper called PyQUIK has been found. So the chain (DDE or ODBC) + trans2quik.dll can give the desired result if implemented.
  2. Qlua programming. To communicate with Python, the lunatic-python library has been compiled. If someone tried this method, tell us how you ran a Lua script in QUIK using Python (in this case I got a number of errors from QUIK), and also how you transferred data between Lua and Python programs (I'm interested in transferring in both directions) .

Which way is better, which one is faster to implement, or maybe there are other ways?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DonStron, 2018-11-21
@DonStron

In the case of ODBC, I'm wondering if it's possible to somehow automate the process of attaching to a database via ODBC, or does it need to select a table each time, right-click, etc.?

With the "Output after creation" checkbox, which is set in the ODBC output settings in the table, Quick itself starts pushing data into the database immediately after Quick starts. Those. configured once and forgot, it works and starts by itself.
If you do not need autostart of export to the database, then there is a checkbox for output on demand: "Output when pressing Ctrl + Shift + O". You just make the Quick window active - you press a key combination and the data goes.
The same is true for DDE output (start after launch), however, in order to work correctly, the DDE server must be started before starting Quick. There is also a keyboard shortcut.
For the minimum output delay of the DDE op, the following setting is made in the Quick info file:
You can also consider the "all in one" option without a quick at all - this is SmartCom from the IT Invest broker. The Python module for connection is on the github, but I don’t know if it has been completed by enthusiasts to the end. My skills in Python are still lacking. True, a smartcom with a monthly subscriber, if the trading commission is less than the cost of the subscriber.
Now it works for me like this:
I get data for my cunning charts from Quick via ODBC, the python processes and shows them.
I installed the base and configured the output according to this instruction . I put the old versions so as not to understand, otherwise they complained in the comments that the settings in the new ones have changed.
For manual trading, a Kuscalp DDE drive is connected to Quick, where I place orders with my hands.
When I test the idea and improve my python skills, I will try to move to a smartcom with all this. Or maybe I’ll even rewrite everything under C #, it fits into the smartcom without problems, everything is ready. True, for this you will have to learn C #

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question