Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to enable crosshair when double clicking on the char
Collapse
X
-
How to enable crosshair when double clicking on the char
I have an indicator on the chart, now I want to add function in my indicator that auto enable crosshair when double clicking on the chart. I wonder which control I should add click event handler on, and what code I shoud put in the handler. Could you give me some hint?Tags: None
-
Hello,
Thank you for the question.
For the double click event, you could try utilizing the events on the ChartControl object, this is not a documented subject so there are no specific samples on this. There are also other double click actions already in the chart which may conflict but you could certainly try it out to see the result.
For invoking the chart tools, you could look into the ChartCommands class. While this wouldn't necessarily be something that is documented, you could likely invoke the chart command for this using the following syntax:
Code:ChartCommands.ChangeCursor.Execute(CrosshairType.Local);
JesseNinjaTrader Customer Service
-
How to enable crosshair when double clicking on the char
This is a reply to NinjaTrader_Jesse about my thread here, I don't know why I have no permission to reply that thead, so I post new thread here.
Jesse, after reading your suggestion, I wrote a sample to switch the crosshair between local and off automaticlly when double clicking left mouse, but it has some problem, it can't switch from local to off although the toolbar's crosshair icon is changed to off. See my sample.Attached Files
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
23 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
45 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
22 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment