Forex fuzzy in logic trading systems

Forex fuzzy in logic trading systems

By: Cossack007 Date: 11.06.2017

When you build a trading system one of the most common challenges you encounter is the definition of entry and exit conditions. For most systems, this condition is given by the breakout of some threshold value which has to be defined through an optimization procedure using hindsight could be long term optimization or validated optimization using WFA. Today I am going to discuss the implementation of fuzzy logic in trading systems using an approach that avoids lot size granularity problems, opening up the way to another trading mechanism for algorithmic strategies.

Let us suppose you have a trading system that trades based on an oscillator, this oscillator gives signals from 0 to and your system enters short trades whenever the oscillator crosses the 20 line and long trades whenever the system crosses the 80 line note that I am using these values as examples, they could be any values. The first consequence of this is that if we reach a level of Does this sound right? The problem with binary trading decisions is that there is always a logical problem because in trading there is no dramatic change from black to white when you go from Why is a trade at 80 valid while a trade at The reason why we choose the 80 is generally because — in historical tests — the 80 gives a better result than the However — even if you included 79 — the problem would still continue as why would a 79 be different from a The problem is that there is a clear-cut boundary between what can be traded and what cannot be traded, a boundary that has no clear base in reality.

From a natural perspective, the decision to take a trade is very clear at some point and more difficult to make at another but there is no clear boundary where these conditions take place.

Picture the same system used in a discretionary way by a regular trader. If the trader sees a However at a value of 60 the trader will not risk entering a trade because the picture is very different in this case. How can we reflect doubt and gradients in the trading of strategies? For example a system may trade a risk of 0.

What's new?

However the problem here is that playing with the lot size introduces problems dealing with granularity that can greatly complicate the management of trading positions, especially when the amount of capital is limited. As in most management cases, the granularity problem was the biggest obstacle to its successful implementation. My next idea has been to implement fuzzy logic in a way that preserves the amount of capital risked per trade — no playing with the lot size — but instead we introduce a random component around the trading decision element.

As in the case of a discretionary trader, we create doubt regarding technical scenarios that are below the threshold boundary while we reinforce scenarios that are at or above our desired level. For example if the threshold is 80 we will give this value a score of 1 and scores will decay exponentially as they move away from this threshold. If the value of the oscillator is However, if the oscillator is 70 the probability will be quite low because the value is already far away from Nonetheless, the probability to trade will still be existent, although tremendously low.

I would also like to point out that the above element of randomness is nothing to be afraid of. This introduces an element of realism into the system because it acknowledges the gradient in technical clarity between a clear boundary and a value which is close but not exactly above it.

This implementation of fuzzy logic allows you to trade without any binary choices. It can be implemented inside breakout strategies, price action based systems, cross overs, etc. Any trading system that currently makes its decisions based on some binary outcomes either its black or white can be modified to use this fuzzy logic approach. Currently I am testing this in a few Asirikuy strategies and will come back with my findings in a future post. I hope you enjoyed this article! My belief is that Fuzzy logic or neural networks are nothing more than algorithms looking a the same thing from different angles, they are just other formulations of a problem which might be appropriate but do not have to necessarily.

Thank you for your comment: In other words, how much does being in the border-line between a clear case and a grey one can affect your outcomes. However I agree with you in that the problem is always the same one, there are just many mathematical tools to tackle it.

In this case I suggest fuzzy logic as an additional aid, rather than a way to solve the problem. Thanks again for posting: Thanks, this is a great idea and I will surely try to implement this to my current strategies.

My professor always says: In general I believe the best approach would be to select a decay such that probabilities are close to zero when they should obviously be zero and then make sure they are one when they should.

In the above example I would make the exponential fall below 0.

The WEKA data mining software

Thanks again for posting! In many of your posts you refer to the necessity of thorough backtest and walkforward analysis of the developed strategy.

forex fuzzy in logic trading systems

Any of these tests would produce different outcomes as a result of the random factor. Surely the effect of the randomness would even out mathematically when the sample size reaches infinity, but even with 10 years of backtest data this would not be accomplished? What are your thoughts on this? The extent to which your system is affected by a random component that affects border-line trades gives you an idea about how much broker dependency you might experience.

Since the probability to trade is always 1 above the trading threshold, a large effect of the random component hints to a possible weakness of the system. Ideally one could take the worst-case scenario achieved from several tests and use this as the projected statistical scenario, however I am currently just researching this so I do not have a very good idea of how to apply it yet.

Fuzzy logic to create manual trading strategies - MQL4 Articles

Thanks a lot for commenting: Mail will not be published required. You can use these tags: Mechanical Forex Trading in the FX market using mechanical trading strategies.

Home About Me Atinalla FE OpenKantu System Generator. Using Fuzzy Logic Without Lot Size Granularity Problems October 23rd, 6 Comments. Posted in Articles Tags: Does the data you use matter? Looking into some assumptions made by WFA.

Understanding Lot Size Granularity: October 23, at 6: October 25, at Leave a Reply Click here to cancel reply. Asirikuy Asirikuy Investment Project Asirikuy Strategy Tester AST backtesting BATS brokers CFDs cloud mining crossword puzzles Currency Trader Magazine F4 framework fxtradermagazine grid trading homework corner indicator series Kantu machine learning martingale Metatrader metatrader 5 money management neural networks ODROID-XU4 openKantu pkantu portfolios portfolio trading programming psychology pyfolio python qqpat quantopian R RTFF scalping Seasonality social trading strategy design strategy evaluation system system development trading psychology trading strategies tutorial umaki Using R VPS walk forward analysis Watukushay WRP contributions.

Rating 4,6 stars - 917 reviews
inserted by FC2 system