New Forex Stuff Indicators with optimal filtering of noise in the foreign exchange market.

Aleksey_Ivanov

Private, 1st Class
Messages
91
Indicators with optimal filtering of noise in the foreign exchange market.


Most of the indicators currently used by traders in the Forex market were created for another market - the stock market and for another time when there were sufficiently monotonous trends and quotes were not as volatile as they are now when there are no trends (as stable trends of unidirectional price movement). Moreover, the random noise of the foreign exchange market is now so great that (due to the summation of many random walks) they can even give rise to illusions of trends that will be determined by classical indicators that then give false signals. Therefore, almost the entire existing arsenal of indicators is not very suitable for trading on the Forex market and does not reflect key aspects of the state of this market.

The author has developed the number of new algorithms F ({Pi}) for recognizing and filtering random noise of market quotes and based on these algorithms he wrote indicators that, after optimizing them for the corresponding market, they allow you to enter it (the market) most profitably and close it in time open positions. Both the delay time T ({Pi}) of the filters constructed on their basis and the reliability R ({Pi}) of the signal generated by them depend on the parameters {Pi} of these algorithms. Both of these (T and R) factors influence the average profit B ({Pi}), which, therefore, depends on the {Pi} parameters. Therefore, such parameters {Pi0} filters are selected to the history of quotes of currency pairs that maximize the average statistical profit max (B) = B ({Pi0}), which is the essence of optimal filtering of market noise.

In addition, the author developed indicators that reveal the microstructure of the process of price changes and establish the true statistical characteristics of its regular and random components, which allowed us to develop effective algorithms for filtering market noise.


You can buy or download free indicators with optimal noise filtering on the MQL5 website at the link.
 
Cunning crocodile
C_C_EURUSDH4.png


Cunning crocodile

Structure of the indicator.


The Cunning crocodile indicator consists of three moving averages (applied to the price Median price = (high + low)/2): 1) the usual SMA or the mean <X> of the process X and her two generalizations 2) <XF> = <X / <X >> * <X> and 3)< XS> = <X * <X >> / <X> with the same averaging period. All three curves intersect at common points that (such an intersection in which the cunning crocodile, unlike the usual one, "never bites his tongue") indicates a change in the trend in the price movement. Formulas for these generalized averages, one of which <XF> is faster, and the other <XS> is slower than the usual SMA, are presented in the last screenshot.



Using the Cunning crocodile indicator and its advantages.

The trade of the Cunning crocodile indicator is similar to that of the trade of the usual Alligator indicator, but it has the following advantages. First, averaging over the algorithm< XF> is less delay than behind the fast SMMA used in the classical Alligator. Secondly, the small slope of the slow <XS> is also faster achieved than the small slope of the slow SMMA of the normal Alligator. Therefore, the indicator Cunning crocodile more quickly indicates the transition to both trend and flat market conditions than the classic Alligator.


Trade with the Cunning crocodile indicator.

If after reaching a single point of intersection of all three curves "the mouth of the crocodile" is widely opened and the slow average <XS> acquires a significant slope, then there is a trend. In this case, the position on Buy (Sell) opens when the price is higher (lower) than the fast average <XF> and closes when it is below (above) <XF> (those. in the "mouth" Cunning crocodile).

If the slow mean <XS> is practically horizontal and (that occupies a significant section of the history) all three lines intersect repeatedly (3 to 6 times) at single points, then the price consolidation takes place. At the same time, the length of the subsequent trend is usually proportional to the length of the previous consolidation area, in which the market spends most of the time (70% -80%), which provides additional information for assessing the state of the market, i.e. it allows to judge whether the trend reversal starts or the trend ends. A rough estimate is as follows: if the trend lasted for 25% -40% of the time of the previous consolidation, then, most likely, there will be a trend end; if the trend lasted less than 20% of the time of the previous consolidation, then a rollback.



Indicator parameters.

  • Price type - Values: Close price, Open price, High price, Low price, Median price ((high + low)/2 – default), Typical price ((high + low + close)/3), Weighted price ((high + low + 2*close)/4).
  • The averaging period - Values: Integer. Default is 5.
  • The Signal method - Type of trading signal alert. Values: No, Send alert, Print (in expert), Comment (in chart), Sound + Print, Sound + Comment, Sound, Push + Comment, Push, Mail + Comment, Mail.
 
StatPredict
1_4_GBPUSDH4.gif


StatPredict

Introduction.
The indicator predicts the price in accordance with the prevailing trend and its own small statistical price fluctuations around this trend. At the same time, in StatPredict, you need to set the time horizon of the forecasted events, which is set by the parameter settings of the “Length of forecast in bars” indicator and determined by the characteristic time scale of the current trend, which is best measured by the ProfitMACD indicator or by the previous price consolidation period, from which as a forecast horizon, you can take one-fourth.

The final calculation of the indicator readings after installing it on the chart occurs when a new tick arrives.

Information about the operation mode of the indicator is printed when it is installed on a chart in the “expert” tab.



1. Purpose of the indicator.
Using mathematical methods for predicting random processes, StatPredict indicator predicts the most probable values of the future price and calculates the confidence interval for them.

The StatPredict indicator works on all time scales and is suitable for both long-term play and scalpers.

In addition to the position of the most likely forecast points (indicated by arrows oriented by the calculated price movement at the corresponding future bar), considered for the median price (high + low) / 2, StatPredict calculates the limits of the confidence interval for the predictions that are indicated by triangles and are considered at the top of the confidence channel for maximum price, and at the bottom of the channel for the minimum price. The value of the confidence probability used in the algorithm is specified in the indicator settings.

Additionally, the indicator also draws an unbiased average curve, which allows for a better determination of the scale of trend movements.



2. The use of the indicator in the trade.

The StatPredict indicator predicts the future emerging from the already established trend trends and steady own “statistical fluctuations” of prices. The prediction algorithm cannot deliberately take into account the strong effects on the price caused by large events that have not yet occurred, such as important news, etc. Therefore, it is incorrect to use StatPredict for the forecast before the release of important news and immediately after their release (it is advisable to wait for the volatility to decrease). It is also incorrect, using the indicator on small timeframes, to capture with its horizon of forecasting the future moments of the release of important news.

The use of the indicator is very simple. The indicator with arrows draws the trajectory of the future price movement, on which TakeProfit of the opened positions are placed, and StopLoss are placed on the boundaries of the confidence level channel. With an increase in the forecast price, positions are opened on Buy, and when they fall on Sell.

StatPredict also provides the option to calculate the lot, based on the positions of the last points of the calculated channel of confidence probability, as well as the size of the deposit and the allowable risk, which are specified in the indicator settings. Lot sizes are printed in the comments (on the MT screen) along with the positions of the corresponding StopLoss.



3. Indicator settings.

  • Length of forecast in bars - The number of bars that are forecasted. Values: any positive integer (7 default).
  • Confidence probability - Values: any real number from 0 to 0.999 (0.67 default).
  • Global indicator shift (to estimate the forecast) - Shift indicator to adjust its operation. Values: any positive integer (0 default).
  • Dimensions of markers - Marker sizes to display forecast points. Values: any positive integer from 0 to 5 (3 default).
  • Calculate the lot size from the risk, deposit and CP*? – Calculate the size of the lot, based on the risk, the size of deposit and channel size of confidence probability level? Values: true, false (default).
  • Deposit in $ - Deposit amount in dollars (5000 $ default).
  • Allowable losses in % - Permissible loss as the percentage of the deposit (2% default).

StatPredict
 
Asummetry
1_EURUSDH4.png


Asummetry

The principle of the indicator.


The Asummetryindicator allows you to predict the beginning of a change in the direction of trends, long before their visual appearance on the price chart.



The author statistically revealed that before changing the direction of the trend, the probability distribution function of the price is made as asymmetric as possible. More precisely, the price movement in any direction always pulls sideways the function of its distribution, but when the third-degree root of asymmetry divided by the standard deviation exceeds the unit in absolute value, the price will change its direction. The indicator operation is based on this regularity. The indicator calculates the value of the third degree root asymmetry normalized to the standard deviation, i.e. magnitude

ASUMM= (< (x - <x>)^3 >)^(1/3)/ (< (x - <x>)^2 >)^(1/2),


where <...> is the averaging sign, which, when it is module exceeded the unit , serves as a powerful signal to change the direction of a previously established trend.

It has also been established that the asymmetry plot changes sign when the price probability density function makes a sharp jump, which is characteristic of price dynamics.

The sliding asymmetry counted in a particular window, as well as the variance and the moving average, lags behind by about the floor of the averaging period used. Therefore: (1) For past price values, the asymmetry plot shifts back through history by the amount of delay; (2) To receive a signal in a timely manner, a special compression algorithm for the asymmetry calculation period is applied when approaching the beginning of the current history. At the same time, to ensure the possibility of calculating such asymmetry (creating a sufficient array of calculated points) on the M5-H4 time frames, be used the data of the minute chart is M1, the daily time frame is - M5, the weekly - M30, and the monthly - H1. On M1, this indicator, respectively, is not used.


Using the Asummetry indicator in trading.

The indicator is very sensitive to the current state of the market and, therefore, is dynamic for current values, which is not its disadvantage. The interval of the indicator readings, that important for the trader (for the current history), where the averaging period compression algorithm is used, is colored in other colors than the rest of the indicator readings, and all points of this interval serve to assess the current market situation.

If the position according to the trend is already open, then even a one-time exceeding by the module of ASUMM by one serves as the signal to close the position, since after that, a trend change is likely to follow.

If the position is not open yet, then | ASUMM |> 1 gives the trader a sign that a new trend will begin soon and the trader should then be in a state of readiness to open a position. But the direction of the trend and the moment of entry into the position need to be determined by another indicator, for example, Identify_Trend or Sensitive Signal or some other sensitive trend indicator.




Indicator settings.

  • Price type - applied price. Values: Close price (default)), Open price, High price, Low price, Median price ((high + low)/2), Typical price ((high + low + close)/3), Weighted price ((high + low + 2*close)/4).
  • The averaging period - averaging period. Values: any integer (15 default).
  • Number of countable bars of the current chart. - Number of calculated indicator graph bars . Values: any positive integer (1000 default).
  • Global shift - Global shift of the beginning of the indicator readings in bars. Values: any positive integer (0 default).
  • The non-lagging asymmetry is calculated? - Values: true(default), false.
 
Signal Bands
EURUSDH1.png


Signal Bands

Signal Bands is a sensitive and convenient indicator, which performs deep statistical processing of information. It allows to see on one chart (1) the price trend, (2) the clear price channel and (3) latent signs of trend change. The indicator can be used on charts of any periods, but it is especially useful for scalping due to its high sensitivity to the current market state.



The functions of the indicator:

  • First, the Signal Bands indicator draws channels into which all price fluctuations exactly fit, so with default parameters, the price will never exceed the limits of this channel (except for the occurrence of very high peaks of signal information).
  • Sharp movements on channel lines (sharp peaks) indicate a change in price direction. Signals provided by such sharp peaks are often leading, i.e. they occur about 1-2 bars before the beginning of price reversal. A sharp downward peak at the bottom line of the channel down is the criterion for the reversal of the price upwards. Conversely, the sharp upward peak of the upper channel line precedes the downward price reversal.
The signals of the Signal Bands indicator are algorithmically formed based on the analysis of the current density of the price probability, which is subject to a strong asymmetry before the very moment of price direction change due to short-term price surges (which might be aiming at hitting the StopLoss of most traders) in the direction opposite to its new movement.



Indicator Settings

  • Price type. Values: Close price (default), Open price, High price, Low price, Median price ((high + low)/2), Typical price ((high + low + close)/3), Weighted price ((high + low + 2*close)/4).
  • The averaging method. Values: Simple (default), Exponential, Smoothed, Linear weighted.
  • The averaging period - averaging period. Integer. Default is 20.
  • Channel width factor - channel width factor. The real number Default is 1.0.
  • The factor of sensibility. - Coefficient of sensitivity to price surges. The real number. Values from 2.0 to 6.0. Default is 4.0.
  • Show one branch? - Show one branch? Values: true - one branch, false - two branches.
Signal Bands
 
Probability distribution PRO
Probabilities distribution of price
Probability distribution FREE
GBPUSDM15.png


Probability distribution PRO
Indicator is used for:

  1. defining price probability distributions. This allows for a detailed representation of the channel and its borders and forecast the probability of a price appearing at each segment of its fluctuations;
  2. defining the channel change moment.

Operation principles and features

Indicator analyzes a quote history on lower timeframes and calculates a price probability distribution on higher ones. Forecast algorithms allow the indicator to calculate probability distributions and moving averages without delays that usually accompany conventional moving averages.

The indicator operation is based on processing a deep and detailed quote history. Therefore, before launching indicator on a symbol chart, make sure to download the quote history ( Tools/History Center) of the symbol and increase "Max bars in history" and "Max bars in chart" to the maximum possible value ( Tools/Options/Charts). Indicator produces a large amount of calculations and therefore is resource-intensive. It requires at least a 4-core 2.8 GHz CPU and 4.00 GB of RAM. If the indicator causes much load on MetaTrader 4, decrease the "Number of countable bars of the current chart" parameter in the indicator settings having the default value of 200.

The program splits the total price fluctuation for a given averaging period by seven equal intervals and calculates the frequency of price hits at these intervals. Based on these calculations, the indicator builds the probability columns, which can be displayed in the main terminal window in two ways:

  1. as a color code, by the type of the visible light spectrum when the most probable values are closer to the violet area, while the least probable values are close to the red one. The intervals are colored accordingly (the order of coding of the decreasing probability by means of the color scale is specified in the settings and can be changed by users);
  2. as values specifying the probability of hitting the given intervals with the corresponding color.
The indicator also calculates non-lagging normalized asymmetry

ASUMM= (< (x - <x>)^3 >)^(1/3)/ (< (x - <x>)^2 >)^(1/2) ,

where <...> is the averaging sign, which, when it is module exceeded the unit, serves as a powerful signal to change the direction of a previously established trend.


Operation modes and settings

Algorithm settings:

  • The averaging period in the bars of the current graph (2n+1) - averaging period (1-99).
  • Number of countable bars of the current chart (<=200) - number of calculated indicator graph bars (1-200).
  • Shifting the calculation area of the indicator - global indicator shift (0-100).
  • The non-lagging distribution is calculated - calculate a non-lagging distribution.
  • The non-late channel is calculated - calculate the current non-lagging channel.
  • Show the values of the probabilities of zones - display area probability values.
Color and display settings:

Colors in probability density descending order.

  • Color of the maximum probability zone (0);
  • Color of zone (1);
  • Color of zone (2);
  • Color of the zone of average probability (3);
  • Color of zone (4);
  • Color of zone (5);
  • Color of the minimum probability zone (6);
Parameters of non-lagging moving average.

  • Moving average price type.
  • The averaging method.
  • Confidence probability - Values: from 0 to 0.999 (0.5 by default).
  • Color of the moving average line=clrDarkOliveGreen; - The color of the indicator line and its figure sector.
  • Paint over the confidence interval? Values: true, false(by default).


Trading mode settings:

  • Calculate the lot size from the risk, deposit and channel
  • Deposit in $
  • Allowable losses in %
  • The channel strategy is used - true - intra-channel strategy (false - channel breakthrough strategy)
  • Color of message about the size of the lot
  • Information about the lot at the bottom of the channel (false - information at the top of the channel)

Using in trading


Intra-channel strategy. The strategy is used in case of a formed white line - area of maximum probability. Open order when the price deviates into the yellow or orange areas. Close when the price returns to the white area.

Trend-following strategy. An order is opened when a change of band is identified (the middle falls into the red or yellow sector).

StopLoss is placed slightly further than the channel borders.

Probability distribution PRO
Probabilities distribution of price
Probability distribution FREE
 
Iterative Moving Average
GBPUSDH4.png


Iterative Moving Average


Iterative Moving Average – IMA. IMA is obtained by correcting the usual MA. The correction consists in addition to MA averaged difference between the time series (X) and its MA, i.e. IMA(X)=MA(X) + MA (Х-MA(X)). Correction is done in several iterations (and, exactly, 2 iterations in this indicator) and with a change in the averaging period.

As a result, the time-series points begin to cluster around (on all sides) of the getting IMA and with a smaller delay than around the usual MA. Therefore, IMA is a more effective tool for manual and automatic trading than all types of conventional MA (SMA, EMA, SSMA, LMA). Formulas for IMA are given in the last screenshot.


Indicator Settings.
  • Price type. Values: Close price, Open price, High price, Low price, Median price ((high + low)/2 - default), Typical price ((high + low + close)/3), Weighted price ((high + low + 2*close)/4).
  • The averaging method. Values: Simple, Exponential (default), Smoothed, Linear weighted.
  • The main averaging period. Integer. Default is 14.
  • Coefficient of division of the averaging period. - The coefficient determines the period of the next iteration. Values: any positive real number, which is not zero. Default is 1.62 (Golden Ratio).
 
Absolute Bands FREE
GBPUSDDaily.png


Absolute Bands

Principles of construction of the indicator.

The Absolute Bands (AB) indicator is reminiscent of the Bollinger Bands indicator with its appearance and functions, but only more effective for trading due to the significantly smaller number of false signals issued to them. This effectiveness of the Absolute Bands indicator is due to its robust nature.

In the Bollinger Bands indicator, on both sides of the moving average - Ma, there are lines spaced from Ma by the standard deviations Std=Sqrt(<(X- Ma)^2>) (where X is the price history, <...> is the averaging procedure for a given number of bars) multiplied by the number (2.0 by default). In mathematics, it is proved that an estimate that provides a minimum of the standard deviation is a mathematical expectation, i.e. the moving average on which the Bollinger Bands indicator is based. Therefore, the Bollinger Bands contain all points of the price history in a concentrated manner.

The Absolute Bands indicator is based on the Median = (Max + Min) / 2 moving median line. On both sides of the Median, there are lines spaced from it by moving averages absolute deviations <| X- Median |> multiplied by a number (1.5 by default). At the same time, it is the median that minimizes mean absolute deviations, which is used by the Absolute Bands indicator. Mean absolute deviations are less sensitive to the often purely random price spikes that occur on the market, which makes the Absolute Bands indicator more robust or less responsive to such emissions. While random price surges lead to the classic Bollinger Bands indicator giving false signals.



Absolute Bands indicator readings and trading with it.

  1. A trend occurs after a period of price consolidation, which is expressed by the Absolute Bands indicator in horizontal middle line and the convergence of the upper and lower lines. If after the consolidation period (1.1) the upper and lower lines diverged, (1.2) the price rose above the upper line (or dropped below the lower line), and (1.3) the middle line went up (down) sharply, then this indicates the beginning of the trend and you need to open position on Buy (Sell).

  2. If the price moves from the top line down (from the bottom line up), and the middle line is horizontal, this indicates the origin of the channel (the price most likely reaches the opposite border) and you need to open positions on Sell (Buy).

  3. If peaks and valleys outside the boundaries of the Absolute Bands indicator band are followed by peaks and valleys within its band, then a previously established tendency (trend, channel) may end.


Indicator settings.

  • Price type - applied price. Values: Close price, Open price, High price, Low price, Median price ((high + low)/2 - default), Typical price ((high + low + close)/3), Weighted price ((high + low + 2*close)/4).
  • The averaging period - averaging period. Any integer (20 by default).
  • Channelwidthfactor - channel width factor. Values: any real number (1.5 by default).
Absolute Bands
 
Estimation moving average without lag
0.1.USDCADH1.png


Estimation moving average without lag

The principle of the indicator.
A simple moving average (SMA) with an averaging period (2n + 1) of bars is always obtained lagging by n bars. If SMA or other types of moving averages are the basis for making trading decisions, then their strong delay does not allow to open positions in time and close positions, which leads to losses.

The Estimation moving average without lag (EMAWL) indicator calculates the non-lagging moving average, which is calculated at the points (Inf, n + 1) in the usual way, and at the points of the [n, 0] segment, where 0 is the last bar number, is algorithmically and there is a curvilinear sector (cover out the confidence interval) in which the line of the non-lagging moving average fits with the confidence level specified in the indicator settings. It is clear that the more the confidence probability value is taken (which by default is equal to 0.67), the wider the curvilinear sector of the confidence interval is obtained. If we take the confidence probability equal to zero, then the sector of the indicator readings at points [n, 0] will shrink to a curve, which will pass through the most probable values of the non-lagging average. Statistical studies show that the price around the non-remaining average is distributed according to the Laplace law. Knowledge of the distribution law and the algorithm for calculating the most likely non-lagging average on the [n, 0] segment allow us to calculate the confidence interval sector.


Trade using the Estimation moving average without lag indicator.
If the lower border of the figure sector of the EMAWL indicator moves to the up, then there is an uptrend and you need to open positions on Buy. If the upper boundary of the curvilinear sector of the EMAWL indicator is oriented downwards, then there is a downward trend and you need to open positions on Sell. In such cases, you can be sure of the correctness of the established trend direction with the confidence level set in the indicator settings. If the upper limit of the figure sector of the EMAWL indicator moves to the up, and the lower limit moves down, then there is a flat, which serves as a signal for closing trend positions.

Indicator settings.

  • Price type - applied price. Values: Close price, Open price, High price, Low price, Median price ((high + low)/2 - default), Typical price ((high + low + close)/3), Weighted price ((high + low + 2*close)/4).
  • The averaging method - averaging method. Values: Simple (default), Exponential, Smoothed, Linear weighted.
  • The averaging period - averaging period. Any integer (21 by default).
  • Confidenceprobability - Values: from 0 to 0.999 (0.67 by default).
  • Global shift - Global shift to start calculating indicator readings. Values:any integer (0 by default).
  • Paint over the confidence interval? - Values: true (by default), false.
  • Color of the line. – The color of the indicator line and its figure sector.
 
Strong Trend Flat Signal
EURUSDM30.png


Strong Trend Flat Signal

The principle of the indicator.
The Strong Trend Flat Signal (STFS) indicator is the intersection of two, developed by the author, non-lagging moving averages with averaging periods 21 and 63.

A simple moving average (SMA) with an averaging period (2n + 1) of bars is always obtained lagging by n bars. If SMA or other types of moving averages are the basis for making trading decisions, then their strong delay does not allow to open positions in time and close positions, which leads to losses.

Non-lagging moving averages calculated at the points (Inf, n + 1) in the usual way, and at the points of the [n, 0] segment, where 0 is the last bar number, is algorithmically and there is a curvilinear sector (cover out the confidence interval) in which the line of the non-lagging moving average fits with the confidence level specified in the indicator settings. It is clear that the more the confidence probability value is taken (which by default is equal to 0.67), the wider the curvilinear sector of the confidence interval is obtained. If we take the confidence probability equal to zero, then the sector of the indicator readings at points [n, 0] will shrink to a curve, which will pass through the most probable values of the non-lagging average. Statistical studies show that the price around the non-remaining average is distributed according to the Laplace law. Knowledge of the distribution law and the algorithm for calculating the most likely non-lagging average on the [n, 0] segment allow us to calculate the confidence interval sector.


Trade using the Strong Trend Flat Signal indicator.

If the lower border slow component of the figure sector of the STFS indicator moves to the up, then there is an uptrend and you need to open positions on Buy. If the upper boundary of the slow component of the curvilinear sector of the STFS indicator is oriented downwards, then there is a downward trend and you need to open positions on Sell. In such cases, you can be sure of the correctness of the established trend direction with the confidence level set in the indicator settings.

If the upper limit of the slow component of the figure sector of the STFS indicator moves to the up, and the its lower limit moves down, then there is a flat, which serves as a signal for closing trend positions.

If the slow component of the indicator determines the flat or channel, but the sector of the fast component is noticeably beyond the sector of the slow component, then this means the breakdown of the channel and serves as a signal to open the corresponding position.

If the slow component of the indicator determines the trend, but the sector of the fast component noticeably leaves the sector of the slow component from the opposite direction of the trend, this means the end of the trend and serves as the signal to close the corresponding position.


Indicator settings.

  • Price type - applied price. Values: Close price, Open price, High price, Low price, Median price ((high + low)/2 - default), Typical price ((high + low + close)/3), Weighted price ((high + low + 2*close)/4).
  • The averaging method - Values: Simple (default), Exponential, Smoothed, Linear weighted.
  • The first averaging period - Any integer (21 by default).
  • The second averaging period - Any integer (63 by default).
  • Confidence probability - Values: from 0 to 0.999 (0.67 by default).
  • Global shift - Global shift of the beginning of the indicator readings in bars. Values:any positive integer (0 default).
  • Color of the first line. – The color of the indicator first line and its figure sector.
  • Color of the second line. – The color of the indicator second line and its figure sector.
  • Paint over the confidence interval? - Values: true (by default), false.
 
Back
Top