Settings

Complete Settings List of BelkaMiner EA (v1.17x February 2020)

The settings contain many links to be readed

Modes

  • SystemModeoperating modes: ‘Machine Learning’ is used for data mining and machine learning, ‘BackTesting & Trading’ is used for backtesting, researching and live trading.

Money Management

  • LotSize – fixed lot size for trading if UseMargin% and Balance are set to 0.
  • Balance – proportional lot size calculated by the formula: LotSize * AccountBalance/Balance. It works together with LotSize. This MM proportionally increases (decreases) lot sizes when the account balance increases (decreases), respectively. The smaller the value, the higher the risk. In case of non-zero value, the EA calculates lot sizes based on the account balance, e.g., 0.05 lots for every $1000. If ‘Balance‘ set to a negative value, then the EA calculates lot sizes based on the account equity.
  • MaxRiskPerTrade% – maximum risk (as a percentage of the account balance) per trade based on the initial StopLoss value. If MaxRiskPerTrade%=0, the EA will use LotSize or UseMargin%.
  • MaxLot_Overall – maximum lot size that the EA can use for trading.

GMT

  • AutoGMT_Detection – if true, the EA will automatically detect your broker’s time zone in live trading. To use this feature, you must allow requests to:
    https://www.worldtimeserver.com
    https://belkaglazer.com (backup URL to determine GMT offset)

    BelkaMiner EA
    BelkaMiner EA

    GMT[m] – GMT has been calculated manually, GMT[a] – GMT has been detected automatically.
    +3 – current GMT offset (DST is taken into account), [NY] – NY Close Broker.

  • NYCloseBroker – set this parameter to false if your broker’s server time is not set to New York Сlose. If you use a NY close broker (who closes daily candles at 5 pm New York time, that corresponds to GMT+2 in winter and GMT+3 in summer), then no need to change the default settings.
  • GMT_offset – GMT offset of your broker in winter. This parameter should be configured only if NYCloseBroker=false.
  • Daylight_Saving_Time – set this parameter to US/Europe if your broker changes the GMT offset in the summer period. This parameter should be configured only if NYCloseBroker=false.

Execution

  • MaxSpreadPip – if the spread exceeds this value, then the EA will not allow opening a new trade. It works only with a market order, pending orders will not be closed.
  • MaxSpreadToExitPip – if the spread is above this value, then the EA will not allow closing an open trade.
  • MaxSlippagePip – parameter allows you to specify the maximum slippage (as a max. deviation from the quoted price) for a market order. It works only with Instant Execution (for example, standard, classic, micro, and nano accounts). This parameter has no effect on an ECN account. If MaxSlippagePip > 0, the EA will control slippage using the maximum deviation from the ask/bid price. If a broker is unable to fill an order within a specified deviation, then the order will be rejected.

Time

  • OrderHourStart/Stop – hour when the EA should start/stop looking for trading signals.
  • OrderDayOfWeek – day(s) of the week when the EA is allowed to open a new trade.
  • DaysOffBeforeAfterNY – a trading pause which is activated before/after the New Year for a specified number of days. For example, if DaysOffBeforeAfterNY=3, then the EA will not open new trades from December 29 to January 3.

Basic Entry Rules

  • StrategyType – a type of ‘White-box’ algorithm. The algorithm is based on boolean logic, open and clear rules. It is used to generate entry points and gives many trades with a low average trade. It must have a ‘trading edge’ that may be too small to cover trading costs. The edge can only be seen after the spread/commission is turned off or set to a minimum value.
    Reversal (PCh) is a mean reversion strategy that uses reversals between support and resistance levels.
    Breakout (PCh) is a breakout strategy that enters the market when the price moves outside a defined price range (support and resistance levels).
    Momentum (PA) is a momentum strategy that uses significant price movements in one direction.
  • DailyATR_Period – period of DailyATR. It is used to normalize the volatility.
  • PCh_Type –  methods used for calculating the Price Channel:
    Donchian Channel is formed by taking the highest high and the lowest low of the last n periods. The area between the high and the low is the channel for the period chosen.
    Bollinger Bands – is based on two standard deviations away from a simple moving average.
  • PCh_Period – a period of the Price Channel.
  • PCh_OffsetPip – offset of the Price Channel levels.
  • PA_Bars – number of bars to analyze price movement (for Momentum strategy).
  • PA_Size%ATR – minimal size (in %ATR) of price movement (for Momentum strategy).

Basic Exit Rules

  • StopLoss, TakeProfit – stop loss and take profit. They can be expressed in pips (in case of value > 3) or %ATR (in case of 0 < value <3). If value = 0, the EA places SL(TP) in the middle of the price range (HL/2 level).
  • StopBar – time-based stop loss that automatically closes trades after a certain number of bars, regardless of other conditions (0 = off).
  • FridayStopHour – hour to close trades on Friday (-1 = off).
  • TrailingStopPip – in case of value > 0: trailing stop in pips when a position is in profit, in case of value < 0: minimum profit level in pips when SL should be moved to breakeven (0 = off).
  • TrailingActivationPip – determines the number of pips to activate ‘TrailingStopPip‘.

Machine Learning

  • Use_Machine_Learning – enable/disable ML in backtesting and live trading. If disabled, the EA will only use rules of the basic strategy.
  • Machine_Learning_Technique – ML techniques:
    Clustering (Unsupervised) – the EA groups a set of entry points (dataset) in such a way that points in the same group (called a cluster) are more similar to each other than to those in other groups (clusters). Then we test each cluster and try to find profitable ones with good performance. We assume the points in the profitable clusters have certain properties that make them profitable. Clustering is a main task of exploratory data mining, and a common technique for statistical data analysis, used in many fields.
    Unsupervised learning is a type of self-organized Hebbian learning that helps find previously unknown patterns in data set without pre-existing labels. Read more about Unsupervised Learning->
    Belkaglazer EA
    Belkaglazer EA
    Neural Network (Supervised) – the EA trains perceptron using raw data without clustering. Supervised learning is the machine learning task of learning a function that maps an input to an output based on example input-output pairs. Read more about Supervised Learning->
    This method is less robust and brings extreme risk of over-fitting!

BelkaMiner EA

  • ConfigFile – configuration file containing the results of clustering and machine learning. It is located in the ‘Common\Files‘ directory. The default config file (for the default strategy) is created after the first launch of the EA. Read more ->
  • DatasetMaxSizemaximum dataset size.

Input Data / Metrics

  • UseTradingHours_Measure – use trading hour as a measure. It can be used for Intraday seasonality detection.
  • UseEMA_Measure – daily EMA-based metrics normalized by ATR and calculated by the formula: (Close-EMA(n)) / ATR(m). It can be used for trend detection.
  • EMA_Period – perion of the daily EMA.
  • UseMomentum_Measureprice movement before the entry point normalized by ATR. It may help figure out how the market reacts to certain price movements.
  • Momentum_Bars – number of bars to calculate the price movement.
  • UseDailyVolatility_Measurevolatility-based metrics calculated by the formula: ATR / ATR(30). It may help in Daily volatility filtering.
  • UseIntradayVolatility_Measure volatility-based metrics normalized by ATR and calculated by the formula: (Upper PCh level – Lower PCh level ) / ATR. It may help in Intraday volatility filtering.
  • UseHurst_Measurehurst-based metrics. It is used as a measure of memory (M/MR regime).
  • Hurst_Bars – number of bars to calculate Hurst exponent.

Clustering settings

  • ClusteringMethod – method used for clustering:
    K-means++ is one of the simplest and popular unsupervised machine learning algorithms with choosing the initial values.
  • NumberOfClusters – desired number of clusters for k-means clustering. 30….50 is recommended. The optimal number depends on the dataset size (number of points/vectors).
  • NumberOfRestarts – max. number of restarts to find a good / the global optimum. Try to reduce it if clustering takes too long.
  • OutlierDataPercentile – parameter for calculating 2 percentiles (min & max) to filter outliers before normalization. Min percentile = OutlierDataPercentile, Max percentile = 100-OutlierDataPercentile.
  • NormalizationMethod – adjusting values measured on different scales to a notionally common scale:
    Z-Score uses mean and standard deviation. It is calculated as: z = (x-mean) / stdev.
  • WhatToSave – data to be saved in the Config file:
    DoNotSavePoints – the EA will only save mean, stdev and coordinates of centroids. Fast, but NN (Neural Network) training (to classify the cluster number) is not possible in the future.
    SavePointsOnly – the EA will save mean, stdev, coordinates of centroids and points with cluster numbers. Fast, NN can be trained later.
    SavePoints & TrainPerceptron – the EA will save everything and train NN. This may take a long time (hours or even days, it depends on the settings, MT5 works much faster).

Perceptron Settings

BelkaMiner EA
Multilayer perceptron
  • NeuronInHiddenLayer – number of neurons in the hidden layer. If zero, then no hidden layer will be used. Do not use hidden layers unless required. They may reduce the learning speed and lead to over-training (classification errors of the unknown data).
  • TrainingAlgorithm – training algorithm:
    Levenberg–Marquardt algorithm (LMA or just LM), also known as the Damped least-squares (DLS) method, is used to solve non-linear least squares problems.
    L-BFGS is an optimization algorithm in the family of quasi-Newton methods that approximates the Broyden–Fletcher–Goldfarb–Shanno algorithm (BFGS) using a limited amount of computer memory. It is a popular algorithm for parameter estimation in machine learning.
  • NumberOfRestarts – max. number of restarts to find a good optimum. Try to reduce it if learning takes too long.

Cluster Trading Setup

  • Classifier – method used to classify the cluster number in backtesting and live trading:
    Euclidean Distanceauthor’s method that uses the shortest distance to the centroids calculated by the Pythagorean formula. Fast but less accurate method, no NN is used. This method is very useful with small datasets where NN cannot achieve high accuracy.

    Neural Network – train NN to classify the cluster number and save results to the Config file (existing NNs will be overwritten!). This may take a long time (hours or even days, it depends on the settings, MT5 works much faster).
    Saved Neural Network uses NN saved in the Config file. Fast if NN is saved, if not – the EA will train NN and save results to the Config file.
  • MeanInsteadOfValue – metric number to replace its values with the mean (mean is ‘zero’ after normalization). It helps to find out if a profitable cluster uses the metric.
  • ClusterNumberForOptToBuy(Sell) – parameters to find stable and profitable clusters.
  • ClusterNumber(s)ToBuy(Sell) – cluster numbers to trade, separated by a comma.

Order setting

  • UserComment – user comment used to label orders opened by the EA.
  • MagicNumber – a unique basic identifier of EA’s orders. This number should be less than 99999.
  • Graphics – this option allows you to enable/disable graphic objects of the EA on a chart.