Blox Basic Editor

This section of the manual about the primary editor for creating blox modules describes how the features in the editor can be used to create a new blox, change the scripting in a blox.  It will also allow you to rename, copy the blox and modify the name,  or remove the blox from the installation.  

 

Before you try to modify any included system or any of its blox modules installed with Trading Blox, or obtained from another source, it is to your advantage to be familiar with this section before making and changes.  

 

When you only want to change the blox modules included in a system, the System Editor section is where those changes must be made.

 

What is in a Trading Blox system?

Systems can be one Blox, or a collection of Blox modules. There are five Block types available for creating the logic that a system idea might need.  Each type of blox module can be for a particular purpose in a trading idea.   One blox module, Auxiliary, is a flexible use blox.  This means it can perform the functions of another module like the Portfolio Manager's ranking and sorting operations.  It can also be where custom functions that are needed to support a trading idea like trade on certain days, or when other ideas need to influence a system.  Auxiliary blox are good module for creating custom reporting and file function ideas.

 

Supported trading system Blox types:

 

System Component:

Corresponding Block Type:

What to Trade

Portfolio Manager

When to Trade

Entry Blox

Whether to Trade

Risk Manager

How Much to Trade

Money Manager

When to get out

Exit Blox

Any New Idea Not Related to Above

Auxiliary

 


Edit Time: 9/20/2017 07:56:26 AM


Topic ID#: 111

 

 

Blox Basic Language System Editor:

Blox Basic Editor is available with the Builder versions of  Trading Blox.   Only the Trading Blox Builder II Editor version will have access to all the possible blox creation capabilities made possible with the Blox Basic Editor environment.

 

System Editor allows you use the systems that come with Trading Blox as they are originally configured, or you can change them to test them with additional or changed logic.  New systems can be created with any of the Blox listed in the Blox Catalog, or you can add them from a download or when you create a new Blox idea in the Blox Basic Editor.

Click on any of the items that change color for more information about that item.

Trading Blox Basic Editor

Close Editor Buttons:

Description:

OK: ^Back

Clicking the "OK" button to exit the editor will automatically save any changes made while the editor was opened.

CANCEL: ^Back

Clicking the "Cancel" button without using the "File - Save" menu option or "Ctrl+S" keyboard save command will generate this warning message:

Click to Enlarge; Click to Reduce.

Editor Changes Not Saved Warning Message

Selecting the "Yes" button will save all changes and close the editor.

Selecting the "No" button will close the Editor without saving any changes made since the last "File - Save" menu option or "Ctrl+S" keyboard save command.  

Selecting "Cancel" button will leave the editor open without saving any changes.

 

Menu Name:

Description:

Blox Basic Editor - File Menu

Blox Basic Editor - File Menu

^Back

File Options:

Description:

Save - Ctrl+S

Clicking the Save menu option or using the Ctrl+S hotkeys save all changes.

Cancel

Using this menu option is the same as using the CANCEL Button.

Close

This menu option is the same as using the OK Button.

Refresh

Use this button when a blox module has been added to the blox folder and it doesn't appear in the list of available blox modules.

Preview

Click on this menu item to capture all the script information into a text document that is displayed on the screen.  Capture module script is saved in a file that is located here:

Click to Enlarge; Click to Reduce.

Editor File-Preview Menu File Saved Location

Print - Ctrl+P

Use this option to quickly send a printout of the selected blox module to your printer.

Blox Basic Editor - Edit Menu

Blox Basic Editor - Edit Menu

^Back

Edit Options:

Description:

Undo - Ctrl+Z

Use this to undo a recent edit.

Redo - Ctrl+Y

Use this to repeat a recent change.

Select All - Ctrl+A

Use this to select all the scripted text in the editing window area.

Cut - Ctrl+X

Use this to cut the selected text from the editing window area.

Copy - Ctrl+C

Use this to copy the selected text from the editing window area.

Paste - Ctrl+V

Use this to paste previously copied text into the editing window area.

Find Previous - Ctrl+Shft+G

Use this to find a previous term found in by the Find search option.

Find - Ctrl+F

Find is a search function that looks for the text pasted into its search field.

Find Next - Ctrl+G

Use this to find the next item that matches the Find's search term.

Replace - Ctrl+H

Use this to replace a specific text with a replacement text.

Blox Basic Editor - Blox Menu

Blox Basic Editor - Blox Menu

^Back

Blox Options:

Description:

New

Selecting this option will display this dialog:

Click to Enlarge; Click to Reduce.

BloxMenu-New Blox Dialog

Delete

Selecting the Delete option will remove the blox from the disk even if the Blox Basic Editor is closed using the CANCEL Button.

Click to Enlarge; Click to Reduce.

Blox Menu-Delete Blox Warning

Deleted can be recovered when they are deleted unless the deleted blox module is recovered from the "Backups" that are automatically created each day that Trading Blox is run.

Copy - Ctrl+C

Using this Blox menu option will create a copy of a selected blox that will first appear in this dialog where its blox name and display name can be changed:

Click to Enlarge; Click to Reduce.

Blox Menu-Copy Selected Blox Dialog

Once a blox is copied and it appears in the list of available blox, it is not saved by the dialog until the Editor is closed with OK Button or Save - Ctrl+S function.

Rename

Select a blox module and click rename for this dialog to appear:

Click to Enlarge; Click to Reduce.

Blox Menu-Rename Selected Blox Dialog

If the selected blox is not saved, this warning message will appear:

Click to Enlarge; Click to Reduce.

Blox Menu-Save Blox Changes Warning

Systems

Systems is a search tool that reports which systems have the selected blox assigned their systems:

Click to Enlarge; Click to Reduce.

BloxMenu-Systems Where Used Search Results List

This tool should be used prior to making any changes to a blox unless the changes planned are to be used by all the systems where this blox is assigned.

Reload

If you add a block to the Blox folder while the block editor is open, this menu option will reload all the Blox in the Blox folder so they will all appear in the editor.

Sort Alphabetical

 

Sort Modified Date

 

Sort Type

 

Script Menu Options

Script Menu Options

^Back

Click to Enlarge; Click to Reduce.

Script Menu - Select Script Section Name - Right-Click Menu

Script Options:

Description:

Add

When a blox module doesn't have the script section needed, the missing script section can be added as long as it is allowed in the selected blox type where the script section is needed.  When the Add menu option is selected this dialog will appear:

Click to Enlarge; Click to Reduce.

Script Menu - Add Script Section Option List

When the above drop-down option list is displayed, select the script section needed and it will appear in the editor display of available script sections for the selected blox.

 

When the script section that is needed doesn't appear, consider adding a new blox type where that script section is available.

New Custom

Custom scripts create script names that can be called like a funtion using the Script Object functions and properties to call the custom script.  A custom script section is created by selecting, or creating a new blox name, and then adding the a custom script section name:

Click to Enlarge; Click to Reduce.

Script Menu - New Custom Script Section Creation Dialog

When the script section is created, it will appear in the selected blox where it was added and the new custom script section will appear in the list of available script sections:

Click to Enlarge; Click to Reduce.

Script Menu - Added Custom Script Section

Copy        - Ctrl+C

Script menu's Copy options will copy the name of a selected script and all of the scripted statement line contents of that script so that it can be pasted in another blox.

Paste         - Ctrl+V

Script menu's Paste will add a script section and it scripted contents to a blox where that script name does not exists.

Delete

When a script section is selected and the Delete option is selected, the selected script section and its contents will be deleted.

Move Up - Alt+Up

This script option will change the displayed row where a selected script is located when the "Move Up" option, or the Alt+Up-Arrow button is pressed.

Move Down        Alt+Down

This script option will change the displayed row where a selected script is located when the "Move Down" option, or the Alt+Down-Arrow button is pressed.

Items Menu Options

Items Menu Options

^Back

This menu's options is for working with any of the for following  blox data element types:

oBlock Permanent Variables (BPV)

oInstrument Permanent Variables (IPV)

oParameters

oBuilt-in Indicators

 

Editing Options:

Description:

New

When a data element is selected, click on this option will open a dialog where a new data element of the same type will be added to the group of that data type.

Edit

Clicking on this option when a data element is selected will open the selected data element's settings dialog.

Copy - Ctrl+C

Selecting a data element and then selecting this option will make a copy of the selected data element so that it can be pasted into another blox module.

Paste - Ctrl+V

Use this to paste a selected data element into blox where it doesn't already exists.

Delete

Use this option to delete a selected data element.

Move Up - Alt+Up

This Blox option moves a selected data element up a row in the list of data elements.  The keyboard's arrow keys is a quick way to move data elements up with this hot-key combination:

"Move Up = Alt+Up-Arrow keys.

Move Down - Alt+Down

This Blox option moves a selected data element down a row in the list of data elements.  The keyboard's arrow keys is a quick way to move data elements down with this hot-key combination:

"Move Down = Alt+Down-Arrow keys.

Blox Basic Editor - Breakpoints Menu

Blox Basic Editor - Breakpoints Menu

^Back

Breakpoints are temporary stops that are used to examine data values in the debugging environment.  One a script execution is stopped, it can be stepped one line of script at a time, or allowed to jump to the next breakpoint.  Script execution can also be allowed to resume automatic execution.

 

Addition breakpoints can be added and removed during a debugging option by pressing F9, but those added or removed breakpoints are not permanent because debugging operation doesn't not save the changes.  To add or remove a breakpoint location permanently, make edit in the editor when the script is not executing.

Breakpoints:

Description:

Toggle Breakpoint - F9

Breakpoints are added most often when the script section is not executing.  They are added at line area just ahead of where a suspected problem might exists.  They can be added during a debugging sessions when the script execution has stopped executing.  Pressing F9 in the Blox Editor will add a red line overlay at the location where the mouse cursor is blinking.  Pressing F9 on a breakpoint line will remove the breakpoint.

Clear all Breakpoints - Shift-F9

This option will remove all the breakpoint locations in the current script section when it is selected in the editor when the a test is not executing.  It will remove all the breakpoints during a debugging operation, but the removal will not be permanent until it is performed in the editor when the execution has stopped.

Edit Breakpoint

 

Click to Enlarge; Click to Reduce.

Blox Editor Edit Breakpoint Settings

 

Blox Basic Editor - Help Menu

Blox Basic Editor - Help Menu

^Back

 

Help Options:

Description:

User Guide

This option will open the installed Trading Blox User's Guide Help file.  It is located in the Trading Blox installation folder as: TradingBloxHelp.chm

PDF User Guide

This is the PDF version of the User Guide Help information.  When this option is clicked it will download the PDF version of the User Guide from the  Trading Blox web site link:

http://www.tradingblox.com/Manuals/TradingBlox%20User%27s%20Guide.pdf

Blox Basic Guide

This option will open the installed Trading Blox Builder Guide Help file.  It is located in the Trading Blox installation folder as: BloxBuilderHelp.chm

PDF Blox Basic Guide

This is the PDF version of the Trading Blox Builder Guide Help information.  When this option is clicked it will download the PDF version from the  Trading Blox web site link:

http://www.tradingblox.com/Manuals/Blox%20Builder%27s%20Guide.pdf

Context Help

This option displays Trading Blox Builder Guide Help.  Context specific topic display is not yet enabled.

Support Forum

This menu item opens the Trader's Roundtable forum to the Trading Blox Support section located here: http://www.tradingblox.com/forum/viewforum.php?f=58

About Trading Blox

Click to Enlarge; Click to Reduce.

About Trading Blox

 

Editor Area:

Description:

Grouped Blox Modules: ^Back

 

Click to Enlarge; Click to Reduce.

Grouped List of Available Blox Modules

 

Script Sections: ^Back

Click to Enlarge; Click to Reduce.

Blox Script Sections & Data Types

All blox modules get their ability from the scripted statement written into the various script sections.  There are many script sections available and some script sections determine the blox module type.  

 

To get a solid understanding of how many script sections there are, and how they used and executed, read through the Trading Blox Builder Guide Help file topic: Blox Module Reference.

Parameters & Variables: ^Back

Trading Blox Builder Guide Help file topic: Data Variables explains the different types of variables and how they are used.

 

The list above shows there are two types of variables:

Block Permanent Variables

Instrument Permanent Variables.

Script sections can use Local Variables are constrained the script section in which they are declared and assigned values (no shown).

Parameters are user accessible values that contain the settings and are available when a system tab that contains a blox with variables displays its parameters on the main screen.

Indicators: ^Back

Trading Blox Builder Guide Help file topic: Indicators provides a lot of information about this type of display and the calculations used in it sections:

Basic Indicators

Calculated Indicators

Creating Indicators

Custom Indicators

Indicator Access

Indicator Bar to Week Time Frame

 

The details listed above focused on how to create and use indicators, but they will also provide some insight into the capabilities of how they can influence a system's operation.

Script Editing Area: ^Back

When a script section is selected, the script's section editing area will appear and the contents of that script section.  when the script section is empty, the editing screen will be blank until something is added.

Click to Enlarge; Click to Reduce.

Script Section Script Statement Editing Area

 

F5 from Blox Editor saves changes and runs test.F5 from Blox Editor saves changes and runs test.

Parser Validation Area: ^Back

When the parser checks of a script section doesn't find any errors, it will report:

Parser Reports No Script Errors Found

Parser Reports No Script Errors Found

When a problem is found, a message in red text indicating there is a problem will be found:

Click to Enlarge; Click to Reduce.

Script Parser Error Detected Message Example

 

 

Build or Editing a Systems: ^Top

Description:

Changing or Creating a New System

Systems can be built by selecting a system name on the side of the System Editor, or by creating a new system file name.  When the system name is highlighted Blox can be added from the list of blox on the left.  Blox already in a system can be removed from the items listed in the Static section in the center of the System Editor.

Adding and Removing Blox

There can only be one Blox of the following Type:

oPortfolio Manager

oEntry, Exit, Money Manager

oMoney Manager

oRisk Manager

 

There can be many Blox of the following Type:

oEntry

o Entry, Exit

oExit

oAuxiliary

 

To add a Blox to a system from the Blox listing and that Blox is not already in the system list, or more than Blox of the Blox being selected can be in the system, locate the Blox name and Right-Click with the mouse.  Selected the Blox to add and then clicking the ADD button below the Static section will add the Blox to the system

 

To remove a Blox from the Static section list of Blox, click on the Blox to remove and Right-Click the mouse.  Clicking the Remove button when the Blox in the Static section is highlighted will remove it from the system.

 

Note:

System must have a way to provide size to an order.  Money Managers perform that task.  There are different Money Manager ideas available in the supplied list of Blox giving you some opportunity to see what works best.

 

If you find your system executing and then reporting there are not any trades, that issue can be caused by various settings or when some parameter values are not compatible with how the system is configured.

 

Before doing anything check the Filtered Log report that is available under the program's File -> Results -> Filtered Log menu path.  If the system is a new system, be sure the system shows a name in the Money Manager section.  If the system has items listed in the Filtered Log, check the settings that affect the reasons for those order rejections.

Global Suite Systems

When a system name is the same as the name of a suite it will be be colored differently and be considered a Global Suite System (GSS). GSS designation allows Blox to be attached directly to the Suite structure.  GSS Blox scripts are executed with different rules than the Blox scripts with the same name.  Some GSS Blox scripts will execute ahead of system Blox scripts of the same name, and after the system Blox scripts with these other script names.

 

GSS script are mostly used to access information in the suite's list of systems.

 

GSS timing details are explained in the Blox Builder's Guide topic: Global Script Timing

 


Edit Time: 9/20/2017 07:56:26 AM


Topic ID#: 111

 

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