Support Board
Date/Time: Wed, 25 Jun 2025 17:53:28 +0000
Post From: ACSIL function to fetch Y-axis coordinate of price/depth levels on DOM
[2021-12-31 14:25:02] |
User907968 - Posts: 840 |
This just returns the Y-axis coordinate of where my mouse pointer is, not of specific price levels.
This is nonsense. int RegionValueToYPixelCoordinate (float RegionValue, int ChartRegionNumber); The sc.RegionValueToYPixelCoordinate function calculates the Y-axis pixel coordinate for the given RegionValue and the zero-based ChartRegionNumber which specifies the Chart Region. RegionValue will be a value within the Scale Range of the specified Chart Region. ChartRegionNumber is zero-based. The returned y-coordinate is in relation to the chart window itself. RegionValue can be any value you choose, it just happens that the example given uses 'sc.ActiveToolYValue'. For instance: int YPixelCoordinate = sc.RegionValueToYPixelCoordinate(sc.Close[sc.Index], sc.GraphRegion);
|