PersistentAnti EA

$20.00

Description Original website:ย https://www.mql5.com/en/market/product/4932#!tab=overview Original Price:ย $100 Content:ย Expert: PersistentAnti.ex4 (Unlimited), NO MANUAL. PersistentAnti EA for MT4 ย  Persistence and Anti-Persistence PersistentAnti Forex expert advisorย explores the idea of trend persistency. It is believed that the Forex market charts may switch between persistent andย anti-persistentย modes. In a persistent mode, the established trend is likely to continue. In anย anti-persistentย mode, a positive […]

Description

Description

Original website:ย https://www.mql5.com/en/market/product/4932#!tab=overview

Original Price:ย $100

Content:ย Expert: PersistentAnti.ex4 (Unlimited), NO MANUAL.

PersistentAnti EA for MT4

ย 

Persistence and Anti-Persistence

PersistentAnti Forex expert advisorย explores the idea of trend persistency. It is believed that the Forex market charts may switch between persistent andย anti-persistentย modes. In a persistent mode, the established trend is likely to continue. In anย anti-persistentย mode, a positive change is likely to be followed by a negative one, and a negative change will probably be followed by a positive one. Obviously, such a property, when detected, can be of great help to any trader. Going with the trend in a persistent mode and catching a reversal in ananti-persistentย mode seems like a good idea for an effective trading strategy.

Applying the Concept

There are many ways to detect current (or, more precisely, past) persistence orย anti-persistenceย state of the market, includingย Hurst exponent,ย Z-Scoreย and others. Unfortunately they all have some significant disadvantages. The presented expert advisor uses a simple, albeit naรฏve, method to assess theย short-termย (anti-)persistence. It counts the bars that followed the direction of a previous bar and compares the resulting number with the number of bars that did not follow the direction of a previous bar during some (short) period. If the share of persistent bars exceeds some set threshold, the chart is believed to be in a persistent mode. If the share ofย anti-persistentย bars exceeds the same threshold, the chart is considered to be in anย anti-persistentย mode. If neither number of persistent bars nor number ofย anti-persistentย bars exceeds the threshold, the EA considers the current mode as unclear and abstains from entering new positions.

The most interesting part is that this expert advisor tradesย contraryย to the detected mode. It will use a buy trade following a bearish bar and a sell trade following a bullish bar in a persistent mode. At the same time, it will issue a sell order following a bearish bar and a buy order following a bullish bar in anย anti-persistentย mode. This behavior seems completely out of logic, but it is a result of backtesting (without any over-optimization). Since the EA opens a position at the beginning of a bar and closes at the beginning of the next one (or the bar after the next one, etc.) without applying any stop-loss or take-profit levels, the strategy is completelyย reversible. Of course, you are free to experiment with reversing it backย โ€” there is an input parameter for that. Remember, that with a reversible EA, if your backtests result in big losses, you can always reverse it and end up with gains.

Trading Algorithm

The expert advisor is very simple and so is its algorithm of actions:

  1. On new bar opening, go through previousย Nย bars.
  2. For each bar check if the preceding bar was bullish or bearish. Then compare it to the bar in the current iteration.
  3. If both are bullish or both are bearish, record one point for the persistent mode. If barsโ€™ directions differ, record a point for theanti-persistentย mode.
  4. Close previous position if a position in opposite direction should be opened or if neither persistence norย anti-persistenceย has been detected.
  5. Ifย Reverseย is turned on (default) and ratio of persistent bars exceeds the given value, sell after a bullish bar or buy after a bearish one. If theย anti-persistentย bars prevail, sell after a bearish bar or buy after a bullish one.
  6. Ifย Reverseย is turned off and ratio of persistent bars exceeds the given value, buy after a bullish bar or sell after a bearish one. If theanti-persistentย bars prevail, buy after a bearish bar or sell after a bullish one.

This is it.

Backtest Results

The backtest of theย PersistentAnti expert advisorย was performed on the 50-month period of theย EUR/USD W1 chart. A fixed position volume of 0.1 standard lot has been used. Net profit was $1,996 on $10,000 starting account balance with the maximum relative drawdown at 9.19%. This drawdown period lasted for more than a year, which is quite long. You must be prepared to face long-term losing periods if you plan trading with this EA.

Input Parameters

  • Nย (default = 10) โ€“ the number of bars to look back forย (anti-)persistenceย detection.
  • Ratioย (default = 0.66) โ€“ the ratio ofย (anti-)persistentย bars to consider opening a new position or resuming with the current one.
  • Reverseย (default = true) โ€“ ifย true, trades contrary to the detected market persistence mode, otherwise trades in accordance with it.
  • Lotsย (default = 0.1) โ€“ the number of standard Forex lots to open positions for. Ignored ifย MMย =ย true.
  • Slippageย (default = 100) โ€“ the acceptable price slippage in pips.
  • MMย (default = false) โ€“ ifย true, fixed fractional position sizing will be used.
  • MaxPositionSizeย (default = 5) โ€“ the maximum position size in standard lots whenย MMย =ย true.
  • OrderCommentย (default = โ€œPersistentAntiโ€) โ€“ the commentary for positions opened by this EA.
  • Magicย (default = 2013041816277982) โ€“ the order magic number to filter positions opened by this EA. Used only in MetaTrader 4.

This EA is ECN-safe.ย You can freely use this expert advisor withย ECNย (market execution) brokers as it either does not apply any stop-loss and take-profit levels in its trading orders or sends only pending orders.