Harmonioc Drawing Tools for Trade Station

XABCD (Gartley Oregon Acoustics) Drawing Creature

The XabcdAnnotation allows a user to attracter a Harmonized or Gartley or Squash racquet pattern along a price chart. To make this annotation you birth to set points at overcritical turn-points that volition atomic number 4 connected by lines and polygons. Those points were limited by BasePointsCount (nonremittal value is 6).

Note: The Drawing Tools API in SciChart.Charting.DrawingTools is available in the Enterprise and SDK Editions of SciChart only

The XabcdAnnotation is a CompositeAnnotation (an notation which consists of a number of other annotations) which consists of:

  • LineAnnotations - which are connecting our points XA, AB, XB, AC, BC, CD, BD and XD
  • PolygonAnnotations - that are set inside the triangles formed by our points XAB and BCD
  • Textual matter labels - which are TextAnnotations

Additional properties specific to XabcdAnnotation admit:

  • Fill - defines the style for the polygon fils

Adding XabcdAnnotations via mouse click

To add an XabcdAnnotation via click you have to summate TradingAnnotationCreationModifier to your SciChartSurface.ChartModifier and set AnnotationType as XabcdAnnotation. Please control the article on the TradingAnnotationCreationModifier for how to use this type.

Declaring an XabcdAnnotation in XAML

To declare an XabcdAnnotation in XAML you have to announce the notation and so hold its InitialBasePoints ingathering that is actually collection of ComparablePoint objects. ComparablePoint stores X and Y values that are used for placing annotation point. InitialBasePoints collection is limited by BasePointsCount value. And default apprais is 6.

Declaring an XabcdAnnotation in XAML

Copy Encrypt

                          <!-- XAxis, YAxis, RenderableSeries omitted for brevity -->                          <                          s:SciChartSurface.Annotations                          >                          <!--Declare XabcdAnnotation-->                          <                          s:XabcdAnnotation                          IsEditable                          ="True"                          >                          <!-- Declare InitialBasePoints collection that is used for         creating annotation from XAML.         InitialBasePoints is in reality discernible collection of         ComparablePoint-s. ComparablePoint stores X and Y spot Evaluate.    -->                          <                          s:XabcdAnnotation.InitialBasePoints                          >                          <!-- Placing X luff -->                          <                          s:ComparablePoint                          X                          ="0"                          Y                          ="0"                          />                          <!-- Placing A manoeuver -->                          <                          s:ComparablePoint                          X                          ="2"                          Y                          ="4"                          />                          <!-- Placing B point -->                          <                          s:ComparablePoint                          X                          ="4"                          Y                          ="0"                          />                          <!-- Placing C point -->                          <                          s:ComparablePoint                          X                          ="6"                          Y                          ="5"                          />                          <!-- Placing D point -->                          <                          s:ComparablePoint                          X                          ="10"                          Y                          ="-2"                          />                          </                          s:XabcdAnnotation.InitialBasePoints                          >                          </                          s:XabcdAnnotation                          >                          </                          s:SciChartSurface.Annotations                          >                        

Delight Note that the XabcdAnnotation has limit of 6 establish points. As you can visualize here, you just have to set this 6points for XabcdAnnotation :[ X1= 0; Y1= 0], [ X2= 2; Y2= 4], [ X 3 = 4; Y 3 = 0], [ X 4 = 6; Y 4 = -4], [ X 5 = 9; Y 5 = 0], [ X 6 = 11; Y 6 = -4] .

Declaring an XabcdAnnotation in Cypher-Behind

To bring an XabcdAnnotation in code, simply use the followers C# code:

Declaring the XabcdAnnotation in Code

Simulate Inscribe

                          // Create a SciChartSurface. XAxis, YAxis omitted for brevity                                                    var                          sciChartSurface =                          spick-and-span                          SciChartSurface();                          // Create a XABCDAnnotation.                                                    var                          xabcd =                          new                          XabcdAnnotation();                          // XABCDAnnotation should be added to //SciChartSurface.Annotation assembling first, to make SetBasePoint() method acting //works correctly                          sciChart.Annotations.Add(xabcd);                          // Set X point of XABCDAnnotation                          xabcd.SetBasePoint(0, 0);                          // Lay A point of XABCDAnnotation                          xabcd.SetBasePoint(2, 4);                          // Set B point of XABCDAnnotation                          xabcd.SetBasePoint(4, 0);                          // Mark C point of XABCDAnnotation                          xabcd.SetBasePoint(6, -4);                          // Set D point of XABCDAnnotation                          xabcd.SetBasePoint(9, 0);                        

Declaring an XabcdAnnotation in MVVM

To add a XabcdAnnotation via a ViewModel you have to use SciChart markup extension titled AnnotationsBinding,

The AnnotationsBinding Markup Extension

Copy Code

                          <                          s:SciChartSurface                          Annotations                          ="                          {s:AnnotationsBinding Annotations}                          "                          >                          </                          s:SciChartSurface                          >                        

Now you need to produce collection for Annotations in ViewModel. Then create and bestow an XabcdAnnotationViewModel to that solicitation of Annotations like this:

Declaring the XabcdAnnotation in a ViewModel

Copy Code

                          public                          class                          MyViewModel : INotifyPropertyChanged  {                          public                          ObservableCollection<IAnnotationViewModel> Annotations {                          get; }                          public                          vacuum                          Foo()     {                          // Create a XabcdAnnotation.                                                    xabcd =                          unprecedented                          XabcdAnnotationViewModel();                          // XabcdAnnotation should Be added to         //SciChartSurface.Annotation collection first, to take a leak SetBasePoint() method         //works correctly                                                    Annotations.Add(xabcd);                          // Set X point of XABCDAnnotation                                                    xabcd.SetBasePoint(0, 0);                          // Set A point of XABCDAnnotation                                                    xabcd.SetBasePoint(2, 4);                          // Set B point of XABCDAnnotation                                                    xabcd.SetBasePoint(4, 0);                          // Set C point of XABCDAnnotation                                                    xabcd.SetBasePoint(6, -4);                          // Set D point of XABCDAnnotation                                                    xabcd.SetBasePoint(9, 0);     }  }                        

Harmonioc Drawing Tools for Trade Station

Source: https://www.scichart.com/documentation/win/current/XABCD%20%28Gartley%20or%20Harmonic%29%20Drawing%20Tool.html

0 Response to "Harmonioc Drawing Tools for Trade Station"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel