The Averaging strategy in binary trading

Best Binary Options Brokers 2020:
  • BINARIUM
    BINARIUM

    Best Options Broker 2020!
    Great Choice For Beginners!
    Free Trading Education!
    Free Demo Account 1000$!
    Get Your Sign-Up Bonus Now!

  • BINOMO
    BINOMO

    Only For Experienced Traders!

How to build and test a Binary Options strategy with the MetaTrader 4 Strategy Tester

Table of Contents

1. Introduction

This article shows how to build a Binary Options strategy and test it in Strategy-Tester of Metatrader 4 with Binary-Options-Strategy-Tester utility. By default Strategy-Tester of Metatrader 4 can test Expert Advisors and Indicators against historical data, but it cannot handle Binary Options with expire times. As I need a possibility to test Binary Options strategies automated in Strategy-Tester of MetaTrader 4, the Binary-Options-Strategy-Tester was build as a utility to fit those needs.

The concept contains the following parts:

This is a step by step example how to build a Binary Options strategy stored in an Indicator (marked as red in image above) to communicate through Binary-Options-Strategy-Library (marked as green in image above) with the Binary-Options-Strategy-Tester (marked as blue in image above), to place virtual orders and count their results with backtests and forward tests.

Please keep in mind: Backtesting with historical data will never represent the real future, but it might give you an approximate value to get your strategy more stable.
The quality of your backtest will depends on your historical data. Therefore it is strongly recommended to use a set of hight quality data!

2. Installation

Download and purchase Binary-Options-Strategy-Tester utility from marketplace:
Test-Framework to test Binary Options strategies in Strategy-Tester of MetaTrader 4.

Why a purchased version of Binary-Options-Strategy-Tester utility is needed?
A Binary-Options strategy has to call a function of the Binary-Options-Strategy-Tester (via Binary-Options-Strategy-Library) to place the virtual trades. Related to the license concept of MQL4 this only works if the product has a working license. Therefore you have to purchase the product to test Binary Options strategies or this example.

Download free BinaryOptionsStrategyLibrary.mqh and place it in into folder \Include ([path to your MetaTrader 4]\MQL4\Include):
The free library will provide several functions to build your Binary Options strategy easily and to communicate with the Binary-Options-Strategy-Tester. See Binary-Options-Strategy-Library for more details of the library.

Download free KVO.mq4 indicator and place it (and the compiled KVO.ex4 file) into folder \Indicators\Downloads ([path to your MetaTrader 4]\MQL4\Indicators\Downloads):
The KVO indicator is used as an example to show the access of external indicators and there ex4 files in section “3.2.6 Use of external Indicators (ex4 files)”. See https://www.mql5.com/en/code/8677 for more details of the indicator.

Now you can go further with section “3. Binary options strategy example” and build the example code by yourself or just download the code of this example below.

Optional download BinaryOptionsStrategyExample.mq4 and place it (and the compiled BinaryOptionsStrategyExample.ex4 file) into folder \Indicators ([path to your MetaTrader 4]\MQL4\Indicators):
Download the code of this Binary Options strategy example to let it run without building it by yourself.

Best Binary Options Brokers 2020:
  • BINARIUM
    BINARIUM

    Best Options Broker 2020!
    Great Choice For Beginners!
    Free Trading Education!
    Free Demo Account 1000$!
    Get Your Sign-Up Bonus Now!

  • BINOMO
    BINOMO

    Only For Experienced Traders!

To compile the needed .ex4 files open the .mq4 files (KVO.mq4 and BinaryOptionsStrategyExample.mq4 – NOT Binary-Options-Strategy-Library.mqh) in MetaQuotes Language Editor and click on button “Compile” or just restart your MetaTrader 4 after these files are stored in the described folders and MetaTrader 4 will do this automatically for you.

3. Binary Options strategy example

The following steps will guide you throgh an example how to build an example Binary Options strategy stored in an Indicator to communicate with Binary-Options-Strategy-Tester. You can build it by yourself or just download the code of the BinaryOptionsStrategyExample.mq4.

Please note: This strategy is not a profitable Binary Options strategy! It is just an example how to build a strategy in an indicator to communicate with the Binary-Options-Strategy-Tester utility. Of course you have to build a profitable strategy by yourself. But as you will see, this utility will help you to test and improve your Binary Options strategy.

3.1 Define Binary Options strategy

First of all we have to define the strategy and the changable values (input parameters). MQL4 documentation shows all technical indicators, which can be adressed over the iCustom interface: https://docs.mql4.com/indicators.

Let us say we like to create a simple Moving Average cross strategy with one “fast” and one “slow” Moving Average to trade on next candle after they have crossed each other. Documentation tells, how we can get the value of a single Moving Average: https://docs.mql4.com/indicators/ima.

Let us further say, we like to choose values for “MA averaging period” (fast and slow) and for “applied price” as well as for the “averaging method”. Other values (like symbol, timeframe and shift) depends on the testcase (e.g. the symbol the tester runs on) and should be set automatically. Therefore we basically need the following variables for a Moving Average:

As we need two Moving Averages to check their crosses, we need the following input parameters for the strategy example with some default values:

3.2 Create Binary Options strategy

You need to build an indicator which stores your Binary Options strategy to drag it on the chart where Binary-Options-Strategy-Tester is running on.

Open MetaQuotes Language Editor (in MetaTrader 4 click on “Tools” -> “MetaQuotes Language editor” or just press F4) and click on “New”:

The MQL Wizard will appear. Select “Custom Indicator” to create an empty indicator and click on “Next”:

Enter the name, copyright and link of the strategy as well as the input parameters with their types and default values (initial values) by clicking “Add”-Button and press “Next”:

On tab event handlers select checkbox “OnCalculate” as we need this event to check for our strategy on every tick. Press “Next”:

On tab drawing properties select checkbox “Indicator in seperate window” as we need a seperate window to print out the debug values. Press “Finish”:

The initial code of your indicator will appear:

//+——————————————————————+
//| BinaryOptionsStrategyExample.mq4 |
//| Copyright 2020, __martin__ |
//| https://www.mql5.com/en/users/__martin__ |
//+——————————————————————+
#property copyright “Copyright 2020, __martin__”
#property link “https://www.mql5.com/en/users/__martin__”
#property version “1.00”
#property strict
#property indicator_separate_window
//— input parameters
input int period_fast= 5 ;
input int period_slow= 10 ;
input int method_both= 0 ;
input int applied_price_both= 0 ;
//+——————————————————————+
//| Custom indicator initialization function |
//+——————————————————————+
int OnInit ()
<
//— indicator buffers mapping

//—
return ( INIT_SUCCEEDED );
>
//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int OnCalculate ( const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
<
//—

3.2.1 Input parameters

The initial input parameters are created with the MQL Wizard (see 3.2 Create Binary Options strategy) and we will enhance them with the following steps.

To avoid to have to enter int-values for applied price and averaging method of the Moving Averages for input parameters, the type for method_both and applied_price_both is changed from int to type of enumeration with a default value.

In addition comments for the input parameters are added to show the comments as labels instead of variable names:

//— input parameters
input int period_fast = 5 ; //Fast MA value
input int period_slow = 10 ; //Slow MA value
input ENUM_MA_METHOD method_both = MODE_SMA; //MA method
input ENUM_APPLIED_PRICE applied_price_both = PRICE_CLOSE; //MA applied price

With this modifications the input parameters provides a dropdown with the available values to select as well as “labels” for the input parameters:

3.2.2 Include Binary-Options-Strategy-Library

If you have downloaded and stored the library (see 2. Installation) into \Include folder ([path to your MetaTrader 4]\MQL4\Include), you are able to include the library like this:

//+——————————————————————+
//| BinaryOptionsStrategyExample.mq4 |
//| Copyright 2020, __martin__ |
//| https://www.mql5.com/en/users/__martin__ |
//+——————————————————————+
#property copyright “Copyright 2020, __martin__”
#property link “https://www.mql5.com/en/users/__martin__”
#property version “1.00”
#property strict
#property indicator_separate_window

Binary-Options-Strategy-Library will enhance the input parameters with two new parameters:

  • Place only one SELL or one BUY trade per candle
  • Check only at the beginning of a new candle for the strategy

3.2.3 Add CallStrategy()

Add a call to CallStrategy()-function in OnCalculate() of your strategy indicator to call the strategy on every new tick. CallStrategy() is provided by Binary-Options-Strategy-Library you have inlcuded like discribed above:

3.2.4 Implement CheckMyRules() and helper-function

In CheckMyRules()-function, which is called through the Binary-Options-Strategy-Library, the conditions for the strategy are implemented and trades are placed through PlaceTrade()-function of the library. Values of both Moving Averages are temporarilly stored in variables to compare them in if-conditions while the values of the Moving Averages are taken from the helper-function GetValuesForMA():

//— input parameters
input int period_fast = 5 ; //Fast MA value
input int period_slow = 10 ; //Slow MA value
input ENUM_MA_METHOD method_both = MODE_SMA; //MA method
input ENUM_APPLIED_PRICE applied_price_both = PRICE_CLOSE; //MA applied price

//+——————————————————————+
//| Place your Trading-Rules here – see example below. |
//| StrategyTester will call this function to place trades. |
//| DO NOT: |
//| – Rename function |
//| – Add function paramaters, e.g. CheckMyRules(int a) |
//| – Change function return type, e.g. int CheckMyRules() |
//+——————————————————————+
void CheckMyRules()
<

//Store MA values with shift=0 (current candle) -> current candle,
//call helper function GetValueForMA() to get the value – see helper-functions below
double emaSlow_Current = GetValueForMA(period_slow, 0 );
double emaFast_Current = GetValueForMA(period_fast, 0 );

//Store MA values with shift=1 (past candle) -> last candle,
//call helper function GetValueForMA() to get the value – see helper-functions below
double emaSlow_Past = GetValueForMA(period_slow, 1 );
double emaFast_Past = GetValueForMA(period_fast, 1 );

if (emaFast_Past > emaSlow_Past
&& emaFast_Current //Check if slow MA and fast MA crosses
<
PlaceTrade( OP_SELL ); //Place SELL-Trade for Strategy-Tester, function is located in BinaryOptionsStrategyFunctions.mqh
>

if (emaFast_Past
&& emaFast_Current > emaSlow_Past) //Check if slow MA and fast MA crosses
<
PlaceTrade( OP_BUY ); //Place BUY-Trade for Strategy-Tester, function is located in BinaryOptionsStrategyFunctions.mqh
>

3.2.5 Print out debug values

The function PrintDebugValue() privides a possibility to print out debug values while the tester is running. In the example below the values of the Moving Averages are printed out with their variable names as labels:

//— input parameters
input int period_fast = 5 ; //Fast MA value
input int period_slow = 10 ; //Slow MA value
input ENUM_MA_METHOD method_both = MODE_SMA; //MA method
input ENUM_APPLIED_PRICE applied_price_both = PRICE_CLOSE; //MA applied price

//+——————————————————————+
//| Place your Trading-Rules here – see example below. |
//| StrategyTester will call this function to place trades. |
//| DO NOT: |
//| – Rename function |
//| – Add function paramaters, e.g. CheckMyRules(int a) |
//| – Change function return type, e.g. int CheckMyRules() |
//+——————————————————————+
void CheckMyRules()
<

//Store MA values with shift=0 (current candle) -> current candle,
//call helper function GetValueForMA() to get the value – see helper-functions below
double emaSlow_Current = GetValueForMA(period_slow, 0 );
double emaFast_Current = GetValueForMA(period_fast, 0 );

//Store MA values with shift=1 (past candle) -> last candle,
//call helper function GetValueForMA() to get the value – see helper-functions below
double emaSlow_Past = GetValueForMA(period_slow, 1 );
double emaFast_Past = GetValueForMA(period_fast, 1 );

PrintDebugValue( “emaSlow_Current: ” ,( string )emaSlow_Current, 0 ); //Label and value in line 0
PrintDebugValue( “emaFast_Current: ” ,( string )emaFast_Current, 1 ); //Label and value in line 1
PrintDebugValue( “emaSlow_Past: ” ,( string )emaSlow_Past, 2 ); //Label and value in line 2
PrintDebugValue( “emaFast_Past: ” ,( string )emaFast_Past, 3 ); //Label and value in line 3

if (emaFast_Past > emaSlow_Past
&& emaFast_Current //Check if slow MA and fast MA crosses
<
PlaceTrade( OP_SELL ); //Place SELL-Trade for Strategy-Tester, function is located in BinaryOptionsStrategyFunctions.mqh
>

if (emaFast_Past emaSlow_Past) //Check if slow MA and fast MA crosses
<
PlaceTrade( OP_BUY ); //Place BUY-Trade for Strategy-Tester, function is located in BinaryOptionsStrategyFunctions.mqh
>

//+——————————————————————+
//| Get MA values for period, method, applied price and shift. |
//| For details of iMA() see https://docs.mql4.com/indicators/ima |
//+——————————————————————+
double GetValueForMA( int _period, int _shift)
<
return iMA ( NULL , 0 ,_period, 0 ,method_both,applied_price_both,_shift);
>

3.2.6 Use of external Indicators (ex4 files)

In addition an external indicator which stores its values in buffers can be accessed for the Binary Options strategy, even if only the compiled ex4-file exists.

Let us say we like to include the signal line of the KVO indicator https://www.mql5.com/en/code/8677 to place trades only if the signal line is over 0 for BUY trades and under 0 for SELL trades. Download the KVO.mq4 indicator and place the compiled (ex4 file) into folder \Indicators\Downloads ([path to your MetaTrader 4]\MQL4\Indicators\Downloads).

To compile the needed .ex4 file open KVO.mq4 in MetaQuotes Language Editor and click on button “Compile” or just restart your MetaTrader 4 after the file is stored in the described folder and MetaTrader 4 will do this automatically for you.

First we have to identify the relevant buffers which stores the relevant values to access. Therefore we press the button “Data Window” in MetaTrader 4 to show all available buffers of the used indicators and drag the KVO indicator on a chart. By hovering the cross over the chart (press mouse-wheel on chart to bring up the cross) the buffer values of the indicator of the hovered timeperiod will be shown in data window:

The data window labels tells us the second buffer value of the indicator stores the signal line. If buffers of indicators did not have labels, we can find the right one by comparing the buffer values with the displayed value under the cross in the chart and indicator. Buffers of an indicator starts with 0, so we have buffer value 1 = buffer 0, buffer value 2 = buffer 1 and so on and we have to access buffer 1 to get the signal value.

Next we have to know all input parameters of the external indicator we like to access. By draging the indicator on a chart, we see all input paremeters:

Let us further say, we like to access the indicator with (its default) values: 34, 55 and 13. We use a helper function (based on iCostum), wich provides us the possibility to get the values of the indicator with parameters for buffer and shift, while shift 0 will be the value of the current candle, shift 1 the value of the last candle, shift 2 the value of the second to last candle and so on. In addition we temporarilly store the values of the indicator buffer and enhance the if-condition of the strategy:

//— input parameters
input int period_fast = 5 ; //Fast MA value
input int period_slow = 10 ; //Slow MA value
input ENUM_MA_METHOD method_both = MODE_SMA; //MA method
input ENUM_APPLIED_PRICE applied_price_both = PRICE_CLOSE; //MA applied price

//+——————————————————————+
//| Place your Trading-Rules here – see example below. |
//| StrategyTester will call this function to place trades. |
//| DO NOT: |
//| – Rename function |
//| – Add function paramaters, e.g. CheckMyRules(int a) |
//| – Change function return type, e.g. int CheckMyRules() |
//+——————————————————————+
void CheckMyRules()
<

//Store MA values with shift=0 (current candle) -> current candle,
//call helper function GetValueForMA() to get the value – see helper-functions below
double emaSlow_Current = GetValueForMA(period_slow, 0 );
double emaFast_Current = GetValueForMA(period_fast, 0 );

//Store MA values with shift=1 (past candle) -> last candle,
//call helper function GetValueForMA() to get the value – see helper-functions below
double emaSlow_Past = GetValueForMA(period_slow, 1 );
double emaFast_Past = GetValueForMA(period_fast, 1 );

//Store signal value (buffer 1) of KVO indicator from current candle (shift 0)
double kvoSignal = GetValuesFromIndicator__KVO__( 1 , 0 );

PrintDebugValue( “emaSlow_Current: ” ,( string )emaSlow_Current, 0 ); //Label and value in line 0
PrintDebugValue( “emaFast_Current: ” ,( string )emaFast_Current, 1 ); //Label and value in line 1
PrintDebugValue( “emaSlow_Past: ” ,( string )emaSlow_Past, 2 ); //Label and value in line 2
PrintDebugValue( “emaFast_Past: ” ,( string )emaFast_Past, 3 ); //Label and value in line 3

if (emaFast_Past emaSlow_Past //Check if slow MA and fast MA crosses
&& kvoSignal > 0 ) //Check if signal value of KVO is over 0
<
PlaceTrade( OP_BUY ); //Place BUY-Trade for Strategy-Tester, function is located in BinaryOptionsStrategyFunctions.mqh
>

//+——————————————————————+
//| Get MA values for period, method, applied price and shift. |
//| For details of iMA() see https://docs.mql4.com/indicators/ima |
//+——————————————————————+
double GetValueForMA( int _period, int _shift)
<
return iMA ( NULL , 0 ,_period, 0 ,method_both,applied_price_both,_shift);
>

//+——————————————————————+
//| Example how to get values from external indicators |
//| see https://docs.mql4.com/indicators/icustom |
//| Parameters: |
//| int _buffer – indicator-buffer (starts with 0) |
//| int _shift – value to shift; 0 = current candle, 1 = prev candle |
//+——————————————————————+
double GetValuesFromIndicator__KVO__( int _buffer, int _shift= 0 ) //Change “__KVO__” to indicator name
<

return (
iCustom (
NULL , //NULL for current timeframe selected in tester – NO CHANGES NEEDED
0 , //0 for current symbol selected in tester – NO CHANGES NEEDED

//BEGIN EDIT
“\\Downloads\\KVO.ex4” , //Filepath and filename of the indicator (*.ex4 file)
//BEGIN INDICATORS INPUTS
34 ,
55 ,
13 ,
//END FOR INPUTS
//END EDIT

_buffer, //Buffer index (begins with 0), _buffer is adressed over function parameter – NO CHANGES NEEDED
_shift //Shift (0 for current candle), _shift is adressed over function parameter – NO CHANGES NEEDED
)
);

It is also possible to enhance the input parameters of our strategy indicator with the values for the used KVO indicator and set the values in helper function by variables. As this tutorial should be just an example and “as simple as possible”, this variant is not shown.

3.3 The complete code

Below you will find the complete code of the Binary-Options-Strategy-Example from all the steps above, ready to drag on the Binary-Options-Strategy-Tester to test and see the results on chart:

//+——————————————————————+
//| BinaryOptionsStrategyExample.mq4 |
//| Copyright 2020, __martin__ |
//| https://www.mql5.com/en/users/__martin__ |
//+——————————————————————+
#property copyright “Copyright 2020, __martin__”
#property link “https://www.mql5.com/en/users/__martin__”
#property version “1.00”
#property strict
#property indicator_separate_window

//+——————————————————————+
//| Place your input parameters here – see example below |
//+——————————————————————+
//— input parameters
input int period_fast = 5 ; //Fast MA value
input int period_slow = 10 ; //Slow MA value
input ENUM_MA_METHOD method_both = MODE_SMA ; //MA method
input ENUM_APPLIED_PRICE applied_price_both = PRICE_CLOSE ; //MA applied price

//+——————————————————————+
//| Custom indicator iteration function |
//+——————————————————————+
int OnCalculate ( const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
<
//—

CallStrategy(); //Call the strategy, function is locatet in BinaryOptionsStrategyLibrary.mqh (included above)

//— return value of prev_calculated for next call
return (rates_total);
>

//+——————————————————————+
//| Place your Trading-Rules here – see example below. |
//| StrategyTester will call this function to place trades. |
//| DO NOT: |
//| – Rename function |
//| – Add function paramaters, e.g. CheckMyRules(int a) |
//| – Change function return type, e.g. int CheckMyRules() |
//+——————————————————————+
void CheckMyRules()
<

//Store MA values with shift=0 (current candle) -> current candle,
//call helper function GetValueForMA() to get the value – see helper-functions below
double emaSlow_Current = GetValueForMA(period_slow, 0 );
double emaFast_Current = GetValueForMA(period_fast, 0 );

//Store MA values with shift=1 (past candle) -> last candle,
//call helper function GetValueForMA() to get the value – see helper-functions below
double emaSlow_Past = GetValueForMA(period_slow, 1 );
double emaFast_Past = GetValueForMA(period_fast, 1 );

//Store signal value (buffer 1) of KVO indicator from current candle (shift 0)
double kvoSignal = GetValuesFromIndicator__KVO__( 1 , 0 );

PrintDebugValue( “emaSlow_Current: ” ,( string )emaSlow_Current, 0 ); //Label and value in line 0
PrintDebugValue( “emaFast_Current: ” ,( string )emaFast_Current, 1 ); //Label and value in line 1
PrintDebugValue( “emaSlow_Past: ” ,( string )emaSlow_Past, 2 ); //Label and value in line 2
PrintDebugValue( “emaFast_Past: ” ,( string )emaFast_Past, 3 ); //Label and value in line 3

if (emaFast_Past emaSlow_Past //Check if slow MA and fast MA crosses
&& kvoSignal > 0 ) //Check if signal value of KVO is over 0
<
PlaceTrade( OP_BUY ); //Place BUY-Trade for Strategy-Tester, function is located in BinaryOptionsStrategyLibrary.mqh
>

//+——————————————————————+
//| Get MA values for period, method, applied price and shift. |
//| For details of iMA() see https://docs.mql4.com/indicators/ima |
//+——————————————————————+
double GetValueForMA( int _period, int _shift)
<
return iMA ( NULL , 0 ,_period, 0 ,method_both,applied_price_both,_shift);
>

//+——————————————————————+
//| Example how to get values from external indicators, |
//| see https://docs.mql4.com/indicators/icustom |
//| Parameters: |
//| int _buffer – indicator-buffer (starts with 0) |
//| int _shift – value to shift; 0 = current candle, 1 = prev candle |
//+——————————————————————+
double GetValuesFromIndicator__KVO__( int _buffer, int _shift= 0 ) //Change “__KVO__” to indicator name
<
return (
iCustom (
NULL , //NULL for current timeframe selected in tester – NO CHANGES NEEDED
0 , //0 for current symbol selected in tester – NO CHANGES NEEDED

//BEGIN EDIT
“\\Downloads\\KVO.ex4” , //Filepath and filename of the indicator (*.ex4 file)
//BEGIN INDCATORS INPUTS
34 ,
55 ,
13 ,
//END FOR INPUTS
//END EDIT

_buffer, //Buffer index (begins with 0), _buffer is adressed over function parameter – NO CHANGES NEEDED
_shift //Shift (0 for current candle), _shift is adressed over function parameter – NO CHANGES NEEDED
)
);
>
//+—————————————————————–+

4. Run a backtest (video)

The following video shows how to run a backtest of your Binary Options strategy in Strategy-Tester of MetaTrader 4:

  • Start Binary-Options-Strategy-Tester in Strategy-Tester of MetaTrader 4 and set the input parameters
  • Drag your Binary Options strategy indicator on the chart, set the input parameters and check “Allow external expert imports” on the “common” tab
  • Drag your used indicators with their used input parameters on the chart to see their values while tester is running (optional)
  • Save all settings in a template to run the test with all settings again – using the pause button of the Strategy-Tester (optional)
  • See the results of your Binary Options strategy on the Strategy-Tester chart

5. Run a forward test

To do a forward test simply drag the Binary-Options-Strategy-Tester utility and your strategy indicator on your demo or live chart of your broker instead of using it in Strategy-Tester:

  • Drag Binary-Options-Strategy-Tester utility on demo or live chart and set the input parameters
  • Drag your Binary Options strategy indicator on the chart, set the input parameters and check “Allow external expert imports” on the “common” tab
  • Drag your used indicators with their used input parameters on the chart to see their values while forward test is running (optional)
  • Save all settings in a template to run the test again with all settings (optional)
  • See the results of your Binary Options strategy on demo or live chart

6. FAQ

Question: Why do you show an example of a non profitable Binary Options strategy?
Answere: This is just an example how to build a strategy in an Indicator to communicate with the Binary-Options-Strategy-Tester utility in marketplace to test and improve your strategy.

Question: Binary-Options-Strategy-Tester stops after the exact amount of losses with error “Array out of range”. Why?
Answere: Binary-Options-Strategy-Tester can rise an error after x losses to stop Tester and to analyse the situaion on the chart. If you do not want to, just switch off the option in settings.

Question: No arrows appear on chart after I draged my indicator with a working strategy on it. What happened?
Answere: You have to enable “Allow external expert imports” on the “common” tab while you drag your strategy-indicator on the chart (log message will show an error in this case).

Question: No arrows appear on chart after I draged my indicator with a working strategy on it with “Allow external expert imports” enabled. Why?
Answere: A strategy has to call a function of Binary-Options-Strategy-Tester to place virtual trades. Related to the MQL4 license concept this only works if the product has a working license. Therefore you have to purchase the product.

Question: No arrows appear on chart after I dragged my indicator with a working strategy on it and I got errors like “Cannot call ..” or “Cannot load ..” in the log of MetaTrader 4. What can I do?
Answere: Use the latest version (greater v1.00) of BinaryOptionsStrategyLibrary.mqh. Check version tag in code of your BinaryOptionsStrategyLibrary.mqh and see changelog v1.01 of BinaryOptionsStrategyLibrary.

Question: I see no results on Strategy-Tester tabs “Results”, “Graph”, “Report”. Where I can see the results?
Answere: Strategy-Tester of MetaTrader 4 can not handle Binary Options so these tabs con not be used. Therefore this utility calculates all wins and losses and prints the results on the chart.

7. Miscellaneous

As I need a possibility to test Binary Options strategies automated in Strategy-Tester of MetaTrader 4 for long time periods in a short time and to do foward tests on the chart of the broker, this utility was build. I have spent a lot of time for the concept and the implementation of the Binary-Options-Strategy-Tester as well as for the documentation. Maybe there is a better way to do it and maybe some improvements will bring it closer to fit the needs of you. So please feel free to contact me for ideas for improvements!

Forex Strategy HEDGE GATE

We will only sell 50 copies of the HEDGE GATE Expert Advisor. On this, further sales of the adviser will stop. At the moment, there are 250 active licenses from previous versions of the adviser. We decided not to exceed the number of 330 active licenses in the market. Given the high profitability of the adviser, we do not want to make it massive. Massiveness can damage the sustainability of a strategy. We also reserve 30 copies of the license for use in investor capital management within our company. Advisor will continue to develop and update. Since this is the main adviser used by traders of our company Kalinka Capital OU.

Presenting a fifth(!) generation of the multi-currency hedging forex advisor, HEDGE GATE!
Our company made tremendous improvements and changes in the advisor’s algorithm. Strategy of the market entry direction stayed the same “GANN SQUARE” theory.
In 2020, we’ve started working on improvements of actions algorithm for opened profit and loss making positions support. And we’ve reached results!

As in previous advisor versions, we continued to use StopLosses, but with much more bigger improvements on averaging strategy.

Following modules were implemented in HEDGE GATE :
* Targeted intraday profit.
* Targeted profit from set date.
* Loss hedging for the most loss making position on account of profits gained on other instruments.
* Market entry with predetermined grid of pending orders in boundaries of calculated channel in projected intraday profits.

Now the HEDGE GATE trading became more profitable and less risky in relation to other versions. Strategy of capital management became more flexible and logical. With many calculations executed in mere seconds, we’ve teached the advisor to react on changed account’s balance. Depending on the time, overall market activity and current session, logical decisions are made to react to these intraday changes.
We are not hiding the profitable strategies!
Besides forex trading, second direction of our company is to develop and commercialize the forex trading systems.

We’ve created automated trading system that is suitable for the most demanding forex traders. We’ve worked on this system starting from 2020, finding and excluding the weak aspects and strengthen the strong once. And in the end, we are honored to offer you this multi-currency self-learning “HEDGE GATE” forex advisor.

* HEDGE GATE – is 87% to 95% of profitable trades,
* average time of the position in the market is not more than 10 hours, you are not paying your Broker for swaps,
* trading with StopLoss, no averaging or martinagale. If you want to use averaging, you can turn it on.
* hedging strategy on major currency pairs.
* Market entry direction calculations based on “Gann sqare” theory.

As an example:
– best result in trading on EUR/USD for 2020 is 1 542% of profit!
– the best trading result for EUR / USD for 2020 – 2020 was 1,545,000% of the deposit growth! With a starting deposit of $ 1,000, the profit was $ 14,545,000. Watch a video trading example in the description below.

  • In the store, select the number of months
  • Enter the number of the real account
  • Pay and wait for confirmation
  • Download advisor and install in terminal
  • In the store, select 24 months
  • Enter the number of the real account
  • Pay and wait for confirmation
  • Download advisor and install in terminal

Free version of advisor

Open an account by referral link

Activate a referral account

Main advantage of “HEDGE GATE” advisor – is that there is absolutely no need in optimization or change trading settings that are responsible for the market entry accuracy.

The only thing you might want to modify for your own preferences in advisor settings is the % of total profit, fixed on all trades opened on your trading account, and the intraday time desired for profit fixing on each pair separately.

All the rest is calculated and analyzed by the “HEDGE GATE” advisor!

What does the “HEDGE GATE” do and how it is analyzing the market to gain stable income?

This page, as well as all the others, will not contain a full description of how the advisor is working with detailed description of its logic, as some of it has to be kept secret. The description pages of any advisor are created for a brief introduction, with only basics description. As the trading results and the test results is already a prove of what the strategy is capable of.

So, about “HEDGE GATE”.

  • “HEDGE GATE” doesn’t needs any optimizations of the trading settings. There is nothing that needs to be optimized, as it is a self-learning trading system with high level of logical calculations of market activities.
  • “HEDGE GATE” enters the market at the beginning of the trading day at 00:00 by GMT+2.
  • Algorithm of the trading strategy uses market history for analysis, taking the trading day volatility results into account (day candles/bars D1). Historical maximum and minimum of the market, quotes activity and volatility in those values, and many other analysis sources.
  • Hedging strategy is used for opened positions and cross pairs analysis.
  • “HEDGE GATE” uses almost all major currency pairs in trading – EUR/USD, GBP/USD. (in developing – EUR/GBP, GBP/CHF, CHF/JPY, GBP/JPY, AUD/JPY, USD/CHF, USD/JPY, USD/CAD, AUD/USD, EUR/AUD, EUR/CHF, EUR/JPY).
  • “HEDGE GATE” does not uses any averaging systems, loss making positions are not just left in the market to be closed on their own for a long time as soon as they reach any profit, positions are always supported. If you want to use averaging, you can turn it on.
  • “HEDGE GATE” does not uses any martingale.
  • On all currency pairs used in trading, positions are opened only once a day with the same volumes, and the profit or losses are fixed intraday.
  • Profit is fixed by the method of partial position closure in two stages. First – in range of 10 – 50 points, second – in range of 50 – 150 points with trail support of the profit position.
  • During the trading day when the total profit is reached in %, set in the advisor trading settings for all positions, advisor will close all positions in the market.
  • Profit can be fixed by using the time settings for each used currency pair separately.
  • Fully automated trading in MetaTrader 4 terminal, nothing is needed to be done by the trader during trading process.
  • Automated capital management. Trader need to set the desired % of deposit use once, and the advisor will automatically calculate trading volume for every new position in relation to the deposit size. Trader can disable this system and use only fixed lot amount for new market positions.
  • “HEDGE GATE” was initially created as a trading system for capital management on investor accounts and PAMM accounts. Capital management module “Money Management” is perfectly handling the activity of account’s balance, like constant withdrawals and deposits on PAMM accounts. So the “HEDGE GATE” advisor is perfectly suitable for the sole traders, and account managers.

Now let’s take a look at the Meta Trader 4 terminal, how it will look like with the “HEDGE GATE” advisor installed. As we are seeing on the picture below, you will not need many charts with different timeframes and currency pair charts. You only need one chart with the day candles to see today’s results. No technical or fundamental analysis, with all possible indicators in use! You don’t need to monitor how much loss making positions you have and when they will be averaged. You don’t need to do anything, just lay back and see how the “HEDGE GATE” is doing all the work!

Trader is only needed to monitor on technical conditions, like a functional PC or the internet connection during the trading days.

  • The use of trading settings for the H2, H4, H6 timeframes is possible only in the version for the Meta Trader5 trading terminal.

Available only for registered users who have paid for the license or activated TRIAL.

You can download all current trading settings. To access the settings download buttons, log in to the site using your login (this is your e-mail address). If you are entering your personal account on https://soft4forex.com for the first time, create your password through the password recovery function.

In your account on the site https://soft4forex.com you can change the numbers of the accounts of the license binding on which the Forex Advisor you purchased will trade.

Current instructions on using and configuring a forex advisor can be found on the advisor description page on our website.

To view the test results and download the trading settings, in the table below, in the results cell, click on the symbol in the form of “eyes” – the report with the test results will be loaded. In the report, under the schedule, there are two buttons “DOWNLOAD MT4 SET” and “DOWNLOAD MT5 SET”, for downloading the trading setting for the corresponding Meta Trader4 or Meta Trader5 trading terminal.

In the table, in green cells, the results with a safe risk / reward ratio are recommended for safe trading. In yellow cells, results with increased risks. And require control of the load on the account balance when using.

Profitability – from 10% to 30% monthly or up to 190% to 300% annual with gained profits reinvested with the minimal use of free funds.

Breakeven/Averaging – StopLoss or the option for loss limitation through total profit fixing on all positions with the hedging module.

Using Moving Averages to Trade Nadex Binary Options and Spreads

Averaging prices over time can help filter out the noise and see the overall trend

Price charts typically show a lot of variation that makes it harder to tell what the trend is. A moving average plots the average of those prices over a period of time, smoothing out those variations and giving you a line that shows the overall direction.

Different moving averages give different weight to the price data

Moving averages vary in how they are calculated, but are used in the same basic way. Some give equal weight to each price point, while others place more importance on recent data. The three most common types of moving averages are simple, linear, and exponential.

Simple Moving Average (SMA)

The most common moving average takes the sum of the past closing prices over the time period and divides by the number of prices. A 10-day moving average adds the last 10 closing prices and divides by 10. A longer time period like 200 days will be smoother and straighter and gives a better idea of the long-term trend as well as when it might reverse.

Because in an SMA older prices have the same impact on the result as newer ones, traders also use moving averages that give more weight to recent prices.

Linear Weighted Average

The less common linear weighted moving average takes the sum of all the closing prices over a certain time period, multiplies them by the position of the data point, and then divides by the sum of the number of periods. A 10-day linear weighted average would multiply today’s closing price by ten, yesterday’s by nine, and so on. Those numbers then get added together and divided by the sum of the multipliers (10+9+8…+1).

Exponential Moving Average (EMA)

The exponential moving average also gives more weight to recent data and responds to price changes faster than a simple moving average. It is generally considered more efficient than the linear weighted average.

Most charting packages for stocks, futures, and forex will display simple and exponential moving averages and sometimes others. The Nadex platform shows the SMA and EMA and allows you to adjust their parameters to your liking.

How traders use moving averages

Moving averages can help identify trends and trend reversals as well as provide support and resistance levels at which to place entry and exit orders.

Trends are easier to confirm when the price bars move in the same direction as their moving average. When a moving average is heading upward and the price stays consistently above it, the market is in an uptrend. A downtrend has a downward sloping moving average with the price staying below it.

You can also compare two moving averages of different time frames. If the short-term average is above a longer-term average, the trend is up. If the short-term MA is below, it’s most likely a downtrend. We say “most likely” because you should see it happening over a significant period. A quick cross from above to below doesn’t automatically signal a trend reversal.

Many, many traders have learned this the hard way by pulling the trigger in anticipation of a trend reversal that never materialized.

Moving average crossovers

When the price itself crosses the moving average it can signal that the trend is about to end or at least pause for a while. Long term investors, for example, often consider it a bearish sign when stocks drop below the 50- or 200-day moving average. When prices stop doing what they have been doing for months, that is a strong sign that something new is happening.

Some traders plot two or more moving averages of different time periods and look for places where the two lines cross. Trading moving average crossovers is a common technical trading strategy. The key to using this strategy successfully is to look for other factors, like higher highs and higher lows to signal an uptrend, before entering. A moving average crossover by itself is not enough and can often be a false signal.

How can a crossover be a false signal? Sometimes an uptrend will include two or three periods of sharp downward correction. If the price falls a large distance, it may be enough to skew the averages temporarily. While smart traders will see it for what it is, a temporary correction in a larger trend, less skillful traders will jump the gun and act on the signal, only to watch the market resume the prevailing trend.

Support and resistance

Traders can also use moving averages as support and resistance levels. A common, basic method used by stock investors is to watch for the price to break below or bounce off the 200-day moving average.

Because so many traders are watching that same line and planning similar ways to use it, it becomes a kind of collective meeting place. The market as a whole agrees that if and when they want to vote, so to speak, on whether the market should reverse trend and head in the opposite direction, they’ll meet and hold that vote at the 200-day moving average line.

That line isn’t the only such decision-making point. Fibonacci levels and trendlines connecting successive highs and lows play the same role. If the market breaks through those lines with strong momentum, there’s a stronger possibility that it will continue in the new direction.

Because so many traders use them for support and resistance, moving average lines also make good places to set stop-loss orders. If you sell a binary option, for example, then see the underlying market go above a significant moving average line and stay above it, you might decide to exit the trade early because it no longer meets your criteria for a downtrend.

That may be the wisest use of moving averages and moving average crossovers. Instead of using them blindly as a red light/green light “system,” instead of believing that they can reveal some secret to you that other traders can’t see, you can use them as reminders to check whether the trade still meets your criteria and fits your trading plan. You can use them as places to make decisions and retain control of the trade.

Best Binary Options Brokers 2020:
  • BINARIUM
    BINARIUM

    Best Options Broker 2020!
    Great Choice For Beginners!
    Free Trading Education!
    Free Demo Account 1000$!
    Get Your Sign-Up Bonus Now!

  • BINOMO
    BINOMO

    Only For Experienced Traders!

Like this post? Please share to your friends:
Binary Options Trading Library
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: