Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 20:05:18 +0000



Post From: sc.YPixelCoordinateToGraphValue();

[2017-03-17 01:14:33]
User553714 - Posts: 184
I can't seem to return the GraphValues using sc.YPixelCoordinateToGraphValue for anything other than the main price graph?
I am using this simple line of code;
ClientWindowHeightInRegionValueRun = sc.YPixelCoordinateToGraphValue(sc.StudyRegionTopCoordinate), sc.YPixelCoordinateToGraphValue(sc.StudyRegionBottomCoordinate);

When the following is placed in a study in the main price graph region it returns correctly, see below;
GraphValue Top & Bot : 0.77019, 0.76565 | 2017-03-17 11:49:24 * (Correct)

When the same line of code is placed into the client window of an MACD study it returns incorrect values, see below;
GraphValue Top & Bot : 15000000.00000, -316000000.00000 | 2017-03-17 11:56:14 *
It should have returned the GraphValues of the MACD study IE the upper and lower MACD scale values?

Can sc.YPixelCoordinateToGraphValue() be used in any ChartRegion or only the main price chart region 1?