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)
Does anyone maybe have any ideas, even general direction would be awesome, for allowing a user to draw a box with their mouse on a chart in NT8? I wrote code that will draw a box between two price bars if the user clicks on the first bar and then the second. I would like to adapt this code to do the following:
The user clicks somewhere on the chart and drags his mouse while holding in the left mouse button to draw a box around a set of price bars. When the user releases the left mouse button, that would be the user defined box.
My biggest problem at this point is the normal chart behavior that when a user left clicks on the chart and moves their mouse, the chart pans left and right. Not sure if this can be disabled in code for the period that the box is drawn.
I am developing this specifically for NT8. Any help or advice would be greatly appreciated.
Popsicle
Can you help answer these questions from other members on NexusFi?
Thanks @ratfink. Unfortunately I need more control over the drawn box in terms of the bars it spans etc. I think you gave me an idea though, thank you very much. Will try it out.
Ok, cool. Be good to have people involved in these areas. In NT7 there is a lot of stuff around to help with capturing low-level events and using direct graphics, so it will be good to see some NT8 equivalents as well.
Thanks @ratfink for putting me on the right track. For those interested in doing something similar, it is now possible in NT8 to provide your own custom drawing tool. In NT7 this was quite a mission but they made it very easy in NT8.
I will be using the built in Rectangle drawing tool and writing a custom drawing tool to extend it with the functionality I need. The following Ninjatrader support forum post is an awesome place to start if this is something you want to do.