Discussion of article "Fuzzy logic to create manual trading strategies"

 

New article Fuzzy logic to create manual trading strategies has been published:

This article suggests the ways of improving manual trading strategy by applying fuzzy set theory. As an example we have provided a step-by-step description of the strategy search and the selection of its parameters, followed by fuzzy logic application to blur overly formal criteria for the market entry. This way, after strategy modification we obtain flexible conditions for opening a position that has a reasonable reaction to a market situation.

<...>

Many modern traders choose to take responsibility for entering and exiting positions, rather than rely on automated systems. They require to develop their own trading strategy that would take into account all possible outcomes of the market behavior. Afterwards, one would have to follow it strictly and resist any impulses that could be provoked by fear and greed.

Therefore, first we need to come up with a trading strategy. Let me describe you three stages of how we are going to build it.

  • Stage No1. Finding and identifying instruments that will be used for our strategy.
  • Stage No2. Setting specific conditions used by a trader to open a position on the market.
  • Stage No3. Setting specific conditions when a position will have to be closed with either positive or negative result.

Stage No1.

At the first stage I have selected three indicators for building a trading strategy as an example:

  1. Average Directional Movement Index, ADX. This is a trending indicator that determines the strength of the current trend.
  2. Relative Vigor Index, RVI oscillator.
  3. Accelerator Oscillator(AC) indicator by Bill Williams.

Selected general view and settings of the MQL4 trading terminal:

Fig. 1. General view of strategy settings

Author: Alexander Fedosov

Average Directional Movement Index - Trends Indicators - Technical Indicators - Technical Analysis
Average Directional Movement Index - Trends Indicators - Technical Indicators - Technical Analysis
  • www.metatrader5.com
Average Directional Movement Index - Trends Indicators - Technical Indicators - Technical Analysis
 

Thanks for the amazing article, I need a time to understand everything, but I like to say the code is broken because we don't have the "#include <Math\FuzzyNet\MamdaniFuzzySystem.mqh>".

 
Rodrigo Lopes Paitach:

Thanks for the amazing article, I need a time to understand everything, but I like to say the code is broken because we don't have the "#include <Math\FuzzyNet\MamdaniFuzzySystem.mqh>".

You need to download FuzzyLogic Lib for MQL4 from CodeBase and install it on your platform.
 
Rasoul Mojtahedzadeh:
You need to download FuzzyLogic Lib for MQL4 from CodeBase and install it on your platform.
that's right!
 
Thanks for the nice article. i will try the strategy...
 
Rodrigo Lopes Paitach:

Thanks for the amazing article, I need a time to understand everything, but I like to say the code is broken because we don't have the "#include <Math\FuzzyNet\MamdaniFuzzySystem.mqh>".

Do you have one for mql5. I'ma newbie here. Can you suggest?
 
Rasoul Mojtahedzadeh:
You need to download FuzzyLogic Lib for MQL4 from CodeBase and install it on your platform.
I love tour article o much. Do you have it in mql5  code. Thank you 
 

Hi,

when I try to compile fuzzy_panel.mq4 i get some errors

can anyone halp me with that? I can't compile FuzzyRule.mqh either. It complains about "Var" and "Term" variebles.

I attached screen with error log. Click " Go to discussion" to see the file.

Discussion of article "Fuzzy logic to create manual trading strategies"
Discussion of article "Fuzzy logic to create manual trading strategies"
  • 2016.03.07
  • www.mql5.com
Accelerator Oscillator(AC) indicator by Bill Williams.
Files:
errors.PNG  65 kb
 

Hi Tomasz,


I got same error message. Don't know how to fix.

 
Rasoul Mojtahedzadeh:
You need to download FuzzyLogic Lib for MQL4 from CodeBase and install it on your platform.
Still broken.
 
Thanks for the great article and Fuzzy Logic software.  I tried to use different weighting for the rules by adding the statement " rule1.Weight(rule1Wt); "  after the "  .. .Add(rule1) "  statement.   Printing  "rule1.Weight()" returns the correct weight value, but the weight is clearly not being used as the results are unaffected by changing the weights of the rules (including using weight = 0.).  Is this an error in the library or am I missing something?
Reason: