Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT compilation #5

Closed
jobidon opened this issue Nov 14, 2024 · 5 comments
Closed

MQTT compilation #5

jobidon opened this issue Nov 14, 2024 · 5 comments

Comments

@jobidon
Copy link

jobidon commented Nov 14, 2024

Hi all! New to this repository and trying to compile the source. I am getting a compilation error when I ran `./build.sh tradeframe':

fatal error: MQTTClient.h: No such file or directory
   35 | #include <MQTTClient.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [MQTT/CMakeFiles/mqtt_static.dir/build.make:76: MQTT/CMakeFiles/mqtt_static.dir/mqtt.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:118: MQTT/CMakeFiles/mqtt_static.dir/all] Error 2

Is there a specific MQTT library that's required?
thanks!

@rburkholder
Copy link
Owner

rburkholder commented Nov 15, 2024

Please try building/installing my https://github.com/rburkholder/repertory repository. Turn on the build for Telegram as well. Let me know of issues.

I'll have to update my tradeframe build notes.

Thank you for the issue.

@jobidon
Copy link
Author

jobidon commented Nov 15, 2024

Thanks for the quick reply!
The "repertory" was not necessary since all the files were already in libs-build. I'm on Arch however, and beyond all the compiler and libraries, I had to install a few additional packages to get it to compile: base-devel and paho-mqtt-c (the latter is only available on AUR, which is not included by default in the package manager).

When compiling with cmake, the package configuration for Torch was not found.

By any chance, would you have additional material I could use to better understand the architecture of the platform?
I also noticed that you have a private tf2 project. Does that mean the trade-frame project (I'm assuming that is tf1) will not be maintained in the future?
I'll continue the installation, and report anything noteworthy here.
thanks again!

@rburkholder
Copy link
Owner

  • torch is only used in the rdaf directory, and shouldn't compile unless other dependencies are installed as well (there is a conditional compile in the root CMakeLists.txt file)
  • if you want to use torch, it would be a manual install, I believe I used https://pytorch.org/cppdocs/installing.html as a guide
  • AutoTrade project was a start at using simple ML capabilities (no pytorch but use of eigen for math) - is not yet complete
  • tf2 is a personal playground, which I randomly sync to trade-frame, which I did a few minutes ago
  • how did you encounter the torch requirement, it shouldn't arise in the default build
  • yes, documentation is lacking, I refer to the header files for the info I need when creating code -- the primary libraries can be found in the lib sub-directory
  • AutoTrade project is probably a good place to start with understanding some of the key characteristics
  • CurrencyTrader is a project where I'm going to test out a funky cubic polynomial indicator for predicting some interesting patterns in currency trading

@jobidon
Copy link
Author

jobidon commented Nov 16, 2024

I am just getting started but so far this appears to be a very complete platform with a very long list of features! Congrats on putting this together and opening it up like that!
A few more comments:

  • I modified rdaf/l2/CMakeLists.txt and removed the REQUIRED statement from: find_package(Torch REQUIRED). This downgraded the error, and the command completed with just a warning. I suspect there's a better way to handle this, but this appears to be working for the moment
  • I will install the platform without torch for now.
  • I manually copied the zlib directory from libs-build to trade-frame/lib and added a reference to it in the CMakeLists.txt. Perhaps the main CMakeLists.txt should have a reference to the external library using find_package(ZLIB REQUIRED) and target_link_libraries(trade-frame ${ZLIB_LIBRARIES})?
  • When I run cmake --build . --parallel 4 --config Debug I got the error: fatal error: cryptopp/base64.h: No such file or directory. Looks like the library from https://github.com/weidai11/cryptopp is also required
  • It looks like you are using IQFeed for data and IB TWS exclusively for order placement. Have you tried using the data feed from TWS API instead of IQFeed?
  • I've commented out the Alpaca reference in the main CMakeLists.txt to use the TableTrader project. Not sure if that's the right approach since I won't initially be testing the Alpaca route

@rburkholder
Copy link
Owner

  • for your build/install issues, look at the relevant sections in the libs-build/build.sh script. Each pre-requisite has its own section. Run the sections manually (search for the appropriate replacements in your distribution) (zlib is auto built and installed in the the /usr/local/lib directory)(the cryptoppp is a library package installed in the tradeframe section)
  • IB feed updates only 4x per second (ie an incomplete feed). IQFeed is a complete quote/tick feed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants