Login Page - Create Account

Support Board


Date/Time: Thu, 18 Jul 2024 21:29:25 +0000



[User Discussion] - Linux

View Count: 77352

[2024-04-14 18:01:31]
ertrader - Posts: 666
+1. πŸ˜‚
[2024-04-26 01:20:15]
archymede - Posts: 19
to all fellow unix users, just a little comment to say that sierra chart rocks on freebsd, if you ever want to try a different taste of the unix world ;) (it won’t run on openbsd or netbsd though since those do not support wine).
also, with just a little text file in the .config the font smoothing issues are gone.
my only issue has ever been the support for a gaming mouse, but xbindkeys and xdotool does the job, sierra trading shortcuts are now working very well with my logitech mouse.
there is no need to turn on the setting to use a single buffer. I did notice though that compared to windows, the downloads are much much faster!
[2024-05-02 14:52:17]
YSS - Posts: 107
Anyone doing sierrachart ACSIL development on Linux? I run arch linux but I have a windows 11 Machine specifically for SC with Visual Studio for debugging. I tried C-lion but after attaching to .exe the breakpoints don't work but it works perfectly on Visual Studio.

I am doubting what body parts I would give up to have SC Native linux :-) We won't see this ever imho since SC is using the Win32 apis quite heavy.

Thanks.
Date Time Of Last Edit: 2024-05-02 14:52:49
[2024-05-02 15:40:38]
archymede - Posts: 19
yes, I do that, any simple editor will do it since you can remotely build your studies directly from sierra chart
[2024-05-02 15:58:02]
VLiviu - Posts: 217
one thing just came into my mind:
- SC doesn't need any marketing πŸ˜‚

Linux? check
custom build and config? check
reliable and fast? check
[2024-05-02 17:03:23]
YSS - Posts: 107
@archymede how do you set your breakpoints then?
[2024-05-02 17:23:13]
Tony - Posts: 488
@YSS,

I put Manjaro (Arch based) on my 9-year-old Mac Book, running Windows 10 with Oracle Virtualbox, I have no problem running Visual Studio, although I don't do ASCIL on my Mac Book though. I mainly using Windows 10 to test Ninja, the speed is acceptable to me.
[2024-05-02 19:14:42]
User900285 - Posts: 88
@YSS

Yes you can use the remote compiler, although if you include additional dependencies you might need to use a local compiler. I build the binaries on a Windows 11 virtual machine running inside my Debian 12 box. The software that runs the virtual machine is called LXD.

I edit the source and debug the studies on the parent Linux box. I switch over to the VM and build locally there using clang 16 which uses MSVS. I tell my build script which source I need to obtain, it grabs it using scp, builds the DLL on Windows 11 VM, then copies the binaries back over to the Linux box where I can run them on Sierra through Wine.
Date Time Of Last Edit: 2024-05-02 19:15:21
[2024-05-08 05:32:30]
Kiwi - Posts: 375
Regarding compilation. I just use linux with wine (currently MX-23.2_x64 with an NVIDIA GP108 and wine 9.0).

The easiest way is to just use remote compilation in the analysis > build custom studies menu.

Another way is to use the ming compiler. Install with
sudo apt install g++-mingw-w64-x86-64

and compile your code with

/usr/bin/x86_64-w64-mingw32-g++ -march=x86-64 -mtune=x86-64 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -w <file to compile>.cpp -o <output file and path>


More info in How to build ACSIL study on Ubuntu/Linux
Date Time Of Last Edit: 2024-05-08 05:33:08
[2024-05-08 12:45:33]
emmanuel - Posts: 49
I do ACSIL development on Linux, but I haven't tried using a debugger.

I have a shim which to Sierra Chart looks like the Visual C++ compiler, so that local builds work; Build Release and Build Debug.

The compiler is actually Clang, but I use Zig as an interface since it's easier to work with and the Zig build cache speeds up builds, once the cache is hot.

The shim consists of:

- a simple C++ program which is installed as cl.exe; This is the fake Visual C++ compiler. It's job is to grab the commandline arguments issued by Sierra Chart.
- a BASH script which acts as a bridge between the Windows and UNIX worlds. The Wine cmd.exe knows how to execute BASH scripts.
- the Clang compiler, which is executed on Linux and cross-compiles to Windows.

https://github.com/emmanuelrosa/erosanix/tree/master/pkgs/sierrachart-zig-msvc-shim
[2024-05-11 17:43:09]
emmanuel - Posts: 49
Update regarding debugging ASCIL on Linux...

It works :)

This means the entire development cycle is possible without touching Windows:

- Compile studies on Linux using Clang cross-compiling. Actually, I use Zig which then compiles with Clang targeting Windows.
- For debugging with GDB, compile the study with debug symbols in the DWARF 2 format: zig c++ -x c++ -shared -static -std=c++17 -target x86_64-windows -ffp-model=precise -v -g -gdwarf-2 -O0 $sourceFiles -o $dllFile
- As I've mentioned before, with a small shim installed to simulate cl.exe, this can all be done transparently behind the scenes so that you can just do Analysis -> Build -> Debug Visual C++. You can also build with a Makefile, which is what I've been doing lately.

To debug a study, execute SierraChart_64.exe using winedbg: winedbg --gdb --no-start path/to/SierraChart_64.exe

That will then display the remote connection, such as localhost:1234

From another terminal, use gdb to connect to winedbg.

Here's a video of it in action, but I should warn you. After numerous failed screen recording attempts, I gave up and grabbed my phone. And in the middle of the recording the dog walked in and... left me a gift.

Nevertheless, it's possible to debug and step through ASCIL code on Linux.

https://www.youtube.com/watch?v=0qMqAdpt56U
Date Time Of Last Edit: 2024-05-11 17:44:03
[2024-06-06 18:47:25]
ertrader - Posts: 666
Quick update: Latest versions are working well... have not noticed any new issues.

Latest configuration:
SierraChart Version 2544 64 bit (2 instances)
Wine 9.10
Mint Linux 21.3/Cinnamon desktop
Kernel 6.5.0-35 generic
AMD Ryzen 7 3800X
GeForce GTX 1660 Nvidia/6 GB GDDR5/Driver 545.29.06/OpenGL
Dual Monitors 1920X1080 60 Hz for both monitors
Total System RAM: 16 Gig
Memory usage: <500 Meg for main instance 200 meg for copy trade instance. This configuration greatly simplified my setup.
CPU Utilization: <8% for main instance <5% for copy instance.
28 Charts, 4 instruments and 4 ADR symbols (ES, YM, NQ, RTY, ADR-YM, ADR-TF, ADR-NASDAQ, ADR-SP)
Denali data-feed with MBO data
Teton Order Routing with Stage5/Advantage and Ironbeam
Rithmic for trader evaluations and PA accounts
RealVNC for remote access
Trade Copying from: https://www.simplesystemtrading.com/local-trade-copier/
Updated 6/6/24
[2024-06-08 13:23:46]
User692273 - Posts: 1
I have been using Sierra Chart via Bottles on my Mint Linux 21.3/Cinnamon machine, everything seems just fine, but my mouse cursor is tiny.

I have edited
1. registry (Bottle Settings > Registry Editor > HKEY_CURRENT_USER > Control Panel > Mouse > all size related values),
2. DPI settings (Bottle Settings > Advanced Display Settings > Screen Scaling),
3. and Environment Variables (Bottle Settings > Environment Variables > added DPI_SCALING_CURSOR_SIZE to over 100),
and still have a tiny cursor.

Any suggestions for possible solution? Thanks!
[2024-06-08 16:42:36]
ertrader - Posts: 666
I'm not using bottles so it might be different, however, my mouse cursor size is determined by Mint Linux in the Mouse and touch pad settings. It's in the main menu or under preferences.
Date Time Of Last Edit: 2024-06-08 16:45:21
imageScreenshot from 2024-06-08 12-44-43.png / V - Attached On 2024-06-08 16:45:13 UTC - Size: 50.52 KB - 58 views
[2024-06-08 17:26:08]
allons_trading - Posts: 22
Regardless if using Bottles or Wine directly to run SC, I've never noticed a difference in cursor size after SC is started.
[2024-06-08 18:19:50]
ertrader - Posts: 666
Yes, You are correct...I had thought they were but was mistaken...and do agree that there appears to not be anywhere to change it.
Date Time Of Last Edit: 2024-06-08 18:26:32
[2024-07-07 08:37:29]
nzfarmer - Posts: 6
Thanks for all the great help. Newbie here. Have managed to build .dll files using advice above but am hitting the following when trying to load the dll in SierraCharts:

2024-07-07 08:30:34.367 | button_studies.dll loading error. Windows error code 126: Module not found.
2024-07-07 08:30:34.367 | InternalVersionNumberToFileNameMap is empty for button_studies

Ah looks like I have my answer. Not sure how to resolve, but there are missing dependencies:

libgcc_s_seh-1.dll
ps5ui.dll
FxsDrv.dll
mmutilse.dll

Further to this, seems like an incompatibility. mingw++ is using gcc 12.0 and my version of wineg++ is 13.2.

Not sure, but I think the fix is to install wine by building it using the native mingw instance.
Date Time Of Last Edit: 2024-07-07 09:30:24
[2024-07-07 15:08:53]
ertrader - Posts: 666
If you do everything within wine and use SC's built-in compiler, does that work? That configuration works for all my custom code.
[2024-07-07 21:49:37]
nzfarmer - Posts: 6
Thanks etrader

I saw the compile dialog but it referred to Visual Studio Compiler? Did you populate this field?

Did look at installing Visual Studio with Wine but hit a wall.
[2024-07-07 22:14:09]
nzfarmer - Posts: 6
Compiling seems pretty straight forward. I'll upload the Makefile I crafted once I figure out the DLL dependency issue.

The main consideration for me was 35+ years experience using emacs, but keeping everything within the Linux side sits better with me.
[2024-07-07 22:56:33]
ertrader - Posts: 666
Use remote build if possible... you do not have to install anything if you do not want to. The visual studio path is if you want to compile locally but SC's compiler works seamlessly with the remote option.
Date Time Of Last Edit: 2024-07-08 00:16:37
[2024-07-09 10:44:26]
nzfarmer - Posts: 6
Regrettably I can't get past my issue:

Am trying to build a simple plugin:
https://github.com/masilver99/sierra-studies

Using:
CFLAGS = -march=x86-64 -mtune=x86-64 -O2 -static -static-libgcc -static-libstdc++ -s -fexceptions -w


It builds with no errors:

But when I select it via Add Custom Study I get the error
2024-07-09 10:39:58.584 | Found DLL: button_studies.dll
2024-07-09 10:39:58.584 | Found DLL: UserContributedStudies_64.dll
2024-07-09 10:39:58.593 | button_studies.dll loading error. Windows error code 126: Module not found.
2024-07-09 10:39:58.593 | InternalVersionNumberToFileNameMap is empty for button_studies
2024-07-09 10:39:58.593 | Closest match search for: Z:\home\andrew\SierraCharts\Data\button_studies.dll returned empty result. *


And the console logging:

011c:err:module:import_dll Library libgcc_s_seh-1.dll (which is needed by L"Z:\\home\\andrew\\SierraCharts\\Data\\button_studies.dll") not found
011c:err:module:import_dll Library libstdc++-6.dll (which is needed by L"Z:\\home\\andrew\\SierraCharts\\Data\\button_studies.dll") not found
011c:err:module:import_dll Library ps5ui.dll (which is needed by L"Z:\\home\\andrew\\SierraCharts\\Data\\button_studies.dll") not found
011c:err:module:import_dll Library FxsDrv.dll (which is needed by L"Z:\\home\\andrew\\SierraCharts\\Data\\button_studies.dll") not found
011c:err:module:import_dll Library mmutilse.dll (which is needed by L"Z:\\home\\andrew\\SierraCharts\\Data\\button_studies.dll") not found

Am not a Windows Developer so not really sure on these dependencies an DLL loading

The environment is:

andrew@cabin:~/SierraCharts/gitstuff/sierra-studies$ wine --version
wine-8.0.1 (Ubuntu 8.0.1~repack-3ubuntu2)
andrew@cabin:~/SierraCharts/gitstuff/sierra-studies$ x86_64-w64-mingw32-g++ --version
x86_64-w64-mingw32-g++ (GCC) 12-win32

I did try building my own wine and mono using x86_64-w64-mingw32-g++

Got close. After some tweaking I could build them both, and run wine, but somehow the mono library wasn't being found and the menus weren't working

Reverted to the apt get natives

So there is still a question mark around this being the issue (i.e. an incompatibility bewteen the g++ compiler and wine.)

Or perhaps I need to manually link those missing libraries somehow?
Date Time Of Last Edit: 2024-07-09 10:45:24
[2024-07-09 19:03:22]
ertrader - Posts: 666
It compiled with no errors for me using the default compiler in SC. No errors when added either. Attached are the .cpp, .dll and chart files.

Copy Button_Studies.cpp into the directory /SierraChart/ACS_Source

In SC, go to:
/analysis/build custom studies DLL
Select Button_Studies.cpp
Click Remote build
Date Time Of Last Edit: 2024-07-11 21:06:20
attachmentButton_Studies.cpp - Attached On 2024-07-09 19:02:36 UTC - Size: 10.68 KB - 15 views
Private File
attachmentButtonTest.Cht - Attached On 2024-07-09 19:02:46 UTC - Size: 3.81 KB - 14 views
[2024-07-09 19:05:19]
ertrader - Posts: 666
Latest configuration:
SierraChart Version 2654 64 bit (2 instances)
Wine 9.12
Mint Linux 21.3/Cinnamon desktop
Kernel 6.5.0-35 generic
AMD Ryzen 7 3800X
GeForce GTX 1660 Nvidia/6 GB GDDR5/Driver 545.29.06/OpenGL
Dual Monitors 1920X1080 60 Hz for both monitors
Total System RAM: 16 Gig
Memory usage: <500 Meg for main instance 200 meg for copy trade instance. This configuration greatly simplified my setup.
CPU Utilization: <8% for main instance <5% for copy instance.
28 Charts, 4 instruments and 4 ADR symbols (ES, YM, NQ, RTY, ADR-YM, ADR-TF, ADR-NASDAQ, ADR-SP)
Denali data-feed with MBO data
Teton Order Routing with Stage5/Advantage and Ironbeam
Rithmic for trader evaluations and PA accounts
RealVNC for remote access
Trade Copying from: https://www.simplesystemtrading.com/local-trade-copier/
Updated 7/9/24
Date Time Of Last Edit: 2024-07-09 19:06:03

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account