Discussion of article "An Introduction to Fuzzy Logic"

 

New article An Introduction to Fuzzy Logic has been published:

Fuzzy logic expands our boundaries of mathematical logic and set theory. This article reveals the basic principles of fuzzy logic as well as describes two fuzzy inference systems using Mamdani-type and Sugeno-type models. The examples provided will describe implementation of fuzzy models based on these two systems using the FuzzyNet library for MQL5.

The mathematical theory of fuzzy sets and fuzzy logic itself originated back in 1965. Its founding father was a Professor Lotfi Zadeh from the University of Berkeley, who first introduced both concepts in his article "Fuzzy Sets" in the Information and Control journal. This mathematical instrument allowed to introduce fuzzy concepts, that anyone could use, to exact science like mathematics, and laid the foundation for fundamentally new methods of problem solving on the basis of soft computing. All these innovations, when utilized properly, can greatly facilitate the process of solving classification problems, creating expert systems as well as building neural networks.

However, the practical application of fuzzy logic did not just stop there, in fact, this mathematical instrument has become predominantly used in automatic control theory. This can be further linked to the emergence of another new concept — fuzzy model, which is a particular case of a mathematical model.

Example:

Let's define a linguistic variable called "Age". By definition, "Age" is a period, a step towards development and growth of a human, animal, plant. The minimum value of this variable is 0, which means that a man is not even a year old. As a maximum value 80 is set up. Depending on the person's age we can give him the following assessment: "newborn", "young", "middle-aged", "old", "senior" etc. This list can accommodate a fairly large number of items. It will be a term set for our linguistic variable and its elements will be terms.

The figure below shows an example of the fuzzy variable "Age", which has only three terms set up: "Young," "Middle-aged,","Old." Each of these terms has its own membership function.

Fuzzy set "Age"

Author: MetaQuotes Software Corp.

 

As clearly stated in the title, this is an introduction to fuzzy logic, but that's very rough introduction, don't expect to fully understand it if you don't already know what is fuzzy logic.

The second part is commented code, with as usual examples not related at all to trading.

 

Hello, I dropt script on chart, and give me this error:


 
Milad Nadi:

Hi

when i updated metatrader to build 2342

all of samples with fuzzy logic library 

return error "incorrect casting of pointers" on MQL5\Include\Math\Fuzzy\RuleParser.mqh Line 712  

please help to fix bug 

many thanks

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 Platform Build 2340: Managing account settings in the Tester and expanded integration with Python

Sergey Golubev, 2020.03.02 12:00

Hi @Milad Nadi:

If it is related to those codes (Fuzzy - library for developing fuzzy models) so you shoulkd ask the author/coder to update this library (MetaQuotes has nothing to do with it sorry. The website of the author/coder are published in the beginning of this discription: Fuzzy - library for developing fuzzy models

 
Milad Nadi:

hi

when i updated metatrader to build 2342

all of samples with fuzzy logic library 

return error "incorrect casting of pointers" on MQL5\Include\Math\Fuzzy\RuleParser.mqh Line 712  

please help to fix bug 

many thanks

read my previous post.
 
Sergey Golubev:
read my previous post.

hi 

thanks for your replay

real author is Dmitry Kalyuzhny. but his coded this library in .Net

But maybe someone else changed the code to mql

i see the author of this article is Дмитрий Калюжный

but I could not find Дмитрий Калюжный profile on mql5

Would you please help me to contact or fix this bug 

many thanks

 
MetaQuotes:

New article An Introduction to Fuzzy Logic has been published:

Author: MetaQuotes Software Corp.

Hi

when i updated metatrader to build 2342

all of samples with fuzzy logic library 

return error "incorrect casting of pointers" on MQL5\Include\Math\Fuzzy\RuleParser.mqh Line 712  

please help to fix bug 

many thanks

 
Milad Nadi:

hi 

thanks for your replay

real author is Dmitry Kalyuzhny. but his coded this library in .Net

But maybe someone else changed the code to mql

i see the author of this article is Дмитрий Калюжный

but I could not find Дмитрий Калюжный profile on mql5

Would you please help me to contact or fix this bug 

many thanks

I am not a coder (I can not help sorry).
If no one helps on this thread so you can use Freelance for example.
Trading applications for MetaTrader 5 to order
Trading applications for MetaTrader 5 to order
  • www.mql5.com
I am looking for an experienced developer who can look at my profitable strategy and reduce the risk profile by provided recommendations and then implementing the proposed solution. Please ping me and will provide more details. Thanks I need an expert advisor based on some indicator like HEikin AShi, super trend, Parabolic SAR,rsi and...
 

Hi guys,


I have a question regarding the 'linguistic Quantifiers':   "slightly", "somewhat", "very", "extremely "...

What is the correct use of them in the ParseRule-function?

If I try something like this: 

MamdaniFuzzyRule *rule1 = fsTips.ParseRule("if (service is poor) or (food is rancid) then (tips is very cheap)");

...I get this error: "Conclusion part of the rule should be in form: 'variable is term'"

Where would I have to place the 'very' in the string above?


Help would be much apreciated!


Thanks!

Reason: