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 AdamDJ8, 05-07-2024, 09:18 PM
|
2 responses
15 views
0 likes
|
Last Post
by -=Edge=-
Today, 02:24 AM
|
||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
46 responses
4,099 views
3 likes
|
Last Post
by tradgrad
Today, 02:19 AM
|
||
Started by usasugardefender, Today, 01:42 AM
|
0 responses
1 view
0 likes
|
Last Post Today, 01:42 AM | ||
Started by haas88, 03-21-2024, 02:22 AM
|
15 responses
182 views
0 likes
|
Last Post
by haas88
Today, 01:29 AM
|
||
Started by brianfnoel, Today, 01:24 AM
|
0 responses
6 views
0 likes
|
Last Post
by brianfnoel
Today, 01:24 AM
|
Comment