Watch how to download trading robots for free
Find us on Twitter!
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
Libraries

Free Fuzzy Logic Library functions - library for MetaTrader 5

Views:
5976
Rating:
(37)
Published:
2010.08.02 11:13
Updated:
2016.11.22 07:32
fuzzylogic.zip (170.57 KB)
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The Fuzzy Logic - is a modern science, used in many fields, for example, it has military applications. Now it's available for the traders.

Why Fuzzy Logic? There are some systems, easily can be solved by human, but it's difficult to program these systems. In such cases Fuzzy Logic can help. It's very close to the logic of a human mind.

The archive file contains:

Free Fuzzy Logic Library API

How to use dll

First of all, you need to call the ffll_new_model() functon to create a model, then download the FCL program from a file, using the function ffll_load_fcl_file(int model_idx, string file), and create a child model, using the ffll_new_child(int model_idx) function. Now the model is ready to use.

Now you can specify the input parameters for the model, using the ffll_set_value(int model_idx, int child_idx, int var_idx, double value) function, the index corresponds to the order of the parameter when declared, it starts from the zero. Then you can get the output, using the double ffll_get_output_value(int model_idx, int child_idx) function.

Each model has only one output, but you can use several models for different purposes. Of course, for its effective use you should learn the Fuzzy Logic principles.

At the first stage, the program from site http://www.louderthanabomb.com/ will be useful for you, but it doesn't allow to edit the files.

Using this program you can check the correctness of the FCL program and visualize the necessary functions.

I will be glad to anwer you questions at the reference, in the code.

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

Heiken Ashi On Adaptive Moving Average Heiken Ashi On Adaptive Moving Average

This is the Heiken Ashi indicator, based on the averaged Open, High, Low and Close prices, averaged using the Adaptive Moving Average.

An Expert Advisor - Index Moving Average An Expert Advisor - Index Moving Average

This Expert Advisor uses the Index Moving Average indicator.

spread_on_chart spread_on_chart

The spread_on_chart indicator shows the current values of spread, stop and freeze levels.

MACD - Any higher timeframe MACD - Any higher timeframe

This indicator is based on simple MACD but allows you to choose also timeframe of indicator, different from current. You can choose current timeframe of chart (then indicator shows the same values as common MACD) or any higher timeframe.