Tag Archives: wxWidgets

Live intake: GUI with local Python Django on VS Code or Pycharm vs C++ Qt or WxWidgets

A couple of details for you technical geeks out there who want to build an automated trading system. My Python scripts are getting crazy to manage so Ithere are better ways to manage them through a graphical user interface. I have 2 paths to choose which will my future live intake :

GUI with local Python Django on Visual Studio Code or Pycharm vs C++ Qt or WxWidgets

https://quantlabs.net/blog/2018/12/gui-python-django-vs-c-qt-wxwidgets/

The other track is with Qt 5 Designer with Python which I got working:

Qt5 Designer builder does exist for GUI file to convert into Python

https://quantlabs.net/blog/2018/12/qt5-designer-builder-does-exist-for-gui-file-to-convert-into-python/

Which path would you be interested in doing?

There are ways to enhance my GUI with Python. I will be applying this to my current course:

Python 3 Infrastructure Blocks with Crypto

A live intake  will be starting in early Jan 2019. This may be my only one I will ever do.

Let me know if you got questions on that.

Click here if you are interested in this LIVE intake course and details

https://quantlabs.net/academy/python-algo-trading-infrastructure-with-crypto-currency/

This will be extremely limited to a few people to keep the quality of delivering content high.

Thanks Bryan

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

GUI with local Python Django on Visual Studio Code or Pycharm vs C++ Qt or WxWidgets

This was a mess to get a real time chart using Chart Director. To get a graphical user interface, I must this was turning into a real hassle with C++. Qt version 5 is still too restrictive on the run time licensing end. Also, I find their IDE Qt Creator is just a beast where I really don’t want to use it. I even tried local Python with some moderate success.

I then tried using the open source edition of the CodeLite IDE with wxWidgets, I have had moderate success with this combo. It seem to get running on a Mac is not worth pursuing as it is way too old.

I then thought of trying the latest PyCharm Pro edition with ChartDirector and Django. Oh man, this is thing is a beast , They assume my package manager with my Python interpreter version 3 was using pip. I am actually using pip3 but to change that was not possible. You would think this was easy by justing adding the local Python interpreter. Pycharm did not recognize my local Python 3.6 but only found 3.1. When i navigated to the Python 3.6 to choose within the creator of the project, it would finally rconginze all the local Python packages. It took forever to load. Complete crap and not easy to play. Plus they want me to pay for this thing as it for the Pro edition.  Forget it!

I then had some moderate success with Visual Studio Code. It is these URL that make it much more possible:

https://code.visualstudio.com/docs/python/tutorial-django

OMG! Half the tutorial actually worked. I can also say I have much better understanding and appreciation for this IDE. I see why people like it since I got it to work.

Then we can talk about Django. No no no. Working with this framework made we want to stop. This thing is really old. There must be an easier way to build a real time charting with Chart Director. There has to be.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Proof of concept to load C++ class dynamically with wxWidgets and MongoDB NOQL calls

Proof of concept to load C++ class dynamically with wxWidgets and MongoDB NOQL calls

Important combination of these important concepts as I build out this automated trading in C++

http://stackoverflow.com/questions/496664/c-dynamic-shared-library-on-linux

Join my FREE newsletter to learn more about using these C++ concepts for automated trading

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

C++ Demo of finance chart with wxWidgets CodeLite wxCrafter

C++ Demo of finance chart with wxWidgets CodeLite wxCrafter

The easiest way to display static trading charts

Join my FREE newsletter to learn more C++ tricks for automated trading

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Demo of C++ wxWidgets wxGrid on Ubuntu Linux

Demo of C++ wxWidgets wxGrid on Ubuntu Linux

This works quite simply but… there is a trick with CodeLite with wxWidgets. Make sure you use the g++ compiler instead of gcc as there is some strange compiler error. This is on Ubuntu 14.05

 

Join my FREE newsletter to learn other samples I use from wxWidgets for automated trading

Source code (not my original code)

 

#include “wx/app.h”
#include “wx/frame.h”
#include “wx/grid.h”
#include “wx/datetime.h”

class MyFrame : public wxFrame
{
public:
    MyFrame()
        : wxFrame(NULL, wxID_ANY, “Chronological data”)
    {
        wxGrid *grid = new wxGrid(this, wxID_ANY);
        grid->CreateGrid(21, 12);

        for ( wxDateTime::Month m = wxDateTime::Jan; m < wxDateTime::Inv_Month; wxNextMonth(m) )
        {
            grid->SetColLabelValue(m, wxDateTime::GetMonthName(m));
            for ( int y = 0; y < 21; y++ )
            grid->SetCellValue(y, m, wxString::Format(“%.2f”, (float)rand() / RAND_MAX));
        }

        grid->InvalidateBestSize();
        SetClientSize(grid->GetBestSize());
    }
};

class MyApp : public wxApp
{
public:
    virtual bool OnInit()
    {
        (new MyFrame)->Show();
        return true;
    }
};

wxIMPLEMENT_APP(MyApp);

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Cross-Platform C++ GUI Programming with wxWidgets book

Cross-Platform C++ GUI Programming with wxWidgets book

You may want to check this out which could help

http://www.amazon.com/Cross-Platform-Programming-wxWidgets-Julian-Smart/dp/0131473816?ie=UTF8&keywords=0131473816&qid=1465312204&ref_=sr_1_1&s=books&sr=1-1

It looks like this frameworks includes all C++ functionality ranging from sockets, network, thread, dynamic class loading, etc. There is a lot more here than originally thought but this should be ok for lower frequency trading systems. If you want HFT level, this is not the framework for you.

Join my FREE newsletter to see how my wxWidgets learning impacts this automated trading

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Demo of wxWidgets wxCrafter CodeLite C++ on Ubuntu Linux

Demo of wxWidgets wxCrafter CodeLite C++ on Ubuntu Linux

Getting familiar with this tool. Note that this really works only on Linux with wierd problems on Mac OSX

Join my FREE newsletter to see how I use these tools for my automated trading

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Tips to build wxWidgets C++ for Ubuntu Linux with Codelite IDE

Tips to build wxWidgets C++ for Ubuntu Linux

Here are some notes to help 


https://www.wxwidgets.org/downloads/
../configure --enable-unicode --enable-debug

configure: error: 
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.

You may need to do: 
apt-get install libgtk2.0-common
http://forums.mozillazine.org/viewtopic.php?f=6&t=113419

Also, edit your Ubuntu bash profile
http://ubuntuforums.org/showthread.php?t=1707261
vim ~/.bashrc

Add your GTK library to LD_LIBRARY_PATH 
http://www.mathematik.uni-ulm.de/help/gtk+-1.1.3/gtkfaq-2.html

ALso, try installing with as this worked for me:
apt-get install libgtk2.0-dev

Install java 8
sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/#

I had serious issues with configuring Netbeans and Eclipse IDEs for wxWidgets, but it 
seems CodeLite IDE has preconfigured settings for wxWidgets. 

http://askubuntu.com/questions/330268/how-to-install-codelite-on-ubuntu

sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
sudo apt-add-repository "deb http://repos.codelite.org/ubuntu/ $(lsb_release -sc) universe"
sudo apt-get update
sudo apt-get install codelite wxcrafter

This link maybe useful as well http://www.tarsiersoft.com/addinfo/wxWidgetsInstall.php
 Join my FREE newsletter to learn more how wxWidgets  will help my automated trading 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Demo walkthrough of C++ open source wxWidgets wxFormsBuilder with Python

Here are my notes:

wxFormBuilder for Mac

As pointed out by @melto, a stable released version, 3.1.70, for os x works as well. The link to sourceforge http://sourceforge.net/projects/wxformbuilder/files/wxformbuilder/3.1.70/wxFormBuilder-3.1.dmg/download

 

http://stackoverflow.com/questions/20039063/how-to-build-wxformbuilder-3-x-on-mac

 

This was also mentioned for Windows or Linux only

http://www.philasmicos.com/phes/system-requirements.php

 

To install wxPython package into your Python on Mac OSX

brew install wxpython

http://superuser.com/questions/196197/installing-wxpython-via-pip-or-easy-install

 

Download wxWidgets from site (I downloaded v3.1)

I tried standard with latest GCC compiler

./configure

make install  (this takes a long time!)

make

 

When complete you will get this result but note where the new library resides:

if test ! -d /usr/local/include/wx-3.1/`dirname $f` ; then \

mkdir -p /usr/local/include/wx-3.1/`dirname $f`; \

fi; \

cp -fp ./include/$f /usr/local/include/wx-3.1/$f; \

done

 

Here is another set of library path (and include for the library)

/Users/quantlabsnet/Documents/cpp/wxWidgets-3.1.0/lib/wx/include/osx_cocoa-unicode-3.1/wx

 

Include director for headers (.h)

/Users/quantlabsnet/Documents/cpp/wxWidgets-3.1.0/include/wx

 

 

Another attempt to download/build wxWidgets on Ubuntu Linux  but Python

http://wiki.wxpython.org/InstallingOnUbuntuOrDebian

 

https://wiki.wxwidgets.org/Installing_and_configuring_under_Ubuntu

 

Configure Eclipse CDT https://wiki.wxwidgets.org/Eclipse

 

Instead I tried to make a sample project out of a project

/Users/quantlabsnet/Documents/cpp/wxWidgets-3.1.0/samples/image

make all

 

It worked! You go to directory of:

/Users/quantlabsnet/Documents/cpp/wxWidgets-3.1.0/samples

 

make all

This will make all sample projects executable

 

Description of samples here http://docs.wxwidgets.org/trunk/page_samples.html

 

Ones of interest: console, dialog, exec, image,layout, mdi (great layout components),

Menu, opengl/isosurf, richtext, sashtest, scroll, shaped, splitter (window), statbar, stc, thread, toolbar,xrc ,treelist, treectrl, listctrl, ribbon (another good gui)

++ many more

Configure Eclipse CDT https://wiki.wxwidgets.org/Eclipse

This may be better as a full on tutorial

http://max.berger.name.s3-website-us-east-1.amazonaws.com/howto/wxWidgets/eclipse/

 

Surprise from this tutorial:

Retrieving the settings on Mac OS X

If you have Mac OS X 10.4 or higher, it comes preinstalled with wxWidgets. Just open up a terminal and type:

It does include configuring help for Linux and Windows as well.

 

Another tip for Mac OSX with Eclipse

http://tutorialepecod.blogspot.ca/2013/06/compile-wxwidgets-on-macosx-108x.html

 

Join my FREE newsletter to see what I develop with this for my automated trading

 

 

 

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Open source C++ IDE with wxWidgets for GUI

Open source C++ IDE with wxWidgets for GUI

I am looking at Code::Blocks IDE with C++. I am also looking at the wxWidgets framework for graphical user interface. I am hoping to get some basic stuff going. Some links to consider:

http://wiki.codeblocks.org/index.php/WxSmith_tutorial:_Hello_world

http://www.codeproject.com/Articles/803106/Introduction-to-wxWidgets-GUI-programming-with-wxS

https://pacific.anisakai.com/access/content/user/cstutorials/Linux-Tutorial/linux14.html
Example C++ GUI application using Wxwidgets

 

Join my FREE newsletter to learn more about which way I go for automated trading 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!