Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
mouse clicked
Collapse
X
-
Hello,
Thanks for your post.
Unfortunately, we do not keep documentation on third-party NinjaScripts. I recommend reaching out to the third-party vendor or writer of that indicator for support on this.
If you have any further NinjaTrader questions please let me know.Josh G.NinjaTrader Customer Service
-
no it is my indicator on mouse clicking which I got the information from you. I was wondering if NT does double mouseclick.
protected void MouseClicked(object sender, MouseButtonEventArgs e)
{
// convert e.GetPosition for different dpi settings
clickPoint.X = ChartingExtensions.ConvertToHorizontalPixels(e.Get Position(ChartPanel as IInputElement).X, ChartControl.PresentationSource);
clickPoint.Y = ChartingExtensions.ConvertToVerticalPixels(e.GetPo sition(ChartPanel as IInputElement).Y, ChartControl.PresentationSource);Last edited by ballboy11; 09-29-2017, 07:34 AM.
Comment
-
Hello,
Thanks for your note.
To use a double click in your indicator instead of a single click you will use a combination of ChartControl.PreviewMouseLeftButton and ClickCount. You can implement this similar to the snippet of code below.
protected override void OnStateChange(){
if (State == State.SetDefaults)
else if (State == State.Historical){
if (ChartControl != null)
ChartControl.PreviewMouseLeftButtonDown += ChartControl_PreviewMouseLeftButtonDown;
}
else if (State == State.Terminated){
if(ChartControl != null)
ChartControl.PreviewMouseLeftButtonDown -= ChartControl_PreviewMouseLeftButtonDown;
}
}
private void ChartControl_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (e.ClickCount == 2){
Print("Double click");
}
}
I also suggest checking out this page on WPF Preview Events:
https://stackoverflow.com/questions/...460266#1460266
If you have any further questions please let me know.Josh G.NinjaTrader Customer Service
- Likes 2
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
44 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
56 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
35 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
95 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
57 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment