Support Board
Date/Time: Fri, 25 Sep 2026 18:59:40 +0000
GDI Drawing Custom Study Broken After Updating Sierra Charts
View Count: 40
| [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! |
| [2026-09-25 16:05:52] |
| mnill - Posts: 37 |
|
Ok, I figured it out. On version 2897, double precision floating point types are used for these ACSIL containers: sc.VolumeAtPriceForBars, so my containers were coming back blank. I had to update the code to get it to work again and now everything is fixed. You can close this thread! |
| [2026-09-25 16:56:06] |
| User719512 - Posts: 482 |
|
2897? Hopefully you are following Upcoming Development and Internal Number Precision Improvement Project The behavior you were seeing was addressed in post #7 in the thread I mentioned. ^^ good to see you solved your initial problem. |
To post a message in this thread, you need to log in with your Sierra Chart account:
