Scatter charts show unconnected shapes that reflect the two-dimensional values of each data point intersection on supplied data series.

 

Syntax:

chart.AddScatter(AsSeries(xSeries),AsSeries(ySeries),ElementCount,[Symbol],[Size])

 

Parameter:

Description:

xSeries

An array of numbers representing the x values of the data points. If no explicit x coordinates are used in the chart (eg. using an enumerated x-axis), an empty array may be used for this argument.

ySeries

An array of numbers representing the y values of the data points.

 

Note:

Use with all BPV Numeric or String series that are passed to any Chart parameter.

AsSeries(...) function conditions the series so the chart function will be able to use the information contained within each of the series elements.

ElementCount

Number of data elements in the series.

 

Note:

Manually Sized Series:

GetSeriesSize function provides the element count.

 

Auto-Index series:

BPV: test.currentDay property reports last series element index.

IPV: instrument.bar property reports last series element index.

[Symbol]

Bar Shape Elements by Number

Enter #:

Shape Description:

1

Square shape

2

Diamond shape

3

Triangle pointing up

4

Triangle pointing right

5

Triangle pointing left

6

Triangle pointing down

7

Circle

 

[Size]

Optional parameter will create symbols the at size entered.

Default symbol size is 12-Pixels.

 

Example:

'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  Win Trade Code Example - More code available in blox "Trade Charts"

'  --------------------------------------------------------------
'  Create a scatter chart of Winning Trades
chart.NewXY( "Winning Trades", 415, 400 )
'  Display each trade's profit as a chart dot
chart.AddScatter( AsSeries( labelSeries), AsSeries( dataSeries), count, 3, 8 )
'  Display the average of the sum of all winning trades as a line
chart.AddLineSeries( AsSeries( dataAverage ), count, "Avg Win$", ColorRGB(0,255,0) )
'  Display the Chart's labels for X & Y Axis scales
chart.SetAxisTitles( "Winning Trade Number", "Profit ($)" )
'  Create the chart as an image file in the current test folder.
chart.Make( test.resultsReportPath _
          + "\Winning Trades" _
          + AsString( test.currentParameterTest ) _
          + ".gif" )
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Returns:

Click to Enlarge, Click to Reduce.

Trade Charts Blox - Win Loss Report Image Example

 

Links:

AddLineSeries, AsSeries, Make, NewXY, resultsReportPath, SetxAxisLabels, SetAxisTitles, SetPlotArea

See Also:

Chart

 


Edit Time: 9/25/2017 09:09:54 AM


Topic ID#: 127

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software