Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Cursor change
Collapse
X
-
Cursor change
Hi, I'd like to change cursor in a chart to let's say Cursors.Hand, is it possible somehow? When changing ChartControl.Cursor and ChartControl.ChartPanel.Cursor, the hand just flashes but the original cursor is immediately restored. Thank you.Tags: None
-
In fact it is in mouse click handler, I suppose it's also an unsupported area :-). On the other hand, this is just a standard Windows Forms framework, no rocket science. It just looks Ninjatrader forces the cursor internally to a specific type. Even confirming that it's not possible because of some internal cursor handling would help, I wouldn't have to spend time looking for a solution in that case. Unfortunately, with Ninjatrader there is almost always some solution if one looks and tries long enough, giving up too soon is not the best approach. Thank you.
Comment
-
Hi mantak007, could unfortunately not really provide much more background infos, however playing with that more generic C# in the ChartControls, this simple indicator seems to work well in my testing -
public class ChangeCursor : Indicator
{
protected override void Initialize()
{
Overlay = true;
}
protected override void OnStartUp()
{
this.ChartControl.ChartPanel.MouseDown += new MouseEventHandler(this.OnMouseDownEvent);
}
protected override void OnBarUpdate()
{
}
private void OnMouseDownEvent(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Middle && e.Clicks == 2)
{
ChartControl.ChartCursor = ChartCursor.Order;
ChartControl.Invalidate();
}
}
}
A double middle click and you change your cursor .Order.
Hope it helpsBertrandNinjaTrader Customer Service
Comment
-
MSedlak,
Attached is a sample script
Download and import the indicator into NinjaTrader -
To Import
* Download the indicator to your desktop, keep them in the compressed .zip file.
* From the Control Center window select the menu File> Utilities> Import NinjaScript
* Select the downloaded .zip file
* NinjaTrader will then confirm if the import has been successful.
Critical - Specifically for some indicators, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'Attached FilesCal H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by sofortune, Yesterday, 11:48 AM
|
2 responses
23 views
0 likes
|
Last Post Today, 07:11 PM | ||
Started by Zach55, 02-19-2024, 07:22 PM
|
2 responses
61 views
0 likes
|
Last Post
by lbadisa1
Today, 07:06 PM
|
||
Started by JGriff5646, Today, 05:47 PM
|
1 response
11 views
0 likes
|
Last Post Today, 06:45 PM | ||
Started by AlphaOptions, 06-18-2013, 08:24 AM
|
9 responses
2,200 views
0 likes
|
Last Post Today, 06:36 PM | ||
Started by ttrader23, Today, 09:33 AM
|
3 responses
24 views
0 likes
|
Last Post Today, 06:28 PM |
Comment