Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Experts

Artificial Intelligence - expert for MetaTrader 5

Views:
15651
Rating:
(34)
Published:
2012.11.30 11:13
Updated:
2016.11.22 07:32
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The Expert Advisor is rewritten from MQL4, the author is Reshetov, link to the source - https://www.mql5.com/ru/code/10289.

How it works

We use the Accelerator Oscillator indicator from where 4 values of bars are taken: Shift, Shift+7, Shift+14, Shift+21. Each of the indicator values is multiplied by its weight calculated using the formula (100-x(n)), where x(n) - is an optimized variable x1, x2, x2, x3. After multiplying values are summarized and exit value of the perceptron is received. If exit value of the perceptron is higher than 0, a buy is opened, if value is lower than 0, a sell position is opened.

Position opens on Stop Loss (Stop Loss required) and without Take Profit. When a position reaches a profit value that exceeds Stop Loss value on the spread amount and if there is an opposite signal, then the position is reversed by opening a position of a larger volume. If opposite signal does not appear, Stop Loss is set on the same level as it had been on the open position (according to calculations a deal is profitable on spread value).

If suddenly is impossible to open a position which is reversed due to close value of Stop Loss, the position will be closed and there will be one more attempt to open position on the next tick.

Stop Loss is required because a position can be closed and its Stop Loss can be moved only if the position is profitable. There has to be a possibility to exit in case the position is unprofitable.

The results of work of the Expert Advisor with the default settings for the last year EURUSD M15 are displayed in the chart.

Parameters

  • Lots - Lot.
  • StopLoss - Stop Loss in points.
  • Shift - Bar on which indicators are checked: 0 - forming bar, 1 - first formed bar.
  • x1, x2, x3, x4 - Perceptron input weights from 0 to 200. It is recommended to use Generic Algorithm for optimization.

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/1104

iBBands_HTF iBBands_HTF

Bollinger Bands drawn using DRAW_SECTION style is a usual mean to draw ZigZag. Time Frame on which it is calculated can be set in input parameters. That is why such an unusual style of drawing is used.

SelfLearningExperts SelfLearningExperts

Selflearning Expert Advisor

iMa_HTF iMa_HTF

Good old Moving Average drawn using DRAW_SECTION style is a usual mean to draw ZigZag. Time Frame on which it is calculated can be set in input parameters. That is why such an unusual style of drawing is used.

e-TurboFx e-TurboFx

The Expert Advisor tries "to catch" rollbacks after a strong movement. Candlestick analyses is used