Login Page - Create Account

Support Board


Date/Time: Thu, 07 May 2026 07:00:27 +0000



GDI rendering into specific DOM columns on Sub Instance Trade DOM (OpenGL on)**

View Count: 11

[2026-05-07 02:55:32]
TopGunTrader - Posts: 303
Hello,

I'm developing an ACSIL custom study that needs to render filled colored rectangles and text into specific DOM columns on a Sub Instance Trade DOM, similar to the visual style used by Jigsaw Trader's momentum tails. Sierra version 2901, OpenGL ON, Windows 11.

I'm using the documented `sc.p_GDIFunction` callback with `sc.Graphics.*` API per the 2019 forum reply (ThreadID=44036). The callback fires reliably and basic rendering works — I can draw 250x250 cyan/yellow/magenta test rectangles at fixed pixel coordinates and they appear correctly. So the GDI path is working.

My problem is **resolving the correct pixel X coordinate for specific DOM columns**. I'm calling:

```cpp
const int x = sc.GetDOMColumnLeftCoordinate((n_ACSIL::DOMColumnTypeEnum)id);
```

For IDs 0-30, only some return non-zero values. The values returned change depending on which columns are in the Visible Columns list and their order. For example, with this Visible Columns configuration:
1. General Purpose 1
2. General Purpose 2
3. Label Column
4. Bid Size/Buy Column
5. Ask Size/Sell Column
6. Price
7. Recent Bid Volume
8. Recent Ask Volume

...IDs 11 and 12 return x=0, even though the Recent Bid Volume and Recent Ask Volume columns ARE in the Visible Columns list.

With a different configuration earlier (Recent Bid/Ask present, GP1/GP2 hidden), ID 11 returned x=2029 and ID 12 returned x=2065 — matching the visible position of the Recent Bid/Ask Volume columns on screen.

**My questions:**

1. What is the authoritative way to get the pixel X coordinate of the **Recent Bid Volume** and **Recent Ask Volume** DOM columns specifically? Is there a named enum constant for these in `n_ACSIL::DOMColumnTypeEnum`, or are they not addressable via this API?

2. Can a custom study draw filled colored rectangles + text into the Recent Bid Volume / Recent Ask Volume columns at all, or are those columns reserved for Sierra's internal rendering only? The 2019 forum reply mentions GP1, GP2, and Label as user-writable — are Recent Bid/Ask Volume columns also writable, or only GP1/GP2/Label?

3. If only GP1, GP2, and Label are user-writable, what is the recommended pattern for laying out three separate regions of custom rendering (e.g., recent volume heat map, plus a momentum gauge, plus a session-volume profile)? Is the answer simply to position multiple GP-style columns and customize widths, or is there a way to subdivide a single column?

4. Are there documented example studies in the latest /ACS_Source folder that demonstrate filled rectangle rendering into specific DOM columns via the GDI callback? GDIExample.cpp shows the API but not the column-targeting pattern.

5. Is the behavior of `sc.GetDOMColumnLeftCoordinate` documented for every value of `DOMColumnTypeEnum`, or only for the publicly-named constants (SUBGRAPH_LABELS, GENERAL_PURPOSE_1, GENERAL_PURPOSE_2)?

Thanks for your help — want to make sure I'm using the API correctly before continuing development.

[Optional: attach your ChrisStudies_DOM.cpp source as a code block or paste the relevant 100-line `RBA_DrawCallback` function]

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

Login

Login Page - Create Account