Login Page - Create Account

Support Board


Date/Time: Fri, 25 Sep 2026 18:59:38 +0000



Post From: GDI Drawing Custom Study Broken After Updating Sierra Charts

[2026-09-25 15:50:17]
mnill - Posts: 37
Hi,

I have a custom ACSIL study that uses Sierra Chart's custom GDI drawing (sc.p_GDIFunction) to draw directly on the chart.

The study was working before I updated Sierra Chart. After updating to the latest version the custom GDI drawing is no longer displayed. The study works on sierra chart version 2789, but not the current version of sierra charts.

The relevant part of the study is:

sc.p_GDIFunction = DrawUntestedRectangles;


The GDI callback is:

void DrawUntestedRectangles(HWND WindowHandle, HDC DeviceContext, SCStudyInterfaceRef sc)


Inside that function I use standard Windows GDI calls such as:

GetClientRect()
CreatePen()
SelectObject()
MoveToEx()
LineTo()
DeleteObject()


I also use Sierra Chart's:

sc.RegionValueToYPixelCoordinate()


to convert the price levels to chart Y coordinates.

I have not changed the drawing code between the version where it worked and the current version, so I'm wondering if something changed regarding sc.p_GDIFunction, the GDI callback, the HDC being supplied, or the way custom GDI drawing is handled in the newer Sierra Chart version.

Could someone point me toward what may have changed or what I should check to make this compatible with the current version?


Thanks!