Skip to content
All library documents

Building a Mamdani Fuzzy RSI Trading System

Article MQL5 articles

Summary

The article explains how fuzzy logic can soften rigid trading rules by assigning indicator values degrees of membership in linguistic groups such as buy, neutral, and sell. It contrasts this approach with crisp logic and sketches the stages of fuzzy inference, including defining inputs and outputs, setting membership functions and writing a rule base. Mamdani inference is selected, with three RSI indicators at different periods as inputs and one output representing a trading decision.

A prototype first uses exact RSI thresholds to combine the three signals, then the fuzzy version is proposed as a more flexible alternative. The article reports that the crisp system neither earned nor lost on average over an eight-month EURUSD test, and argues it would require extensive manual rule combinations to improve. It does not provide comparative performance evidence for the fuzzy system in the supplied text. Membership functions, rule choices and optimization remain design decisions, and the example is presented as a starting point rather than proof of profitability.

Key ideas

  • Fuzzy logic represents indicator readings with degrees of membership in overlapping linguistic groups.
  • The example uses three RSI periods as inputs and a single fuzzy output for buy, neutral, or sell decisions.
  • Mamdani inference is chosen, with the user defining the system structure and rules while the library performs inference steps.
  • The crisp threshold prototype showed flat average performance during the stated EURUSD test period.
  • Membership functions and rule bases can be optimized, but the article does not report results validating the fuzzy model.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.