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 sidlercom80, 10-28-2023, 08:49 AM
|
172 responses
2,279 views
0 likes
|
Last Post
by sidlercom80
Today, 04:40 AM
|
||
Started by Irukandji, Yesterday, 02:53 AM
|
2 responses
17 views
0 likes
|
Last Post
by Irukandji
Today, 03:55 AM
|
||
Started by adeelshahzad, Today, 03:54 AM
|
0 responses
4 views
0 likes
|
Last Post
by adeelshahzad
Today, 03:54 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
13 views
0 likes
|
Last Post Yesterday, 11:58 PM | ||
Started by WeyldFalcon, 12-10-2020, 06:48 PM
|
14 responses
1,431 views
0 likes
|
Last Post
by Handclap0241
Yesterday, 10:43 PM
|
Comment