Trading Blox Builder has added a new dock-able Auxiliary Window that can be displayed or hidden.  This new independent text display window can be fixed to the main screen, or it can float over Trading Blox Builder or outside of the Trading Blox Builder display area.

 

The Trading Blox Builder Log Window has the same features that allow it to float above or outside of Trading Blox Builder and both windows can be displayed vertically along the right side, or one over the other at the bottom of the main screen area.  

 

Information sent to the Auxiliary Window can be sent to a "Cloud" destination for display.  For now, when you use the Auxiliary Window Window URL option, only send information to same IP for your personal security reasons.

 


To Open the Auxiliary Window area, click image:

Main Menu's Tools Group => Click the Auxiliary Window Group => Click the Open Window menu item needed:

Click to Enlarge; Click to Reduce.

Tools Open Auxiliary Window Menu

When the Open Window button is used, the information sent to the Auxiliary Window can also be sent to a "Cloud" location when the "Window URL" button is selected.

 

A dockable or floating information display can provide flexibility because it can easily be moved around, change shape, and be used in tandem other information displays.

 

This optional Auxiliary Window text display can appear above or below the Log Window.

The contents of this window can also be simulcast to the cloud using the:

Tools => Auxiliary Window => URL Window selection.

 

An Auxiliary Window can be displayed on the screen by clicking on the Open Window option shown above, or it can be opened and closed by using either one of these two function within a script section: OpenAuxiliaryWindow, CloseAuxiliaryWindow.  

 

When an Auxiliary Window is open, it can also be moved away from the main Trading Blox Builder screen area by grabbing its title bar area with a right-side mouse click and then dragging it to where you want it displayed:

Click to Enlarge; Click to Reduce.

Open Auxiliary Window Move and Close Options.

 

A video in the Trading Blox Builder Forum: Blox MarketPlace, shows how these options work :

Docked-Undocked-Floating Windows


 

Syntax:

SetAuxiliaryWindowText( "windowText" )

 

Parameter:

Description:

"windowText"

"windowText" is a Non_Auto indexed BPV String array.

The contents of this Auxiliary Window are sent using the SetAuxiliaryWindowText( windowText ) function, where "windowText" is a non-auto-indexed BPV String array.

 


How to Use:

There are many ways to use the display window.  .  This example send a new text information at the end of each year.  In that test statement the process is kept simple so the process can be the focus.  As each year of the test ends, the test will enter the After Test script section where the entire text series is sent to the Auxiliary Window text area.

 

Create the BPV:

This dialog creates the series "windowTextString" that will get a new text statement as each year of testing ends.

Click to Enlarge; Click to Reduce.

BPV Dialog String-Series Settings

Once you've named your string series, the example script used the Block scope range.  When everyting is contain within the same blox, there is no need for a broader scope range.   because the scripts captures sends text to the text string is contained within the same blox.  

output information about the test, or for other uses.

 

Execute this function: SetAuxiliaryWindowText statement in the After Test script to emulate the example's process.

 

Example - Notes:

The example script section is created as an Auxiliary Blox.  The output from that block is created when this Auxiliary blox is included in a system.  In this example's output, the Dual Moving Average system installed when Trading Blox Builder is installed is used to generate trades on a random selection of EFT symbols that you should edit to limit the "Not Found" reminder for being different.

Script Use Details:

There are many ways to use the Auxiliary and Log window displays.  This section provides a code example that sends new text information at the end of each year to a text-series element row that increments each time text is created.  In this test script the process is kept simple so the process capabilities can be the focus.

 


Create a BPV test-series:

This dialog creates the text-series "windowTextString."  As each ends, the text message sent to the "windowTextString" reports the year that ended and the current change in available equity.  

Click to Enlarge; Click to Reduce.

BPV Dialog String-Series Settings

Once you've named your string series, the example script used the Block's scope range.  When everything is contain within the same blox, there is no need for a broader scope range.   In this script example the process captures information and that is transformed to a text statement so it can be sent to a row in the newly created text series created earlier.

 

 

 

Example - Script:

 

Execute this function: SetAuxiliaryWindowText statement in the After Test script to emulate the example's process.

 

This Example Script is contained in the Suite Link Below:

SetAuxiliaryWindowText Suite with Blox

 

'  =================================================================
blockname: SetAuxiliaryWindowText - blox
'  =================================================================
'  -----------------------------------------------------------------
' block Permanent VARIABLES

' These variables are displayed so you'll understand more.
'  -----------------------------------------------------------------
windowTextStringSeries [ Sample String Series ]; Series String; 0.000000; block
iYearNdx [ Cerate a Msg For each test date Year change ]; Integer; 0; block
iAuxWindowInit [ ]; Integer; 0; block
iThisYear [ Year being tested. ]; Integer; 0; block
sMsg [ ]; String; ; block
iTestEndDate [ Last test Date YYYYMMDD ]; Integer; 0; block
iTestStartDate [ Human readable name goes here... ]; Integer; 0; block
iPreviousYear [ ]; Integer; 0; block
iAnswer [ ]; Integer; 0; block
iTestYearsCount [ Human readable name goes here... ]; Integer; 0; block
lastYearEqty [ ]; Floating; 0.000000; block
ThisYearEqty [ ]; Floating; 0.000000; block
'  -----------------------------------------------------------------
===================   SCRIPT_CHANGE:
'  =================================================================
'  SetAuxiliaryWindowText
' BEFORE TEST SCRIPT - START
'  =================================================================
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  '  Initialize Auxiliary Window Init Status
  iAuxWindowInit = FALSE
  '  Initialize Year Value
  iThisYear = Year(test.currentDate)
  '  Start Test Date
  iTestStartDate = test.testStart
  '  Last Test Date
  iTestEndDate = test.testEnd
  '  Get the Number of years in the Test.
  iTestYearsCount = Year(iTestEndDate) - Year(iTestStartDate) + 1
  '  Get Starting Equity
  lastYearEqty = test.totalEquity
  ThisYearEqty = test.totalEquity
  '  --------------------------------------------------------------
  '  Display the Setup Details
  PRINT
  PRINT "Test Date Start        ", test.currentDate
  PRINT "Script Section         ", block.scriptName
  PRINT "iAuxWindowInit       = ", iAuxWindowInit
  PRINT "iThisYear            = ", iThisYear
  PRINT "iTestStartDate       = ", iTestStartDate
  PRINT "iTestEndDate         = ", iTestEndDate
  PRINT
  PRINT "Year(iTestStartDate) = ", Year(iTestStartDate)
  PRINT "Year(iTestEndDate)   = ", Year(iTestEndDate)
  PRINT "iTestYearsCount      = ", iTestYearsCount
  PRINT "ThisYearEqty         = ", AsString(ThisYearEqty, 2)
  PRINT "lastYearEqty         = ", AsString(lastYearEqty , 2)
  PRINT "Trading Equity       = ", AsString(test.totalEquity, 2)
  PRINT
  PRINT "ThisYearEqty         = ", ThisYearEqty
  PRINT "lastYearEqty         = ", AsString(lastYearEqty , 2)
  PRINT
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  =================================================================
' BEFORE TEST SCRIPT - END
'  SetAuxiliaryWindowText
'  =================================================================
===================   SCRIPT_CHANGE:
'  =================================================================
'  SetAuxiliaryWindowText
' BEFORE TRADING DAY SCRIPT - START
'  =================================================================
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  '  Initialize Year Value
  iThisYear = Year(test.currentDate)
    '  Calculate This Year equity change
    ThisYearEqty = test.totalEquity - lastYearEqty
    '  -----------------------------------------------------------
  '  When the Year Changes, display change
  If iThisYear > iPreviousYear THEN
    '  Show Year Change
    PRINT
    PRINT "This Test Date      ", test.currentDate
    PRINT "Script Section      ", block.scriptName
    PRINT "iAuxWindowInit    = ", iAuxWindowInit
    PRINT "iThisYear         = ", iThisYear
    PRINT
    PRINT "ThisYearEqty      = ", AsString(ThisYearEqty, 2)
    PRINT "lastYearEqty      = ", AsString(lastYearEqty , 2)
    PRINT "Available Equity  = ", AsString(test.totalEquity, 2)
    PRINT
  ENDIF '  iThisYear > iPreviousYear
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  =================================================================
' BEFORE TRADING DAY SCRIPT - END
'  SetAuxiliaryWindowText
'  =================================================================
===================   SCRIPT_CHANGE:
'  =================================================================
'  SetAuxiliaryWindowText
' AFTER TRADING DAY SCRIPT - START
'  =================================================================
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  '  Compare Current Year to Previous Year
  If iThisYear > iPreviousYear THEN
    '  Calculate This Year equity change
    ThisYearEqty = test.totalEquity - lastYearEqty
 
    '  If this is the first time, initialize
    '  iYearIndex & Update the Init-Flag
    If iAuxWindowInit = FALSE THEN
        '  Update Annual Auxiliary Message
        iYearNdx = 1
        '  Show Init is complete
        iAuxWindowInit = TRUE
    ELSE
        '  Increment Year Index
        iYearNdx = iYearNdx + 1
    ENDIF
    '  -----------------------------------------------------------
    PRINT
    PRINT "This test Date      ", test.currentDate
    PRINT "Script Section      ", block.scriptName
    PRINT "iAuxWindowInit    = ", iAuxWindowInit
    PRINT "iPreviousYear     = ", iPreviousYear
    PRINT "iThisYear         = ", iThisYear
    PRINT "iYearNdx          = ", iYearNdx
    PRINT
    PRINT "ThisYearEqty      = ", AsString(ThisYearEqty, 2)
    PRINT "lastYearEqty      = ", AsString(lastYearEqty , 2)
    PRINT "Available Equity  = ", AsString(test.totalEquity, 2)
    PRINT
    PRINT "sMsg               = ", "Year Changed"
    '  -----------------------------------------------------------
    '  Update Previous Year
    iPreviousYear = iThisYear
    '  Update This Year's Equity
    lastYearEqty = ThisYearEqty
    '  -----------------------------------------------------------
    '  This is anything goes text
    sMsg = "For Year-End " + AsString(iThisYear, 0)_
            + ", Total Equity = " + AsString(ThisYearEqty, 2)
    '  Update StringSeries Next Element
    windowTextStringSeries[iYearNdx] = sMsg
  ENDIF
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  =================================================================
' AFTER TRADING DAY SCRIPT - END
'  SetAuxiliaryWindowText
'  =================================================================
===================   SCRIPT_CHANGE:
'  =================================================================
'  SetAuxiliaryWindowText
' AFTER TEST SCRIPT - START
'  =================================================================
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  PRINT "Open Auxiliary Window"
  '  Open the Auxiliary Window
  OpenAuxiliaryWindow
  '  --------------------------------------------------------------
  PRINT
  PRINT "Test Date Start     ", test.currentDate
  PRINT "Script Section      ", block.scriptName
  PRINT "iAuxWindowInit    = ", iAuxWindowInit
  PRINT "iThisYear         = ", iThisYear
  PRINT "iTestStartDate    = ", iTestStartDate
  PRINT "iTestEndDate      = ", iTestEndDate
  PRINT
  PRINT "ThisYearEqty      = ", AsString(ThisYearEqty, 2)
  PRINT "lastYearEqty      = ", AsString(lastYearEqty , 2)
  PRINT "Test End Equity   = ", AsString(test.totalEquity, 2)
  PRINT
  PRINT "SetAuxiliaryWindowText( windowTextStringSeries )"
  PRINT
  '  --------------------------------------------------------------
  '  Send the windowTextStringSeries Records to
  '  the Auxiliary Window display
  SetAuxiliaryWindowText( windowTextStringSeries )
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  =================================================================
' AFTER TEST SCRIPT - END
'  SetAuxiliaryWindowText
'  =================================================================
===================   SCRIPT_CHANGE:
'  =================================================================
'  SetAuxiliaryWindowText
' AFTER SIMULATION SCRIPT - END
'  =================================================================
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  PRINT
  PRINT "Test Date Start     ", test.currentDate
  PRINT "Script Section      ", block.scriptName
  PRINT "Send Aux. Window Open Close Msg."
  PRINT
  ' ---------------------------------------------------------------
  '  Message Box Display Test
  sMsg = "OK to Leave Auxiliary Window Open -- Cancel to Close"
  '  Generate the Message Display
'   iAnswer = MessageBox( sMsg , 1, 32 )
  '  If Cancel is used, Close the Auxiliary Window
  If iAnswer = 2 THEN
    '  Close the Auxiliary Window
    CloseAuxiliaryWindow
  ENDIF
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  =================================================================
' AFTER TEST SCRIPT - END
'  SetAuxiliaryWindowText
'  =================================================================
===================   SCRIPT_CHANGE:

 

Returns:

Click to Enlarge; Click to Reduce.

Log & Auxiliary Undocked Window Output Examples

 

Links:

OpenAuxiliaryWindow, CloseAuxiliaryWindow,

See Also:

Auxiliary Window, Log Window

 


Edit Time: 10/21/2020 11:21:07 AM


Topic ID#: 424

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