Hi, I have an indicator that makes a mark next to a bar under certain conditions. It’s not programmatically exposed. It might be a stretch, but it’s easy to capture a bitmap of a chart from within NinjaTrader, and I was thinking I could scan the bitmap. However, I need to be confident I am accessing the correct location in the bitmap of the bar and the pixels that run along it to the right. Has anyone done anything similar? Thanks.
Give a more precise and detailed explanation and I may be able to help you.
For example, what “bar information” are you trying to detect?
Pixel scanning should be the fallback. If the source can be changed, expose a bool or plot value instead. If it cannot, map the bar through the chart’s bar-index and x-coordinate APIs, then map the marker value through the correct chart scale. Do not use a fixed pixel offset. Capture only after the chart has rendered, keep DPI and zoom fixed, and validate on a known bar plus a scroll and resize. If the marker lives in a separate indicator panel, use that panel’s scale. A small exposed data series is much more stable than reading a screenshot.