Login Page - Create Account

Support Board


Date/Time: Mon, 03 Aug 2026 05:20:43 +0000



custom studies crashes when trying to add a custom study i built

View Count: 725

[2026-06-15 02:03:49]
User793675 - Posts: 12
Sierra Chart runs normally. Existing custom studies already on charts work. Built-in studies such as Moving Average can be added normally. Build Custom Studies opens normally. However, when I select Add Custom Study, Sierra immediately closes with no error message. This started after compiling several ACSIL studies. I have already removed many old files and the problem remains.
[2026-06-15 11:56:55]
User431178 - Posts: 896
when I select Add Custom Study, Sierra immediately closes with no error message. This started after compiling several ACSIL studies. I have already removed many old files and the problem remains.

You have some error in your code, either in the set defaults block or above it, or maybe you forgot the return at the bottom of set defaults?
The set defaults block and anything above it runs when you open the add custom study window.
[2026-06-15 12:54:27]
User793675 - Posts: 12
how do i resolve this and access custom studies so i can add custom studies i am building?
[2026-06-15 13:08:35]
User431178 - Posts: 896
how do i resolve this and access custom studies so i can add custom studies i am building?

1. Close Sierra Chart
2. Delete the all the DLL files that you've built, unless you know which one is the cause (maybe copy the DLLs to a temp folder so you don't lose them all if only one is problematic).
3. Fix the error(s) in your code and rebuild the study or studies.

If you don't know from your code what you've done wrong you can copy/paste the relevant parts here.
[2026-06-15 15:44:52]
ForgivingComputers.com - Posts: 1234
how do i resolve this and access custom studies so i can add custom studies i am building?

This is often the result of a divide by zero error. Check all your formulas to ensure this cannot occur.
[2026-06-15 15:56:26]
User793675 - Posts: 12
A blank ACSIL study with only SetDefaults and return crashes Add Custom Study after compiling. Removing the DLL fixes it. Existing V4 custom study loads correctly.
[2026-06-15 15:57:39]
User793675 - Posts: 12
ere is the exact blank test code that crashes Add Custom Study after compiling:

#include "sierrachart.h"

SCDLLName("SC_SAFE_LOAD_TEST_01")

SCSFExport scsf_SC_SAFE_LOAD_TEST_01(SCStudyInterfaceRef sc)
{
if (sc.SetDefaults)
{
sc.GraphName = "SC SAFE LOAD TEST 01";
sc.StudyDescription = "Absolute safe-load test.";
sc.GraphRegion = 0;
sc.AutoLoop = 0;
sc.UpdateAlways = 0;
sc.CalculationPrecedence = LOW_PREC_LEVEL;
sc.ValueFormat = VALUEFORMAT_INHERITED;
return;
}

return;
}

There is no divide by zero, no formulas, no arrays, no inputs, and no external study references.

When the compiled DLL exists, opening Analysis >> Studies >> Add Custom Study crashes Sierra Chart. When I delete the compiled DLL, Add Custom Study works again.

Existing older custom DLLs load correctly.
[2026-06-15 15:58:00]
User793675 - Posts: 12
Could this be caused by the DLL name, build output folder, stale compiled DLLs, duplicate exports, compiler settings, or a corrupted custom studies build cache?
[2026-06-15 16:12:58]
ForgivingComputers.com - Posts: 1234
As expected, the study does not crash the platform on my system. I would try a different instance.
Date Time Of Last Edit: 2026-06-15 16:13:30
[2026-06-15 19:07:16]
John - SC Support - Posts: 47426
We are not certain we are fully understanding the workflow that causes this.

Please verify the following, which is what we think we understand from the statements:
- New study is created per the code in post #7.
- The .cpp file is located in the 'ACS_Source' folder under your main Sierra Chart installation folder.
- Sierra Chart is running and you select "Analysis >> Build Custom Studies DLL". The "Build Advanced Custom Studies" window comes up.
- You select the .cpp file that contains the program for the "Files to Compile" on the "Build Advanced Custom Studies window.
- You select "Build >> Remote Build - Standard".
- The custom study is compiled without issue - You see the following lines in the "Build Output":
-- The remote build is complete
-- The build succeeded
-- The compiler response is empty
- You can add this study to a chart without any issue.
- You try to compile the study again and Sierra Chart crashes.
- Sierra Chart crashes every time you try to compile until you remove the .dll file from your 'Data' folder.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2026-06-15 19:15:06]
User793675 - Posts: 12
he workflow is different from what you described.

What actually happens is:

A new .cpp file is created in the ACS_Source folder.
Sierra Chart is running.
Analysis >> Build Custom Studies DLL is opened.
The .cpp file is selected and built using Remote Build - Standard.
The build completes successfully and the Build Output shows:
The remote build is complete
The build succeeded
The compiler response is empty
The problem does NOT occur during compilation.
After the DLL is created, I go to Analysis >> Studies >> Add Custom Study.
At that point Sierra Chart crashes while opening or loading the Custom Study list.
I do not necessarily add the study to a chart first. The crash occurs when trying to access the Custom Study list after the DLL has been created.
If I remove the newly created DLL from the Data folder, Sierra Chart no longer crashes and Add Custom Study works again.
Existing custom studies such as ATPSEV1_V4_CLEAN continue to work correctly.

So the crash appears to be related to Sierra Chart loading or enumerating the newly created DLL rather than the compilation process itself.
[2026-06-15 19:42:55]
User793675 - Posts: 12
Clarification:

The crash does not happen during compile.

The compile finishes successfully.

The crash does not happen after adding the study to a chart.

The crash happens when I open Analysis >> Studies >> Add Custom Study after the new DLL has been created.

Sequence:

1. I compile the new .cpp using Remote Build - Standard.
2. Build output says the remote build completed and succeeded.
3. I then click Analysis >> Studies >> Add Custom Study.
4. The Add Custom Study window starts to open / hangs for a few seconds.
5. Then all of Sierra Chart closes.
6. If I remove the newly created DLL from the Data folder, Sierra opens Add Custom Study normally again.

So Sierra appears to be crashing while scanning/loading the newly compiled DLL into the Add Custom Study list.
[2026-06-15 20:05:36]
John - SC Support - Posts: 47426
Although we do not think it is related, what is the name of the .cpp file you have setup for this?
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2026-06-15 20:16:57]
User431178 - Posts: 896
Are you doing anything with memory allocation in your working studies?
If you don't delete the new DLL, does the program still crash after it's restarted?

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

Login

Login Page - Create Account