Tag Archives: Code Generation

Simulink code generation with HiRedis NOSQL Redis too complicated

Simulink code generation with HiRedis NOSQL Redis too complicated

This is of no use other than for archiving use

Join my FREE newsletter to learn when automated trading works

 

 

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!

Simulink code generation C with Redis demo

Simulink code generation C with Redis demo

I will have a video to walk you through the process of how to build a Simulink code generated model with calls to Redis embedded. This also includes the gotchas on the build process with CMake, make, Netbeans, etc.

CMake file basics: http://derekmolloy.ie/hello-world-introductions-to-cmake/

Netbeans C/C++ plugin install: https://netbeans.org/community/releases/72/cpp-setup-instructions.html

All code and files are available to my Quant ELITE members

 

Other notes:

Redis: Failed opening .rdb for saving: Permission denied

http://stackoverflow.com/questions/22160753/redis-failed-opening-rdb-for-saving-permission-denied

1. Launch or reset your IB TWS cleanly

2. Launch tor run or debug the IB RealTimeDataRedis.java in Netbeans as the default user (ie. caustic in my case). Mine is found in /home/caustic/interactivebrokers/IBJts/samples/Java/RealTimeDataRedis.java. You will need to run this.

This next step is confusing so I will use Eclipse-CDT for pure C/C++ development so it will not conflict with Netbeans as described in the next step. See the next step instead of #3 in my opinion.

3. Launch to Netbeans as a separate user as in root for the C program. Run or debug the testModel bin found under my folder of /home/caustic/Documents/MATLAB/KarenCWithRedis/testModel. You set breakpoints if needed

I found this link helpful to test a Redis connection with Hiredis for a C client using LRANGE:

http://codingsteps.com/installing-using-hiredis-c-client-library-for-redis/

4. Use Eclipse-CDT as same use for steps 1-2. sudo apt-get install eclipse eclipse-cdt g++. Note I have found Eclipse CDT full of strange bugs so I am trying current version of Code::Blocks for C/C++ development.

http://stackoverflow.com/questions/14721514/how-to-install-eclipse-with-c-in-ubuntu-12-10

http://stackoverflow.com/questions/14721514/how-to-install-eclipse-with-c-in-ubuntu-12-10

 

NOTE VIDEO segments are in order of:

How to find start entry point in Simulink code generated C source code

Switch to ert target for more c code generation options

How to set up Netbeans for C development with Simulink code generated model

Update cmakelist file for HiRedis library and h file

Working HiRedis C demo retrieving from Redis

Codeblockss demo of C with Simulink model calling Redis

 

 

Join my FREE if you want to learn how I use C/C++/Java to build automated trading systems

 

 

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!

Completed code generation of Matlab Simulink trading model to C++ to Visual Studio

I have some great news to report. I can UNIVERSALLY CREATE A  C++ DLL FROM MATLAB SIMULINK MODEL VIA THE SIMULINK CODER toolbox’s code generation process.

I may look at another price increase to another modest QuantLabs.net ELITE Membership increase.

-> SO JOIN NOW <–
I have various videos and postings on it:

1.. Youtube video on Matlab Simulink converted to C++ successfully with real time market data analytics for HFT potential.

https://quantlabs.net/blog/2013/01/youtube-video-on-matlab-simulink-converted-to-c-successfully-with-real-time-market-data-analytics-for-hft-potential/
2. .Big news! Microsoft Visual Studio .NET C# application example that can read a Matlab Simulink code generated from C++ DLL.

https://quantlabs.net/blog/2013/01/big-news-microsoft-visual-studio-net-c-application-example-that-can-read-a-matlab-simulink-code-generated-from-c-dll/

3. .Posted Important examples of .NET C# testing examples to call Simulink code generated C++ DLLs with further details.

https://quantlabs.net/blog/2013/01/posted-important-examples-of-net-c-testing-examples-to-call-simulink-code-generated-c-dlls-with-further-details/
Next step is to build the inflow component which includes the process of feeding real time market data into this new C++ DLL model. Stay tuned as I report back on this.

Once all these steps are complete and everything will be provided including the Simulink model and all source code, you can expect a modest price increase into QuantLabs.net ELITE Membership.

–> SO JOIN NOW <–
Here is a list of the benefits to this membership.
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!

Checklist for Simulink and code generation to C++

Checklist for Simulink and code generation to C++

There are a lot of gotchas and errors that can easily be part of this workflow. It is just a matter of wrapping your head around the right way to implement this

The source code files are now posted for my Quant Elite Members 

Join my FREE newsletter to learn more about Matlab Simulink

 

 

 

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!

Simulink code generation to c++ with Visual Studio build

Simulink code generation to c++ with Visual Studio build

Pretty impressive to convert from Simulink model to C++ right into your Visual Studio

Join my FREE newsletter to learn more mad science I come up with 

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 video of Matlab on Ubuntu Linux with code generation to C

Demo video of Matlab on Ubuntu Linux with code generation to C

This is a big deal as my first major step to move away from Microsoft technologies as I get closer a production trading system

All explained in this video

Join my FREE newsletter to learn more about this approach

 

 

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!

Matlab with MingW GCC for C++ code generation on Windows for MAX OSX and LINUX deployment

Matlab with MingW GCC for C++ code generation on Windows for MAX OSX and LINUX deployment

If this is possible, I would consider this a big WIN! This will enable you to code generation across all major platforms including Mac OS Windows and Linux. Booya. Follow these instructions:

http://stackoverflow.com/questions/8552580/using-gcc-mingw-as-matlabs-mex-compiler

http://stackoverflow.com/questions/8552580/using-gcc-mingw-as-matlabs-mex-compiler/28490382#28490382

One more reason to really like Matlab!!

Join my FREE newsletter if I plan to stick with the plan 

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!

Yes Matlab Code generation to C or C++ beats R hands down but still has limitations

Yes Matlab Code generation to C or C++ beats R hands down but still has limitations

From a visitor:

Have you been able to code generate for the Johansen test in matlab?

 

Matlab is a great product (superior to R IMHO) but it has its limitations too, not everything can be code generated into C++.

 

My response:

Yes it is very limited as Matlab Coder does not support many of the financial or quant math related toolbox functions. That can be a real pain but Mathworks keeps adding more functions to be supported by Matlab Coder.

See how I move ahead with this capability by joining my FREE newsletter

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!

Why the REAL Excitement builds for new custom HFT platform with DotNet and Matlab C++ code generation ?

Hi there

I just posted these videos:

Why Excitement builds for new custom HFT platform with DotNet and Matlab C++ code generation ?

https://quantlabs.net/blog/2013/08/why-excitement-builds-for-new-custom-hft-platform-with-dotnet-and-matlab-c-code-generation/

If you are into building custom trading platforms in C++, and .NET, these are some of the books that will definitely help (picked as faves by the London Quant):

Is this the best Excel Add in library package for DotNet and Csharp developers

https://quantlabs.net/blog/2013/08/is-this-the-best-excel-add-in-library-package-for-dotnet-and-csharp-developers/

Is this the best book for C++ and Boost programming ?

https://quantlabs.net/blog/2013/08/is-this-the-best-book-for-c-and-boost-programming/

Now it is time to get serious about building something!

Remember that limited time line for the QuantLabs.net Premium Membership as explained in the above video link!

–> JOIN NOW FOR IMMEDIATE ACCESS <–

Or get the many benefits listed here.

Bryan
.P.S.Don’t forget about my Academy.
1. You can learn R here if you cannot afford Matlab
2. You can learn some of the best potential profitable model forecasting with Matlab here
3. Learn more about open source trading as well here.
4. Feeling bold? Learn about it all here. the REAL

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!

Why Excitement builds for new custom HFT platform with DotNet and Matlab C++ code generation ?

Why Excitement builds for new custom HFT platform with DotNet and Matlab C++ code generation ?

Join my FREE newsletter to see how I will build this platform

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!