What is FXTraBox?

1. Summary

FXTraBox is a powerful modular FX algorithm and strategy builder for MT4 EA (Expert Advisor) and Custom Indicators. There is no need to code MQL4 (a proprietary coding language for MetaTrader4, one of the most widely used FX trading platform in the world), but simply defining each Conditions's parameters and its relationships (also known as "Logic").

In the near future, FXTraBox will add options, equities, futures and fixed income trading, along with live trading connections to all mainstream retail and institutional platforms and brokers.

Please note that the term 'Algorithm" will be used interchangeably with 'Strategy' throughout this manual.

2. Features

  • 1) EA (Algorithm) can be built directly from your browser, simply by signing up with FXTraBox.
  • 2) Algorithm is created by defining the opening, reopening, closing or other Actions and Signals.
  • 3) Each Signal can be set by combining multiple Conditions.
  • 4) Each Condition can be set using intuitive menus and interface. 
  • 5) The number of degrees of freedom in building an Algorithm can be defined at the highest level.
  • 6) Further breadth of an Algorithm can be added by incorporating Custom Indicators.

3. Degrees of Freedom in building an Algorithm

  • 1) All time frames, available through MT4, can be used.
  • 2) All tradable currency pairs and symbols, available through MT4, can be used.
  • 3) Any open positions can be used as an independant variable.
  • 4) Any auxiliary indicator such as high, low, close price, can be all used as an independent variable.
  • 5) Default indicators and Custom Indicators uploaded via FXTraBox, can be used as an independent variable.
  • 6) Custom Indicators built on FXTraBox, can be used as an independent variable.
  • 7) Existing functions available in MQL4 language can be used as an independent variable.
  • 8) Additional computation can be added to an existing Condition.
  • 9) Both horizontal and vertical Movements can be used as an indepent variable.
  • 10) Number of bars can be used as an independent variable.
  • 11) Time range can be used as an independent variable.
  • 12) Each and every above Conditions can be combined using AND, OR or based on Weight.

Interface & Menu

1. Menus Navigation

The FXTraBox panel screen consists of two main parts: the 'Menu bar' and the "Logic area". The left Menu bar includes a list of all components available for use in order to build an Algorithm.

The components are grouped together into broad categories based on their functionality and use. An extended description of each function, also referred to as a 'Node' is presented in this manual.

The Nodes  include: Algorithms, Signals, Conditions, Coding, Actions and Custom Indicators.

2. Nodes Descriptions

  • 1) ALGORITHMS:
    • - Signals and Actions are combined on this page to build an executable Algorithm.
    • - Once saved, strategy map is automatically created in tree diagram, showing Signals, Actions and Conditions used in the Algorithm.
    • - The Algorithm can be compiled.
    • - If there is no known errors, the compiled algorithm or EA (ex4 file) can be downloaded.
  • 2) SIGNALS: Settings and saved Conditions are combined on this page to be used for building Algorithms or Custom Indicators.
  • 3) CONDITIONS > Binder: Saved Conditions are added or combined together on this page.
  • 4) CONDITIONS > Movement: You can set the range of movement during a period of an object such as position, price or indicator, etc.
  • 5) CONDITIONS > Timeset: You can set the range of time during which a Condition must meet its goal.
  • 6) CONDITIONS > Comparison: You can compare or set a relationship between right and left objects such as position, price or indicator, etc.
  • 7) CONDITIONS > Valueset: You can set Value on this page or Variable depending on Condition.
  • 7) CONDITIONS > Candle Patterns: You can define a specific Candle pattern to be used for a Condition.
  • 8) CODING: Conditions can be created by directly writing codes using MQL4 language.
  • 9) ACTIONS > Open: Logics are set for the opening of a position on this page.
  • 10) ACTIONS > Close: Logics are set  for closing a position on this page.
  • 11) ACTIONS > Other: Logics are set for other means of interactive options.
  • 12) CUSTOM INDICATORS > Indicators: You can compile and download an executable Custom Indicator on this page. Final chart display options are also set on this page.
  • 13) CUSTOM INDICATORS > Conditions: Conditions Logic for the Custom Indicator is configured on this page, such as style, color and positioning of Custom Indicators.
  • 14) CUSTOM INDICATORS > Indicator List: In addtion to own custom-built indicators, and uploaded indicators,  over 1,300 Custom Indicators can be downloaded from this page to use.

3. Hierarchical Structure

It is very important to understand the structure of the Nodes in order to understand the multi-dimensional paradigm of FXTraBox builder. In most cases, most problems in creating a complex strategy can be easily solved if the Nodes structure is fully understood.

The FXTraBox hierarchical structure is shown in the tree diagram below.

In order to generate the upper Nodes, the lower Nodes must be created first. In other words, the lower menus in the hierarchy (diagram) must be configured before moving on to creating the upper Nodes.

Node Page

FXTraBox is built  in a way so that a Logic (also know as a "mechanic") can be configured in each Node page and saved to create a unique Logic, which in turn is combined with other Nodes' Logics (e.g. from Comparison, Timeset, etc) to build an Algorithm or an EA. Each Node page is composed of two sections:

1) Logic Section is where the Logic is created by selecting different parameters.

2) Logic List Section is where the existing Logics are listed with short summary of its main attributes.

Aside from the 2 sections,  each menu page comes with different buttons, text fields and a search bar.

1. Logic Section

The Logic Section includes three parts: Name, Memo and Logic.  The Name and Memo fields are common throughout all the menu pages. The Logic part and its attributes, however, is different for different menu pages.

  • 1) Name
  • Every Logic must have a name. A good practice is to include something that expresses the goal of the Logic so it'll be easier to find later.
  • 2) Memo
  • A memo field is where you can fill in the description to best describe the function of the logic in detail, in addition to the name. It is strongly advised to write memos when writing a Logic.
  • 3) Logic Box
  • Every menu has different input settings and parameters to build a Logic.

2. Logic List

  • - The list shows existing Logics created and saved from the Logic Section on the Node page.
  • - Saved Logics can be reloaded onto the Logic Section by clicking on the View button.
  • - On the 'Algorithm' Node page, a strategy map diagram (see below diagram) is created once a Logic is saved. It can be viewed on a pop-up window, by clicking on the icon, next to name of the Logic.

3. Buttons

  • 1) View Button

    Clicking on the View button on the Logic List section will load the saved parameter values of the Logic onto the Logic Section.

  • 2) Save Button

    Click on the Save button stores newly inputted values for a new Logic from the Logic section, which in turn lists the new Logic in the Logic List section. Note that the Save button only appears when adding a new Logic for the first time.

  • 3) Reset Button

    Clicking on the Reset button clears every inputted values on the Logic section. Any unsaved contents cannot be restored, so caution is advised when clicking on the Reset button.

  • 4) Edit Button

    Clicking on the Edit button saves newly edited values to the current Logic being edited. Note that Edit button only appears when an existing Logic is loaded from the Logic List section after clicking the View button.

  • 5) Add Button

    Clicking on the Add button creates a new Logic by copying the inputted values of the current Logic. Unlike Edit button, which saves newly inputted values to the current Logic, Add button copies the inputted values of the current Logic and then creates a new Logic. Make sure you change the name of the current Logic before clicking the Add button, otherwise it will just create a copy of current Logic.

  • 5) Favorite Button

    Clicking on the Favorite button on the Logic List section will load Favorite list tab, showing the list of favorite Logics. 

  • 5) Recycle Button

    Clicking on the Recycle button on the Logic List section will load Recycle list tab, showing the list of deleted Logics. Logics can only be deleted permanently from this Recycle list.  

4. Select Boxes

EA is written and coded in MQL language and in FXTraBox, frequently used functions and indicators, called Objects, are  preprogrammed in advance for ease of use. You only need to select an Object and assign desired parameters for the Objects to create the desired Logic.

  • 1) Object items
    Following is a table of Object items:
  • 2) Functions
    Selecting a Function item, other than 'None', finds a special value of the Object within a designated range, compared to a selected value of the Object from a single point.
    • - None: The  selected value of the Object is used as is.
    • - Range: Difference between a maximum value and a minimum value of the Object
    • - Highest: The highest value of the Object
    • - Lowest: The lowest value of the Object
    • - Average: The average value of the Object
    • - Change: The difference between a starting point and an end point of the Object
    • - Average of Change: Average of change value of the Object
    • - Average of Change (ABS Value) : Absolute value of average of change (negative value is returned as a positive value.)

  • 3) Symbol
  • You can select the currency pair for the selected Object.
    • - Chart: Automatically uses the currency pair of the Chart, the  EA is mounted on.
    • - Below is list of supported currency pairs.

  • 4) TimeFrame
  • You can select the time frame for the selected Object.
    • - Chart: Automatically designates the currency pair of the Chart, the EA is activated on.
    • - Supports all the time frames provided by MT4.
  • 5) Number of Bars
  • There is 2 ways to assigning a number to this field :
    • - Function = None: the number refers to the disposition of single previous bar. For example, '0' refers to the current bar, '1' to the previous last bar, '2' refers to previous 2nd last bar.
    • - Function None: the range refers to the number of bars (in reverse order)
  • Please note that when '0' is entered, the Object value (e.g. Ask price) will change with time.
  • 6) Get Code
  • Additional computation can be applied to the selected Object by inputting codes. Clicking on the button will populate the codes for current Object with selected parameters in the Get Code text field.
  •  
  • For example, if you want to get a value that is 10 pips higher than a highest value of a previous bar, you can first select Object = [Price>High], then select Bar = [1], and then enter [+10pip]  in the Get Code text field.
  • Another example is when trying to find disparity between MA15 and MA 20 indicator lines. You can first select Object = [Indicator > MA] and enter [Period = 20] in the pop-up window. Clicking on the Get Code button will populate the field with relevant codes.
  • Then, click on the Set button, and change the Period to 5. Since we are looking for disparity, change the + sign on the Get Code field to - sign. The Logic can now be interpreted as disparity between MA 5 and MA 20 of the previous bar.

5. Popup Windows

A popup window appears when one of the Object is selected, in the Logic Section. In the popup window, you can enter different parameters.

  • 1) Indicators
  • A popup window has different attribute fields for different Indicators. A Moving Average (MA) popup window displays following fields:  

    Most attribute fields require integers. Please advise below indicators and corresponding values.

  • [MaMethod(Moving Average Calculation method)]
    Alligator, Envelopes, Force, Gator, MA, StdDev, Stochastic

    [Mode (Select Line)]
    MACD, RVI, Stochastic

    ADX

    Bands, Envelope, Fractal, Gator

    Ichimoku


    [AppliedPrice]


  • 2) Custom Indicators
  • When Custom Indicator is selected for the Object, a popup window with list of Logics from Custom Indicators menu appears. Click Apply button to use the Custom Indicator for the Object. With Professional plan, you can also download the Custom Indicators directly to your computer and mount on MT4, by clicking on the Download button.

    [Basic List]
    You can select from over 1,300 indicators offered by FXTraBox in the Basic tab in the popup window.


    [Custom List]
    You can select from Logics that you created in Custom Indicators menu page.


    [Upload List]
    You can select from a list of indicators that was either uploaded by you to FXTraBox.

  • 3) Direct Input
  • Direct Input is used when you want to directly use a value for the Object, compared to assigning a feature (e.g. Price, Indicator). For example, if you want to assign a specific price (e.g. 1.32550) or specific pip size (e.g. 10 pips).

  • 4) Import Value
  • You can import Logics from Valueset menu page with this option. This is a very easy-to-use tool to import preset values from Valueset menu. However, once the Logic is saved in the current menu page, any changes made to the imported Valueset Logic is not applied to the Logic. Therefore,

Algorithms

1. Function

  • 1) An Algorithm is created by defining the opening, reopening, closing or other Actions and Signals.
  • 2) A strategy map diagram can be created once a Algorithm Logic is saved.
  • 3) EA file (ex4) can be downloaded by compiling the Algorithm Logic.

2. Inputs


  • 1) Actions
    • - Select the Open Action, Close Action and Other Action.
    • - Compiling can be properly realized, with at least one option setting being made, even if Action setting is not required, because the Action setting is essentially used in the compiling process.
  • 2) Conditions
    • - Buy Open: the condition is set that is used for the first order of a market price buy (in case there is no floating    position).
    • - Sell Open: the condition is set that is used for the first order of a market price sell (in case there is no floating    position).
    • - Buy ReOpen: the condition is set that is used for second and thereafter orders at market price buy (in case there    is a floating position).Therefore, operation can be started only if Buy Open is set.
    • - Sell ReOpen: the condition is set that is used for second and thereafter orders that are for market price sell (in    case there is a floating position). Therefore, operations can be started only if Sell Open is set.
    • - Buy Close: A Buy close condition is set up. All buy positions corresponding to Buy Open, Buy ReOpen, Buy Limit    and Buy Stop are closed or cancelled.
    • - Sell Close: It is a Sell close condition. All sell positions corresponding to Sell Open, Sell ReOpen, Sell Limit and Sell Stop are closed or cancelled.
    • - Entry Orders
    • - Buy Limit and Sell Stop are ordered by designating the pips from the current price to a low price point.
    • - Buy Stop and Sell Limit are ordered by designating the pips from the current price to the high price point.
    • - For entry orders, the timeout can be set up in seconds from order point.
    • - Timeout is not used if the timeout is set to "0‟.
    • - When the same forecast orders are generated while forecast orders have already been placed, the existing orders are automatically cancelled.

3. Compiling

All the preparation for EA is done once the conditions of setting the EA Action have been made and the corresponding opening methods have been set and stored.

Compiling can be performed by clicking on the Compile button from the Algorithm Map popup window. Compiling takes place on the server, and if there is no error in compiling and it takes place normally, a check window appears that can be downloaded. Then, the Download button is generated from list.

4. Downloading

Compiling must be ready for downloading, and if Compiling completes normally, the Down button appears.

Downloading can be done by clicking on the Download button and selecting “Experts folder”of MetaTrader. The file name that is generated is basically a designated Title, and may be changed to the EA title.

Signals

1. Function

  • 1) Make a Signal using the Conditions Nodes: Binder, Time Set, Movement, Condition, Candel Charts and Coding.
  • 2) Configurations are made by combining AND, OR and Binary Weight boxes.
  • 3) This is a prerequisite to making open and close actions for Algorithms.

2. Inputs

  • 1) Configuration is made of the three types of groups of the AND group, the OR group and the BW (Binary Weight) group.
  • 2) Conditions within an AND group is so set up as to have a mutually logic relationship of AND.
  • 3) Conditions within an OR group is so set up as to have a mutually logic relationship of OR.
  • 4) Conditions within a Bw group assign a point corresponding to the condition, and settings are made to have a    true logic value, if the sum of conditions of the Bw group is greater than the Total Score.
  • 5) Set up a logic relationship between the AND group and OR group when selecting AND/OR above AND group.
  • 6) Set up a logic relationship between Bw group and OR group when selecting AND/OR above OR group.
  • 7) Upto ten conditions may be set for each group.
  • 8) Selecting an item of each condition may opt one of lower Nodes (Binder, TimeSet, Movement, Condition, Candle Chart, Coding) of a hierarchical relationship, and if such an option is exercised, a list corresponding to select items    hierarchical to the selected menu item can be selected.

3. Hierarchy


Binder

1. Function

  • 1) A signal is made based on the conditions of Time Set, Movement, Condition and Coding.
  • 2) Configuration is made by combining AND, OR and Binary Wave groups.
  • 3) Conditions for opening/closing are completed according to the Signal, where each of the AND, OR and Bw groups can be set and combined with up to ten conditions. If these conditions are insufficient due to a   complicated strategy, and if several conditions are bound using a binder and stored, the number of conditions input to a Signal can be greatly reduced, whereby the effect of using more conditions can be obtained.
  • 4) If a combination of several conditions creates a meaningful condition that is able to be used repetitively, the conditions of storing a combination using the binder can enhance re-usage and realize a convenient strategy.
  • 5) The function of the Binder is similar to that of Signal, but there is one difference. An independent condition used to open and close cannot be realized. That is, a Binder cannot be used in the Algorithmss. Thus, if conditions made by Binder are to be used as open or close conditions, settings must be made using a relevant Binder on the Signal page.

2. Inputs

  • 1) Configuration is made of three types of groups, that is, AND group, OR group and a Bw (Binary Wave) group.
  • 2) Condition within AND group is so set up as to have a mutually logic relationship of AND.
  • 3) Condition within OR group is so set up as to have a mutually logic relationship of OR.
  • 4) Condition within Bw group is to assign a point corresponding to the condition, and settings are made to have a true logic value, if a sum of conditions of the Bw group is greater than the Total Score.
  • 5) Set up a logic relationship between AND group and OR group when selecting AND/OR above an AND group.
  • 6) Set up a logic relationship between Bw group and OR group when selecting AND/OR above an OR group.
  • 7) Up to ten conditions may be set for each group.
  • 8) Select items of each condition may opt to select a menu item from lower Nodes (TimeSet, Movement, Condition, Coding) of a hierarchical relationship, and if so, a list corresponding to select items subordinate to the selected menu item can be selected.

3. Hierarchy

TimeSet

1. Function

  • 1) A time-wise effective range can be set and combined for each of Movement, Condition and Coding.
  • 2) The satisfying effective range relative to same condition can be set.
  • 3) A time range can be set up for orders realizing the three conditions of Movement, Condition and Coding, whether it is within the category or with one another.

2. Inputs

  • 1) Condition set, mode, period and effective range can be set for Movement, Condition and Coding.
  • 2) Two modes of Bar and Time are provided.
    • - Bar: As time passes to generate a bar chart, a relative period is set that shows the sequence of previous bars based on the current bar. A bar shows the 11th previous bars to the current bar if 0~11 is set.
    • - Time: It is used for setting an absolute period, even if the bar is changed to a particular time during the day.
  • If the Time of mode is selected, a Time input box appears on a Period input box, where the input format is inputted with a time in the format of [time: minute: second]. At this time, the time is inputted based on 24 hours, and the server time of the server at the future‟s company is the reference time.
  • In case of performing a setting such as 15:00:00~20:00:00, this means the time from 3pm to 8pm.„Time‟ is used to check if a condition has been met during this time period. After adding the condition, then this is valid for next 24 hours.
  • 3) Effective Range
  • It is used to set an effective range subsequent to a time where conditions are satisfied.
    If a particular condition is satisfied at a time and simultaneously satisfies other conditions, a time, where conditions are simultaneously satisfied, is quite narrow. At this time, if an effective range is set to designate a range after an adequate time, locating a time where conditions are simultaneously met can be easy.
    The base of effective range can be set only using the number of bars.

3. Hierarchy

Movement

1. Function

  • 1) Check the selected value„s movement range within the certain range of bars.
  • 2) The range of movement can be checked by a combination of the maximum range, minimum range, a variable range and an average variable range.

2. Inputs

  • 1) Horizontal Range: Checkable time range is set up using bars.
  • 2) Vertical Range: It can be checked using the difference between maximum value and a minimum value within a    designated Horizontal Range.
  • 3) Change Range: It can be checked using the difference between start time and a current time within a    designated Horizontal Range.
  • 4) Average Range: It can be checked using an average variable value within a designated Horizontal Range. (i.e. an    average of heights of each bars)

    There are a total number of 31 bars shown in the above chart. At this time, the Horizontal Range is set at 30. The last bar is a current progress bar, which is expressed as "0‟, such that a number smaller than the actual number of bars by 1 must be input.

3. Hierarchy


Comparison

1. Function

  • 1) Comparisons are used to express general conditions.
  • 2) A left condition and a right condition are respectively set, and the logical relationship between these two conditions is set.

2. Inputs

  • 1) A selected value is set by inputting the left value.
  • 2) The settings for the logical relationship are as follows:

Hierarchy


Candle Patterns

1. Function

  • 1) Different candle patterns can be used as Condition using this Node.
  • 2) A reference showing different candle patterns is shown on the right box.

2. Inputs

  • 1) An Object is set by selecting a candle pattern.
  • 2) Fuctions, Symbols, Timeframe and Number of Bars can be additionally set.

Hierarchy


Coding

1. Function

  • 1) In this page, you can add your own codes, such as mathematical functions.
  • 2) Inputted variables, variables and functions may be added, and addable conditions may be inserted.
  • 3) The mql4 language may be used by the user to register own functions.

2. Inputs

  • 1) Extern Var: Input variables are inputted for coding.
  • 2) Global Var: Global variables are inputted for coding.
    The names of input variables and global variables are arbitrarily changed in order to prevent the occurrence of errors caused by overlapping with those set by other pages, such that a unique name is preferably used.
  • 3) Select Value
    An item for coding for his or her own function parameter or computation with a function A mixed use is possible with a Select value provided by FXTraBox and mq4 coding.
  • 4) Function
    An item for registering his or her own function.
    The name of a function is also arbitrarily changed to prevent the overlapping of functions.
    A Coding page is used by registering functions, so that caution must be exercised that EA settings are not applied with repeated use of same template items in Binder or Signal.

Valueset

1. Function

  • 1) Values are used to pre-designate a selected value that is frequently used.
  • 2) Saved values,can be directly loaded and used, using an Import Value from the Select section of other menus.
  • 3) Furthermore, a value satisfying a particular signal condition and a value not satisfying a particular signal condition are respectively designated, and a value that changes according to the case can be set up.

2. Input items

  • Type: It determines how to handle the format of a selected value.
    • - Value: This is the setting for a particular value.
    • - Signal: Set other variables when a saved condition is true or applicable or when a saved condition is false or not applicable from the Signal menu.

3. Usage

  • 1) Usable pages
    • - The upper menu of a hierarchicalmenu relationship: Movement, Condition, Coding
    • - ValueSetPage: It is used when an additional value is changed from a previously inputted value.
    • - Condition Page of I-Cube
  • 2) Usage
  • If the Import Value is selected from the Select values of each page, a list of ValueSet appears in a popup window. Selection by using an Apply button allows the selected value to be replaced and applied by a stored value of ValueSet.
  • 3) Note
  • No operation is made in association with a ValueSet page. That is, a value modified at an applied area is not used, even if values are changed at ValueSet. Note that the value that was stored is the value that is applied.

4. Hierarchy



Open Action

1. Open Count

The function of the Open Option is to limit the number of open positions.

  • 1) Extern Value: Whether a relevant value is to be set as an input variable is checked.
  • 2) Mode
    • - Each Count: A limit is set for the number of open Buy/Sell positions.
    • - Total Count: The limit is set by the sum of Open positions.
    • - Unlimited: No limit is set on the frequency.
  • 3) Count
  • The frequency of opening by individual positions or the total frequency of opening is inputted. The frequency of opening is set at „1‟ to make a program that only has 1 open position at a given time. Two or more desired numbers are inputted in case of EA of Martingale method or EA that allows re-entrances.

2. Open Lot

Determine how many lots will be used to enter into a position.

  • 1) Extern Value: Whether a relevant value is to be set as an input variable is checked.
  • 2) Mode
    • - Fix Lot: Fixed input value is used as it is.
    • - Add Lot: An open method that starts with the initially input value and increases or decreases lots during position increase/decrease. Lot Setting is inputted by number of initial open lots and the number of increased lots.
      [ex: 1,0.1] The first open is 1 lot, the second open lot is the 1.1 lot, and the third open lot is the 1.3 lot. That is, the number of open lots for the current position is determined by a value in which the number of lots of the first open is multiplied and added by the number of increased lots as many as there are currently open positions.
    • - Multi Lot: This is used for an input method where an initially opening value continuously increases or decreases in multiples. Lot Setting is inputted by the number of first open lots and the multiples of the number.
      [ex: 0.1,2] The first open lot is the 0.1 lot, the second open lot is the 0.2 lot, and the third open lot is the 0.4 lot, and input is made in that order. That is, the number of open lots is determined by the number of initially open lots multiplied by the currently open positions.
    • - Step Lot: This is used to designate the number of lots according to the frequency of open positions. The Lot Setting is inputted with in the format of the number of first open lots, the number of second open lots, the number of third open lots, and the number of finally open lots. In order to use Step Lot, input is made in such a manner that the number of opening frequency set at 1 is matched.
      [ex: 0.1, 0.7, 0.5, 0.3] The first open lot is the 0.1 lot, the second open lot is the 0.7 lot, the third open lot is the 0.5 lot and the fourth open lot is the 0.3 lot, where the designated number of open lots is determined by the current position.
    • - Fund Lot: This is used in determining a ratio of how many lots per fund are designated and used from the current fund. The Lot Setting is inputted with a base selected from among the number of lots per amount and the number of maximum lots.
      [ex: 1000,0.1,1] When a current fund is 3000$, the open positions are 0.3 lots, and when the current funds are 12000$, the open positions are 1.2 lots based on the designated ratio, however, the number of open lots is determined as 1 lot because 1 lot is set as the maximum lot.
  • 3) Lot Setting
  • In the case of Fixed Lots, it is sufficient to write the number of open lots, and if the mode is of different value, input is made based on the exemplified format. The designated format is distinguished by a comma (,).

3. Open Interval

An open interval sets the interval realized by the next open position after one open position has been opened. The interval is the number of bars, where if the number of bars is 0, there is no interval. However, when using 0, caution must be exercised. If the condition of opening a position is based on the current time, many ‟open‟ signals may be generated within a very short period of time. This is because once the closing conditions are satisfied in association with the opening condition, the open and close are repeated so as to inflict a big loss due to the many closed opens.

  • 1) Extern Value: Whether a relevant value is to be set as an input variable is checked.
  • 2) Interval: The interval to open is inputted and expressed as the number of bars.

4. Open Time

Set a time zone to be used for opening. The Open Time functions prevent opening a position when the relevant time that meets the signal, is out of the time zone.

  • 1) Use: Use of the function is checked.
  • 2) Extern Value: Whether a relevant value is to be set as an input variable is checked.
  • 3) OpenTime1~5: Enter a time section in a total of 5 sections. The time must be inputted as a server time used by the futures merchant. The time input format is the format of hour:minute:second, but the time must be inputted using the 24-hour system.
  • 4) EndTimeClose: The last time zone among the 5 sections functions to end the trading, and it is an Option where all the positions traded during the last time zone are closed.

5. Week Time

A setting that designates the time zone per day of the week to be used when opening a position.

  • 1) Use: Use of the function is checked
  • 2) Extern Value: Whether a relevant value is to be set as an input variable is checked.
  • 3) Sun Limit ~ Fri Limit: In order to enter positions between 0:00~20:00 on Friday, other days are set at 00:00:00~24:00:00, and input Fri Limit, and then input as 00:00:00~20:00:00.

6. Count Per Period

This function is to limit the number of entries per a given period.

  • 1) Use: Use of the function is checked
  • 2) Extern Value: Whether a relevant value is to be set as an input variable is checked.
  • 3) Apply Position: Select among three options: Buy Only, Sell Only, Buy+Sellfor the applied position.
  • 4) Day, Week, Month, Quarter, Year: Input a number to limit the entry frequencies of a given period.
    Please note if the frequency of an entry is smaller for a longer period than that of a shorter period, the former will nullify the latter. It is encouraged that you set the frequency of an entry to be large for a longer period.

Close Action

1. Stoploss

A stop loss is set up.

  • 1) Use: Use of the function is checked
  • 2) Extern Value: Whether a relevant value is to be set as an input variable is checked.
  • 3) Stoploss: A stop loss in pips is designated.

2. Takeprofit

The realized profit is set up.

  • 1) Use: Use of the function is checked.
  • 2) Extern Value: Whether relevant value is to be set as input variable is checked.
  • 3) Takeprofit: The realized profit in pips is set.

3. TrailingStop

A trailing stop loss is set.

  • 1) Use: Whether the function is to be used is checked.
  • 2) Extern Value: Whether the relevant value is to be set as an input variable is checked.
  • 3) Trailing Mode: Select one of the two modes.
    • - Start At Profit: Trailingstop will be activated once the profit surpass the trailing stop interval.
    • - Start At Open: Trailing stop will be activated with the entry.
  • 4) Trailingstop: The value of trailing stop loss is set.
  • 5) Trailingstep: A step value for the trailing stop loss. The changed unit will be 1pip if set at 1pip, and the changed unit will be 10pips if set as 10pips.

4. Reverse Close

A Reverse Close is a function where a Sell is closed by a Buy signal breaks out, and a Buy is closed by a Sell signal breaks out. An effective use of this option can conveniently close positions without having to make a separate closing condition.

  • 1) Use: Whether the function is to be used is checked
  • 2) Extern Value: Whether a relevant value is to be set as an input variable is checked.

5. Pip Close

The PIP CLOSE functions isto close when profit of a predetermined pip is reached after opening a position.
A pip close may be viewed as a simultaneous close based on a final position when there are several positions instead of basing it on the individual realized profit.

  • 1) Use: Whether the function has been used is checked.
  • 2) Extern Value: Whether a relevant value is to be set as an input variable is checked.
  • 3) Mode
    • - Buy+Sell: All positions are closed based on the last position by adding Buy and Sell positions.
    • - Buy/Sell: Only relevant one position is closed based on the last position by separating Sell from Buy.
    • - Buy: Only a Buy is closed based on the last position.
    • - Sell: Only a Sell is closed based on the last position.
    • - Step: Designation is made step by step according to the close pip.
  • 4) Pips
  • The number of pips for a profit taking point is input based on the price at which the last position was opened.

6. Total loss

TOTAL LOSS sums the total loss. All positions are liquidated if the lost amount is greater than the set amount.

  • 1) Use: Whether the function is to be used is checked
  • 2) Extern Value: Whether a relevant value is to be set as an input variable is checked.
  • 3) Total Loss: The lost amount is inputted.

7. Total Profit

The liquidation for a total profit is set. If the profit amount is greater than the set amount, all positions are liquidated.

  • 1) Use: Whether the function is to be used is checked
  • 2) Extern Value: Whether a relevant value is to be set as an input variable is checked
  • 3) Total Profit: The amount of profit is set.

8. Fund Close

Providing a function to close all the positions when the equity is changed by a ratio that is predetermined.

  • 1) Use: Whether the function is to be used is checked
  • 2) Extern Value: Whether a relevant value is to be set as an input variable is checked
  • 3) Mode: Provide two modes: ratio increase and ratio decrease.
    • - FundRatioPlus: Close when equity is increased by an aforementioned ratio.
    • - FundRatioMinus: Close when equity is decreased by an aforementioned ratio.
  • 4) Ratio: Only the ratio will be determined.

Other Actions

1. Other Actions

  • 1) Magic No: The Magic Number is set. The Magic Number is an intrinsic number when EA is running. The Magic Number must be set to prevent overlap in which several EAs are executed from one account or one EA is executed from several windows.
  • 2) MaxSlippage: It sets a maximum slippage allowable when opening or closing a position.
  • 3) MaxSpread: It sets the maximum spread allowable when opening or closing a position.
  • 1) Allow: The allowable account number is inputted. It functions to provide aright of execution to a relevant ID only.
  • 2) Expired Time: The EA is executed up to a relevant period if a date is inputted (2012-06-01).
  • 3) Mode: Execution is allowed during checking.
    • - Real Mode: Whether to execute with the real account is set.
    • - Demo Mode: Whether to execute with the demo account is set.
    • - Test Mode: Whether to execute in test mode is set.
    • - Optical Mode: Whether to execute in optimized mode is set.
    • - Visual Mode: Whether to execute in visual mode is set.

3. Display Actions

The purpose of the Display Action is to display the current running status on a screen chart in an easy-to-understand manner.

  • 1) Position: selects a screen position
  • 2) Label: sets whether to output labels
  • 3) FontSize: sets the font size
  • 4) Display Item: checks items to be outputted
    Items such as EA Name, account number, account equity, profit/loss, open count, first open price, last open price, local time and broker time can be set.

4. Signal Actions

Signal Action is to set whether entry and close signals should be applied to the actual trading, whether the signal should be displayed in the screen, whether sound should be active or not, and whether to send email or not when there is a signal..

  • 1) Trade Mode: Set whether to execute to an actual trade when there is an entry or close signals. If this is not selected, the trade will not get executed and by using “Signal Display” or “Signal Sound”, one can use the signal in own manual trading.
  • 2) Signal Display: Function to display an arrow when there is an entry or close signal is displayed.
  • 3) Signal Sound: Function to determine alarm sound and check whether to use the alarm or not when there is an entry or close signal.
  • 4) Send Email: Function to send email when there is an entry or close signal. This function will only work when this function is offered by MetaTradersetup.

Custom Indicators

1. Indicators

  • 1) Window Type: You can choose to show the Custom Indicator signs (e.g. arrow) overlaying the Chart or create a separate new window below the Chart.
  • 2) Index Count: Total number of Custom Indicators to display on Chart.
  • 3) Indicator Condition: You can select from list of Custom Indicator Conditions.

2. Conditions

  • 1) Label: Enter name or label that will be displayed on Chart with the Custom Indicator.
  • 2) Style: Select which sign to display with the Custom Indicator.
  • 3) Width: Select the thickness of the line or sign for the Custom Indicator.
  • 4) Color: Select the color of the line or sign for the Custom Indicator.
  • 5) Type: You can choose between 4 types of Conditions:
    • - Value: You can select which Object/indicator to use for Custom Indicator
    • - Signal: You can select from Signals Conditions to use for Custom Indicator
    • - Signal (True Only): You can select from Signals, but only if the selected Signal is true.
    • - Signal (False Only): You can select from Signals, but only if the selected Signal is false.

3. Indicators List

  • 1) Basic tab: You can choose to download from over 1,300 Custom Indicators we have aggregated.
  • 2) Custom tab: You can choose to download from Custom Indicators you built via FXTraBox.
  • 3) Upload tab: You can choose to download from Custom Indicators you uploaded to FXTraBox.
  • 4) Upload file tab: You can upload your own Custom Indicators to FXTraBox.

Algorithm Examples

1. Moving Average Cross

In this example, Buy order is opened when the Moving Average (MA) 5 line upwardly crosses the MA 20 line and a Sell order is opened when MA5 downwardly crosses MA20.

  • 1) Comparisons Logics
    • Buy Open
    • - Input the Name, select the indicator from the left, and click the Search button for the Object and select the MA from the drop down menu.
    • - Once the popup window loads, enter 5 for the period value of MA, and then press confirm button.
    • - Repeat the same above steps on the right box and select 20 as the period in the popup window.
    • - The logical relationship between left box and right box is set as upCross.
    • - Enter 1 for Number of Bars for both left and right boxes so that the upward cross happens in the previous bar.
    • - Save the MA Upward Cross Comparison Logic by clicking the Save button.

    • Sell-Open
    • - Enter the name, select the indicator from the left, and click the MA from the spread menu.
    • - Once the popup window loads, 5 is inputted for the period value of MA, and press the confirm button.
    • - Repeat the same above steps on the right box and select 20 as the period in the popup window.
    • - The logical relationship between left value and right value is set by downCross.
    • - Enter 1 for Number of Bars for both left and right boxes so that the upward cross happens in the previous bar.
    • - Store the MA downward cross condition by pushing the Add button.
  • 2) Signal Logics
    • Buy Open
    • - Registration at a signal is a must for use as entrance condition, even though the stored condition satisfies the entrance condition.
    • - Following the name input and selection of condition, just select the MA Cross (5/20) from the list.
    • - The Signal is registered by clicking the Save button.

    • Sell Open
    • - Registration at a signal is a must for use as entrance condition, even though the stored condition satisfies the entrance condition.
    • - Following the name input and selection of condition, just select the MA Cross (5/20) from the list.
    • - The Signal is registered by clicking Save button.
  • 3) Algorithms
    • - Select the Action using Basic after name input.
    • - Select Signal MA Cross (5/20) just registered at the Buy Open.
    • - Select Signal MA downCross (5/20) just registered at the Sell Open.
    • - Click the Save button. This will create a new entry on the Logic List section.
    • - Click on the A icon next to the Name, to open the Algorithm map in popup window.
    • - Click the Compile button for the top right. Once successfully compiled, you can download ex4 file by clicking on the Download button.

2. Moving Averages Disparity

In this example, the Algorithm will open a Sell order when the disparity between the Moving Average (MA) 5 line and MA 20 line is between 5 and 10 pips for the trailing 10 bars.

  • 1) Movement Condition Logic
  • -  In order to set the disparity between the MA lines, Movement Logic must be used.
  • - Enter the Name, then search for Indicator and choose MA from drop down menu.
    - Input 20 to the Period on a popup window, and click Confirm button.

    - Now, click on the Get Code to import the codes for the MA 20.

    - Change the + sign to - sign, to calculate the disparity.

    - Now go back the Indicator, and click on Set button and change the Period to 5.          

    - [MA5 - MA20] Movement Logic has now been created.
    - Enter 10 in the Horizontal Range field, to cover the trailing 10 bars movement.
    - Enter 5 and 10 respectively in the Vertical Range field to cover the 5>VR>10 movement. Then check the pips select box.

    - Finally, save the Logic by clicking the Save button.
  • 2) Signal Logic
    - Although the above saved Movement Condition satisfies the condition to open a position, a Signal must be created for Algorithm.
    - Enter the Name to select Movement, and then select the [MA Disparity] Movement just created.

    - Finally, click the Save button.

    3) Algorithm 
    - Enter the Name for the Algorithm and select Open Action as Basic, and select Close Action as Reverse Close Only. Please note that Close Action Logic has been pre-built with Stop Loss of 50 pips, Take Profit of 10 pips and Reverse Close option.
    - Select the [MA Disparity] Signal from Sell Open.

    - Click the Save button to save the Algorithm.
    - Click on the icon next to the Algorithm name from the Algorithm list.

    - Click on the icon next to the Algorithm name from the Algorithm list.

    - Click on the Compile button. After successfully compiling the Algorithm, click on the Download button to download the ex4 file.

3. Moving Average Cross following Price Change

In this example, a Buy order is opened when Moving Average (MA) 5 line upwardly crosses MA 20 line during the trailing 5 bars (including current bar), and the vertical movement of trailing 10 bars (between 5th and 11th trailing bars) must be between 10-20 pips.

We will skip creating Comparison Logic, because we will use MA Cross Algorithm's Buy Open MA Signal created in the Example #1 above.

  • 1) Movement Logic
  • - Movement condition must be created in order to create a condition that can cover a movement within range.

    - Enter Name and memo to best describe the Movement Logic.
    - Click on Object search button and select Price>Close and then enter 20 into the Period field on the popup window. Click Confirm button.
    - Enter 0 for Number of Bars, since we are looking at also the current bar.
    - Enter 10 into the Horizontal Range.
    - Enter 10 and 20 respectively,  in the Vertical Range and then check the pip select box.
    - Click on the Save button.
  • 2) TimeSet Logic
  • - TimeSet condition is created in order to set the order in time for the MA Cross condition and Movement condition.

    - Enter the Name and memo forthe TimeSet Logic.
    - Select Movement Condition created in step #1 for Movement section, then check Bar. Enter 5 and 11 respectively for the range.        
    - Select Comparison Condition created in the first example (MA upCross 5/20) for Comparison section, then select Bar. Enter 0 and 5 respectively for the range.        
    - Click on the Save button to save the TimeSet Logic.
  • 3) Signals Logic
  • - Although the above TimeSet Condition satisfies our entry condition, Signal Condition must still be created for the Algorithm.
    - Enter the Name, select TimeSet from dropdown menu, and select Timeset Condition created in step #2 above.      

    - Click Save button.
  • 4) Algorithms Logic
  • - Enter Name and Memo.
    - Select Open Action as Basic, and select Buy Open, then select "MAcross" Signal Condition from drop down menu, created in the last step.

    - Click the Save button.

Mounting Algorithm (EA) onto Metatrader4

1. Compile & Download EX4 file


- After saving an Algorithm Logic, click on the icon next to the name of the Logic on the Algorithm list, you want to download. This will open an Algorithm Digram Map.

- Click the Compile button to compile the Algorithm. After successful compilation, click on the Download button to download the EX4 file to the local desktop.

2. Backtesting EA on MT4

- Run MT4 Client terminal on local desktop.

- Click on the File menu on top menu bar. This will open a MT4 file folder.

- Open MQL4>Experts file foler. Now copy the downloaded EX4 file downloaded ealier and paste/move into this folder. Now close the running MT4 Client terminal program and restart the program.

- Click on the View menu on top menu bar, then click "Strategy Tester".

- You should find a new box appear on the bottom of the MT4 Client terminal. Now, select the EA and currency pair to test on. Click "Start" button to start the backtesting.

3. Trading EA live on MT4

- First, open the currency pair chart you wish to trade with and select desired timeframe.
- Drag-and-drop the new downloaded EA onto the Chart window, to execute the EA.        

- When a set popup window is loaded, check the "Allow live trading‟ select button as below:

- Click the OK button.
- The name of the EA will appear at the upper right hand corner and icon are activated as below: - Check to make sure that the EA name (MAcrossTimeset) appears on the top right of the Chart and smiling icon is is displayed to indicate that it's on active trading mode (see below image).

Appendix A - More Examples

FXTraBox offers many more features in addition to above functions. We have listed below examples from the most comonly used strategies.

A1. Trading by specifying Opening and Closing time

This simple example specifies when to enter and exit a position. This Algorithm enters into a position from 06:00 until 06:01 and closes the position at 07:00. The opening time is set until 06:01, in order to make sure the trade takes place, but if the order is not filled, it will be cancelled after 06:01.

We will use Comparison Nodes to set up the Conditions for the Algorithm.
1. Set up Comparison Condition. Set Hour Object equal to 06:00.
2. Set up Comparison Condition. Set Minute Object to under 1 minute.
3. Set up Comparison Condition. Set Hour Object equal to 07:00.
4. Set up Signal Node. Combine 1st and 2nd Comparison Conditions.
5. Set up Signal Node. Set the 3rd Comparison Condition.
6. Finally set up Algorithm Node. Combine above 2 Signals.

A2. Trading using average of High and Low prices

This simple example uses the strategy of going short when the price breaks out above the average of high prices of 200 bars and going long when the price sinks below the average of low prices of 200 bars. Moving Average could have been used, but for the purpose of demonstration, average of bars was used. Profit taking is 10 pips and order is closed when there is an opposite signal.

A3. Trading using binary weight (score)

Binary Weight (Score) assigns certain score for each Conditions and when total binary from each different conditions surpasses the binary of that group, a Signal will trigger a trade. This feature is ideal when certain conditions have more importance (weight) than others, or when one wants to combine multiple conditions. In this example, the binary group is consisted of following conditions:

1. Moving Average of 5 days is greater than Moving Average of 20 days. (Binary is 3)
2. Stochastic (5,3,3) K line is greater than Stochastic (5,3,3) D line. (Binary is 2)
3. RSI 20 days line is less than standard line 30 (Binary is 2)
4. Parabolic line is less than current price (Binary is 2)

Apart from above 4 conditions, there is another condition that must be fulfilled before moving to validate above conditions. The current price must be above the Moving Average of 20 days. The conditions are grouped together. Total score is set to 5. So, when the markets current price is above MA 20days line, and if the total Binary Weight score is more than 5, the Signal will be triggered. Profit will be taken at 30 pips plus and stop loss is set at 50 pips.

A4. Trading using Martingale strategy

Martingale strategy is to double up the previous investment, if that investment is a loss. In this strategy, we set the first entry Comparison conditions to buy, when MA (5) is greater than MA (20) and to sell when MA (5) is less than MA (20). Re-entry conditions are to buy when the market price is 10 pips lower than previously executed price and to sell when current price is 10 pips higher when compared with previously executed price. Close open positions when the profit of open positions is more than $100. There will be total of 10 step entries, with first order's lot size set to 0.1, with following orders increased by 2 times. Stop loss is set at $500.

A5. Trading using ATR stop

For this strategy, profit is taken at 20 pips and stop loss is set at 20 pips ("Basic" Close Action). Buy order is entered when ATR is blue (underline) and a Sell order is entered when ATR is red (upper line). For ATR, there are two lines: one red and one blue. Only one line is displayed at any given range on the chart, as a directional signal. The blue or red line that is not visible because its value actually is either less than 0 or more than 1000, making the line to be drawn out of the viewable chart window. This strategy can be set by two conditions and using the mode.

Appendix B – New Features

One of the advantages of FXTraBox is that it is a web-based platform, which allows updating/adding new features seamless. We will be continue to update new feature and upgrade the platform.

B1. List Categories


For every menu, there are 3 different categories to help clients manage the lists more effectively. The 3 categories are shown as list tabs: All, Favorite, and Recycle, as shown in figure above.

1. All tab: lists all the Logics created in chronogical order.
2. Favorite tab: lists all the favorited Logics.
3. Recycle tab: lists all the recycled Logics. One can only delete Logic permanently from this tab.
Users can move Logics between different categories by clicking on the buttons located to the top right of the List section.


Back to Top▲