Discussing the article: "MQL5 Wizard Techniques you should know (Part 88): Using Blooms Filter with a Custom Trailing Class"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: MQL5 Wizard Techniques you should know (Part 88): Using Blooms Filter with a Custom Trailing Class.
Our next focus in these series on ideas that can be rapidly prototyped with the MQL5 Wizard, is a Custom Trailing class that uses the Blooming Filter. Trailing Stop systems are an optional but very resourceful part to any trading system that we want to explore more in these series besides the traditional Entry Signals.
Trading on smaller timeframes is gaining traction, partly due to prop firms, and is closer to high-frequency trading than to daily or weekly trading. The need to manage position drawdowns by tracking positions more frequently is a theme that is gaining more attention among some traders, and this has tended to require trading at or tracking trades at the smaller timeframes.
When such a system is automated, market conditions can introduce compute latency due to more frequent bar and tick processing. The unfortunate result is that Expert Advisors are susceptible to executing redundant logical loops that use up finite CPU resources without yielding any useful info. Quite often traditional algorithmic trailing stops employ rigid, memoryless thresholds. These can have the tendency to fail to adapt to evolving market microstructures. A static fixed-point or ATR-based stop loss can prematurely liquidate positions in a volatility spike that was transient, or about to fade off. They effectively ignore broader structural trends in favour of immediate noise.
The indiscriminate processing of price-bars can prevent integration of complex predictive models within real-time execution constraints. If one was to evaluate neural network matrices on each new price-bar/tick this would clearly lead to hardware bottlenecks. This can cause desynchronization between the local trading terminal and the broker’s server.
When seeking the right price point at which to add or adjust existing stop loss levels, unfiltered market noise can generate false positive signals, and these can distort the protocols of sequential trade management. An algorithm reacting to micro-fluctuations will trail a stop-loss too aggressively, thus failing to give the excursion space necessary for an asset to realize its macro direction momentum.
This article addresses these systemic inefficiencies by proposing a dual-gate architecture that is part of a custom MQL5 trailing class. We adopt a probabilistic Bloom filter for an O(1) ‘tick-deduplication’ as well as a simple Recurrent Neural Network (RNN) for threshold moderation. We aim for more precise trade management. Our methodology ensures that computational effort is reserved mathematically for special events such that stop-loss adjustments are set only by sequential market memory as opposed to stochastic fluctuations.
Author: Stephen Njuki