Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 21:34:10 +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