Is it possible to set a minimal step of which cursor(crosshair) will move? For example HG Copper futures has minimum tick of 0.0005. I was trying to LabelProviderBase. I made FormatLabel and FormatCursorLabel rounded to 0.0005. But cursor still can be stay on many positions between 2.9995 and 3.0000 for example, though it shows nearest label.
I want to send orders from the chart and I want cursor to have ablte to stop only exactly at 2.9995 or 3.0000 or any other number which 0.0005 multiple. How can I achieve that?
Please see screenshot. Cursor stays at 2.9997 though it shows 2.9995 because of my label format. Price can be 2.9995 or 3.0000 only. I don’t want for cursor to have ability staying between them.
P.s. I also noticed that If I add cursor to chart and move it aggressivle, CPU usage is grows extensively. Maybe setting of steps it can move will reduce cpu usage. Because by default it moves from point a to point b accross thousends positions.
- RTrade A asked 9 years ago
- You must login to post comments
It’s still not possible to do this, but we do have a nice set of tutorials on creating custom modifiers over at SCICHART FAQ > CHARTMODIFIERS (ZOOMING, PANNING)
Of particular interest is Custom ChartModifiers – Part 1 – Creating a Custom Rollover Modifier
You might also want to try overriding CursorModifier.OnModifierMouseMove and using our Convert Pixel to Data Coordinates API to snap the e.MousePoint to a certain resolution before passing to the base class.
e.g.
public class CursorModifierEx: CursorModifier
{
public override void OnModifierMouseMove(ModifierMouseArgs e)
{
// calculate new point here
e.MousePoint = // assign new point depending on your Snaps to algorithm
// use base.XAxis, base.YAxis and Coordinate Calculation API
// to calculate snap increments
base.OnModifierMouseMove(e);
}
}
- Andrew Burnett-Thompson answered 9 years ago
- You must login to post comments
Please login first to submit.