FX-Trader Magazine Article: Function based trailing stop mechanisms

Today I have the pleasure to announce my first publication on FX-trader magazine. Following the closure of Currency trader magazine – for which I was a consistent contributor from 2009 to 2014 – I have decided to start contributing to other Forex publications to share a part of my research and opinions with the general trading community. For the January-March edition of the magazine I have written an article about function based trailing stop mechanisms which I hope you will enjoy. On today’s post I will be making some additional comments on this article so that readers interested on the topic can get a little bit of additional insight into why I decided to create these mechanisms, why they are so important and how they can be used for system creation, particularly in the world of data-mining which is not mentioned within the article.


The idea of function based trailing stops came because of the very poor performance of traditional trailing stop mechanisms used in trading. The traditional trailing stop – where you have a position that moves X pips in your favor and you then keep your stop always Y pips behind the most favorable price achieved – has a dismal effect on most if not all of the trading systems that I tried it on. The reasons are two fold. First, you need to wait till the stop is activated before it has any effect – so you can reach your full stop loss before this happens – and second, when you start trailing you are always too pushed up against price, meaning that you don’t leave room for normal market volatility unless you place your stop too far back, which then provides very little improvement over your normal stop since you’re bound to be able to secure little of any profit that is actually achieved.

An Asirikuy old-timer – Fd – had the notion to build what I would consider the first function based trailing stop mechanisms we ever used at Asirikuy back in 2012. His implementation of a parabolic based take profit and stop loss mechanism on our Teyacanani trading system proved to greatly improve the strategy at the time and was quite revolutionary considering what we were using during that period. The most revolutionary thing about these stops was that you managed your loss expectation as a function of time since it became clear that the more time passed after an entry signal the more chance you had to hit your stop loss instead of your take profit mark. This philosophy of trade management as a function of time was a great breakthrough and would become paramount in the later development of our general function based trailing stop mechanisms.


It was then 2014 and we had already had our first experiences with data mining using our kantu software (which you can now access for free as OpenKantu) but it was obvious that our trade management mechanisms were lacking (systems hit full stop loss values often and they were not able to preserve floating gain). For this reason we then decided to create function based trailing stop mechanisms using the general formula (equation 1) that is described within the article. The implementation of linear, parabolic, logarithmic and square root based mechanisms on pKantu (our GPU based mining software) is what generated our current price action based system repository, which already holds more than 3000 trading strategies taken from low mining bias system searching procedures. Above you can see a sample strategy from our repository that uses a logarithmic trailing stop with a BE point of 29 hours on the EUR/USD 1H timeframe.

Although the mechanisms exposed within the article are rather simple – functions are mainly polynomials – you can expand this as much as you like using any type of function you desire. Using combinations of functions is also an important expansion of the proposed mechanisms as this marks the expectation of different price behaviors as a function of time. If you look at Image 1 within the article you’ll notice that the functions with exponents below 1 provide the fastest evolution for stop mechanisms below the BE point while higher polynomials are much slower. You can then use a polynomial below 1 before BE and a polynomial above 1 after the BE point in order to follow an expected price behavior that is different from both functions.


Perhaps the biggest selling point of function based trailing stops is that – when used in conjunction with an automated and powerful system mining process – you can obtain systems that follow whichever price evolution mechanism you desire. For example using pKantu we can try to find systems with low BE points and square root or linear functions, generating strategies that have a very fast expectation to be above BE and are therefore much easier to trade than strategies that might take much longer to either reach their SL or be able to move their SL up to the BE point.

Another interesting possibility is to combine functions with characteristics of the price curve in order to obtain trailing stop mechanisms that are even more in-tune with market movements. For example at Asirikuy we have also developed a price action enhanced square root trailing stop mechanism where the SL is moved additional steps if price has moved more significantly in our favor. This mixes both worlds in the sense that systems do not remain impervious to what happens on the price curve but can actually also adjust accordingly if the opportunity to lock a huge amount of profit becomes available.

If you would like to learn more about our work with data-mining and trailing stop mechanisms  please consider joining Asirikuy.com, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading.


Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

Leave a Reply

Fatal error: Call to undefined function mcsp_html() in /home1/danielfp/public_html/mechanicalforex/wp-content/themes/modern-style/comments.php on line 71