Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2008.07.30 07:53

Fuzzy logic - expert for MetaTrader 4

| English Русский 中文 Español Deutsch 日本語 Português

votes: 2
Fuzzy_logic.mq4 (15.58 KB)view


There are lots of materials about the indistinct systems, so specifically about the EA:

1) The estimation is performed on the basis of values of five indicators (Gator, WPR, AC, DeMarker and RSI). The estimation is performed on the basis of trapezoidal membership functions.

2) You can modify the ranking and the weight of the properties directly in the code.

3) You can use not only the indicators specified above, but many other stuff (i.e. ones that you prefer to use), as the basis for the indistinct estimation (buy, sell, do nothing).

On the whole, the EA code is intended for practical acquaintance with the techonlogy of indistinct estimation of the current situation on the market. So I recommend to use, and also modify, it, after theory studying. A. Nedosekin's material Osnovy teoryi nechetnoy ocenky (The basics of indistinct estimation theory) should be enough for the primary introduction (the technology is a bit different there, but the theory itself is decribed fully well).


  • If you are going to implement your own criterions of estimation instead of five embedded indicators, I recommend to divide these criterions into the borders of indistinct estimations (array arGator[7] in the code, etc.).
  • Do not try to overoptimize the parameters of memebership function (they are not taken out to the external varibles in the code), because it won't bring any significant effect, believe me, it's verified.
  • Experiment - I think that the indistinct logic as a technology of decision making is without a rival. May be it will help somebody to win the championship.

Translated from Russian by MetaQuotes Software Corp.
Original code:

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

TP-SL_Removing TP-SL_Removing

Immediately deletes the SL/TP of all positions.

Closed_TOTAL Closed_TOTAL

Total closure of all positions (winners/losers). You can also select which are of a single instrument.