Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Hi all, I am writing a TS program that responds to mouse clicks. I need to know the price at which the user clicked the price chart. I have the code that responds to mouse clicks. It generally receives the x/y coordinates and those need to be translated to price.
The code below almost works. The problem is that the clientWindow.Height includes the height of the main price sub graph as well as any other panels I have on (MACD or what not). I need to access the height of the main price panel or perhaps someone has anothe approach as to how to convert y coordinates to price?
Can you help answer these questions from other members on NexusFi?
For anyone interested, I think I found the solution....
elsystem.InitializedEventArgs args has an attribute called DataStreamValue which returns the price on which the user clicked.
so it looks like: args.DataStreamValue
You can test that the price is between Getappinfo(Aihighestdispvalue); and Getappinfo(Ailowestdispvalue); and determine that the user clicked on the price chart and not on some other panel.
can you elaborate what exactly is not working for you? I suspect that you need to include the solution @onnb pointed out in his second post for the code to work.
I took the code and attempted to run it. Nothing is happening. I was hoping it will show me the price on the chart or log, nope. I want to to get the price after I click on the chart, with that price I wanted to buy or sell a security. That is what I am attempting to do. If you know, it will be great show me some example or sample code.