Home > Net >  How can consult: c # nplot cross cursor to candle figure CloseData value?
How can consult: c # nplot cross cursor to candle figure CloseData value?

Time:01-21

Each master, I recently doing a similar trend of stock program, use the nplot - & gt; CandlePlot controls, the effect is good, but in the cross cursor movement, can only display the coordinates of the cursor, how can I get to the candles figure CloseData numerical one day? In map candles, date, the opening and closing price has been put into the array, just don't know how to remove with the cross cursor, ask ace to give directions,
I cross cursor figure:

Want to implement a similar soft effect:

1. The candle figure code is as follows:
CandlePlot cp=new CandlePlot ();
Cp. AbscissaData=https://bbs.csdn.net/topics/times;//dt. The Columns [" riqi "];
Cp. OpenData=https://bbs.csdn.net/topics/opens;//array
Cp. LowData=https://bbs.csdn.net/topics/lows;
Cp. HighData=https://bbs.csdn.net/topics/highs;
Cp. CloseData=https://bbs.csdn.net/topics/closes;//array
//cp. Label="candle figure";
Cp. StickWidth=10;
This. PLS. The Add (cp);
PLS. Refresh ();
2. Cross cursor code is as follows:
Private void pls_MouseMove (object sender, MouseEventArgs e)
{
Label1. Text="";
If (this. PLS. PhysicalXAxis1Cache==null | | this. PLS. PhysicalYAxis1Cache==null)
return;
System. Drawing. The Point here=new System. Drawing. The Point (e.X, e.Y);
Double x=this. PLS. PhysicalXAxis1Cache. PhysicalToWorld (here, true);
Double y=this. PLS. PhysicalYAxis1Cache. PhysicalToWorld (here, true);

If (lineCrossY!=null & amp; & LineCrossX!=null)
{
LineCrossY OrdinateValue=https://bbs.csdn.net/topics/y;
LineCrossX AbscissaValue=https://bbs.csdn.net/topics/x;

}

This. PLS. Refresh ();
}

CodePudding user response:

Pls_MouseMove event should be to open a layer, the list of CloseData CandlePlot displayed, losing turn off or hidden
  •  Tags:  
  • C#
  • Related