Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 04:36:35 +0000



Post From: Using the percent version of Y value for the drawing tool

[2014-03-31 18:05:52]
Israel Gottlieb - Posts: 14
One way to set the Tool.BeginValue/EndValue of the UseTool drawing tool, is as a percent of the total screen height. I want to find this relative position on the screen, for a given price, in code. For example, say I have an ES mini-S&P chart, with a bar that has a LOW at 1740. I want to draw a mark 2% of the screen below that LOW price. I need a function that, given a price, returns its relative position on the screen. Say it returns 37% for the price 1740. Then I draw my mark at 35%. If there's another way to do go about this, please advise.

IG