This test.SetChartSimulationHtml function allows the user to insert HTML information, like a custom chart, an image file or text information into the Stepped Parameter Summary Performance report using Trading Blox Builder scripts.

 

When used, it creates an end of test tasks to automatically display a custom chart images, an image file, or scripted HTML wrapped text statements in the area below the Stepped Parameter Summary Performance Table.

 

Syntax:

'  Create a task item for the summary report to load
'  a custom chart below the plotted stepped parameter chart
'  at the top of the Summary Results Report.
test.SetChartSimulationHtml( sHTMLImageReference )

 

Parameter:

Description:

sHTMLImageReference

HTML Image loading reference that includes image path and full file name.

 

See code example below for exact details on how to create a HTML image source reference.

 

Notes:

This function is placed in the BEFORE TEST script section.

 

Image width and height assigned to this function should match that the size used to create the chart.  If the the space allocated by the HTML statement to too small, some of the displayed image will be blocked.  If they are too large, more space around the image will be added creating wasted space.

 

When used with a multiple stepped test, only one image should be created, so only one image is placed in the report.  With thread processing in Trading Blox it will be necessary to and it will be placed in the top section of the Summary Performance Report after the Contour and other simulation scoped graphs.

 

Where this method differs is in the placement of where this method's charts are placed in the end of test Summary Performance Report.  When this method is used, the created chart will be inserted right after the multi-parameter contour and 3D charts, which are created only once for the entire simulation, not for every test step.

 

In multiple step simulations, the Contour Stats block is a good example of setting the place holder in the Before Simulation script, checking for thread index one so that only one insert is made. As you know, every thread runs the Before Simulation script, so we don't want multiple inserts made.

 

Trading Blox Preferences:

Click on image to enlarge, click again to reduce

Preference settings to enable Custom Graphs and Custom Charts.

 

Display charts just below Multi-Parameter Table in the Stepped Parameter Summary Performance table:

Example - BEFORE TEST SCRIPT:

'  ==============================================================
'  This task will load the chart SystemEquity.jpg image into
'  the simmulation report:
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  This statement creates a single chart displaying task.
test.SetChartSimulationtHtml("<img src='" _
                            + test.resultsReportPath _
                            + "\SystemEquity" _
                            + AsString(test.currentParameterTest) _
                            + ".gif" _
                            + "' width=830 height=500>")
'  ==============================================================

OR

'  ==============================================================
'  This task will load two chart images in the
'  simulaiton report:
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  Next two lines assign the full path and file name to two BPV
'  variables:
chartHtml1 = "<img src='" _
              + test.resultsReportPath _
              + "\Winning Trades" _
              + AsString( test.currentParameterTest ) _
              + ".gif" _
              + "' width=415 height=400>"
             
chartHtml2 = "<img src='" _
              + test.resultsReportPath _
              + "\Losing Trades" _
              + AsString( test.currentParameterTest ) _
              + ".gif" _
              + "' width=415 height=400>"
 
'  This statement creates a task to display two charts

'  side by side.
test.SetChartSimulationtHtml( chartHtml1 + chartHtml2 )
'  ==============================================================

OR

'  ==============================================================
'  This task will load the same two chart images defined above
'  simulation report, but it will place the first image above

'  the second image:
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
'  This statement creates a task to display two charts

'  one above the other.
test.SetChartSimulationtHtml( chartHtml1 + "<br>" + chartHtml2 )
'  ==============================================================

 

Links:

currentParameterTest, resultsReportPath

See Also:

 

 


 

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


Topic ID#: 535

 

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